Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Reinforcement learning for trading...is real?

Hi everyone,

I have been exploring the field of RL for trading FX. Started from basic, just doing an enviroment for the EURUSD with some indicators. I would like to know if anyone here has tried this with some success (ending with a trainned agent that could trade in the enviroment and potentially use it for live trading in demo/real).

Is this possible in some way? Like, can the agent learn to trade SMA crossover, for example? For the agent, to learn how to trade the SMA crossover, you just throw the OHLC+2 SMA as inputs and let the agent figure it out how it works or you need to provide the agent the strategy in the enviroment? What advices would you give me?

Thank you!
PS

2 responses

Off course, it would work, by considering the trading environment as a game. Generally speaking, it depends on the modelization process -Markov decision process or partially observed Markov process, off-policy or on-policy.

Hi Badr, thank you for your answer.

Taking a SMA crossover strategy as example, in order to the agent to learn this strategy it would be necessary to provide the values of both SMA or it should provide the SMA crossover signal? Or should the strategy be coded in some part of the enviroment? Honestly, this last part doesn't makes me too much sense, since I would think (and expect) that the agent will learn to trade the crossover from the inputs that conform the state. That would be: open positions, cash in hand+floating pnl+sma values.

Once again, thank you :)