Dev.to Machine Learning3h ago|Research & PapersBusiness & Industry

Genetic Algorithms Outperform Deep RL for Trading

The author shares their experience of trying to use Deep Reinforcement Learning (DRL) for stock trading, and how they ultimately found more success with genetic algorithms (GA).

💡

Why it matters

This article provides valuable insights into the practical challenges of applying deep reinforcement learning to financial trading, and highlights the potential benefits of using genetic algorithms as an alternative approach.

Key Points

  • 1DRL models are difficult to train and debug due to reward shaping challenges, catastrophic forgetting, and lack of explainability
  • 2Genetic algorithms provide a simpler approach by defining a 'strategy DNA' of numerical parameters that control trading decisions
  • 3The author was able to develop a profitable trading strategy using GA within two weeks, whereas DRL models struggled to learn anything useful

Details

The author spent six months trying to make Deep Reinforcement Learning (DRL) work for stock trading, experimenting with various algorithms like PPO, SAC, and A2C. However, they faced several challenges with DRL, including the difficulty of reward shaping, catastrophic forgetting, and the inability to explain the model's decisions. The author found that reward shaping is 'black magic', as every choice of reward function can create perverse incentives. Catastrophic forgetting was also a major issue, where the model would forget everything about crash patterns when fine-tuned on bull market data. Additionally, the author struggled to debug the DRL models, as the neural network's decisions were opaque. The author also noted the insatiable data hunger of deep learning models, which require much more data than the 5,000 daily bars typically available for financial markets. Frustrated with these challenges, the author switched to genetic algorithms (GA), which involve defining a 'strategy DNA' - a set of numerical parameters that control the trading decisions. Within two weeks, the author was able to develop a profitable trading strategy using GA, which they found to be a simpler and more effective approach compared to DRL.

Like
Save
Read original
Cached
Comments
?

No comments yet

Be the first to comment

AI Curator - Daily AI News Curation

AI Curator

Your AI news assistant

Ask me anything about AI

I can help you understand AI news, trends, and technologies