Thanks to visit codestin.com
Credit goes to github.com

Skip to content

workofart/RL-trading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trading Gym

This project is a modified version of the original Trading Gym, which is an open-source project for the development of reinforcement learning algorithms in the context of trading. It is currently composed of a single environment and implements a generic way of feeding this trading environment different type of price data.

Demo

Perfect Sine-Function Trading

Semi-Perfect Sine-Function Trading

Installation

  1. Make sure you have Python 3

  2. Then install trading-gym

    pip install tgym

    We strongly recommend using virtual environments. A very good guide can be found at https://python-guide-pt-br.readthedocs.io/pt_BR/latest/dev/virtualenvs.html.

  3. Then install keras

    pip install keras

    By default, the backend will be set to Theano. You can also run it with Tensorflow by installing it with pip install tensorflow. You then need to edit ~/.keras/keras.json and make sure "backend": "tensorflow" is specified.

Running

python examples/dqn_agent.py

Configurations

Stored in config/config.json

Notes

To plot properly with matlibplot, you should disable "interactive mode" by adding this in your python scripts (I've added it to examples/dqn_agent.py already)

plt.interactive(False)

Compatibility with OpenAI gym

Our environments API is strongly inspired by OpenAI Gym. We aim to entirely base it upon OpenAI Gym architecture and propose Trading Gym as an additional OpenAI environment.

License

MIT License

About

Reinforcement Learning for Trading

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages