This repo is the code for this paper. Deep reinforcement learing is used to find optimal strategies in these two scenarios:
- Momentum trading: capture the underlying dynamics
- Arbitrage trading: utilize the hidden relation among the inputs
Several neural networks are compared:
- Recurrent Neural Networks (GRU/LSTM)
- Convolutional Neural Network (CNN)
- Multi-Layer Perception (MLP)
More about deep reinforcement learning (deep Q-learning):
- https://keon.io/deep-q-learning/ and its code on GitHub
- Google’s DeepMind published its famous paper Playing Atari with Deep Reinforcement Learning
Python version: python 3.6
pip install -r requirements.txt
You can get all dependencies via the Anaconda environment file, env.yml:
conda env create -f env.yml
- before start at the 1st time, generate database:
python sampler.py
- call the main function:
python main.py
You can play with model parameters (specified in main.py), if you get good results or any trouble, please contact me at [email protected]