This repository provides the code for a Reinforcement Learning trading agent with its trading environment that works with both simulated and historical market data. This was inspired by OpenAI Gym framework.
This repository has the Keras implementation of
- Python 3.5/3.6
- Keras
- Tensorflow
- 3 Reinforcement learning Agents (DQN, DDQN, DDDQN)
- ADX and RSI technical indicator and extensible for more
- Historical stock market data ingestion through CSV
[π΄π·π(π‘), π ππΌ(π‘), πΆπΆπΌ(π‘), πππ ππ‘πππ, π’πππππππ§ππ πππ‘π’ππ]
The agent could take three actions β Buy, Sell or Hold
The reward objective is set to maximize realized PnL from a round trip trade. It also includes
- Trading commision (penalty)
- Holding fee (penalty), like the interest brokers charge for overnight levereg position. These rewards are what controls and optimize the agents during the training phase that determines the trading behavior. The latter 2 parameters control the trading frequncy of the agent.
- Prioritized Experience Replay
- LSTM networks
- Asynchronous Advantage Actor-Critic (A3C)
- Multi-agent
- Reward engineering