All Projects → 6-Billionaires → Trading Gym

6-Billionaires / Trading Gym

Licence: other
This trading-gym is the first trading for agent to train with episode of short term trading itself.

Projects that are alternatives of or similar to Trading Gym

Ddpg
Implementation of Deep Deterministic Policy Gradients using TensorFlow and OpenAI Gym
Stars: ✭ 197 (+1.55%)
Mutual labels:  jupyter-notebook
Integratedgradients
Python/Keras implementation of integrated gradients presented in "Axiomatic Attribution for Deep Networks" for explaining any model defined in Keras framework.
Stars: ✭ 197 (+1.55%)
Mutual labels:  jupyter-notebook
Pytorch Geometric Yoochoose
This is a tutorial for PyTorch Geometric on the YooChoose dataset
Stars: ✭ 198 (+2.06%)
Mutual labels:  jupyter-notebook
Analytics Zoo
Distributed Tensorflow, Keras and PyTorch on Apache Spark/Flink & Ray
Stars: ✭ 2,448 (+1161.86%)
Mutual labels:  jupyter-notebook
Atari Model Zoo
A binary release of trained deep reinforcement learning models trained in the Atari machine learning benchmark, and a software release that enables easy visualization and analysis of models, and comparison across training algorithms.
Stars: ✭ 198 (+2.06%)
Mutual labels:  jupyter-notebook
Bilateral solver
Python code for the fast bilateral solver
Stars: ✭ 198 (+2.06%)
Mutual labels:  jupyter-notebook
Coursera Applied Data Science With Python
Repository for coursera specialization Applied Data Science with Python by University of Michigan
Stars: ✭ 197 (+1.55%)
Mutual labels:  jupyter-notebook
Go Tflite
Go binding for TensorFlow Lite
Stars: ✭ 199 (+2.58%)
Mutual labels:  jupyter-notebook
Up Down Captioner
Automatic image captioning model based on Caffe, using features from bottom-up attention.
Stars: ✭ 195 (+0.52%)
Mutual labels:  jupyter-notebook
Neural networks and cv
Stars: ✭ 199 (+2.58%)
Mutual labels:  jupyter-notebook
Ml
Codes related to various ML Hackathons
Stars: ✭ 197 (+1.55%)
Mutual labels:  jupyter-notebook
Data Science Projects With Python
A Case Study Approach to Successful Data Science Projects Using Python, Pandas, and Scikit-Learn
Stars: ✭ 198 (+2.06%)
Mutual labels:  jupyter-notebook
Datacollect
A collection of tools to collect and download various data.
Stars: ✭ 198 (+2.06%)
Mutual labels:  jupyter-notebook
Miscellaneous
Scripts and code examples. Includes Spark notes, Jupyter notebook examples for Spark, Impala and Oracle.
Stars: ✭ 197 (+1.55%)
Mutual labels:  jupyter-notebook
Nas fpn tensorflow
NAS-FPN: Learning Scalable Feature Pyramid Architecture for Object Detection.
Stars: ✭ 198 (+2.06%)
Mutual labels:  jupyter-notebook
Svhnclassifier
A TensorFlow implementation of Multi-digit Number Recognition from Street View Imagery using Deep Convolutional Neural Networks (http://arxiv.org/pdf/1312.6082.pdf)
Stars: ✭ 197 (+1.55%)
Mutual labels:  jupyter-notebook
Auto Reid And Others
Auto-ReID and Other Person Re-Identification Projects
Stars: ✭ 198 (+2.06%)
Mutual labels:  jupyter-notebook
Ml Lessons
Intro to deep learning for medical imaging lesson, by MD.ai
Stars: ✭ 199 (+2.58%)
Mutual labels:  jupyter-notebook
Python For Finance Cookbook
Python for Finance Cookbook, published by Packt
Stars: ✭ 199 (+2.58%)
Mutual labels:  jupyter-notebook
Graph Notebook
Library extending Jupyter notebooks to integrate with Apache TinkerPop and RDF SPARQL.
Stars: ✭ 199 (+2.58%)
Mutual labels:  jupyter-notebook

Trading Gym for Quantitative trading

Intro

This is a trading gym for any agent to try trade for short term trading. We have collected enermous data for short term trading. We have been gathering for every Korean equities order and quote data every tick moment and also reflected data to our trading gym. Trading Gym is a toolkit for developing and comparing reinforcement learning trading algorithms.

Basics

There are two basic concepts in reinforcement learning: the environment (namely, the outside world) and the agent (namely, the algorithm you are writing). The agent sends actions to the environment, and the environment replies with observations and rewards.

Trading Gym recreates market states based on trade orderbook and execution data. In this environment, you can make reinforcement learning agents learn how to trade.

The core gym interface is same as OpenAI Gym Env, which is the unified environment interface. There is no interface for agents; that part is left to you. The following are the Env methods you should know:

  • reset(self): Reset the environment's state. Returns observation.
  • step(self, action): Take an action in the environment by one timestep. Returns observation, reward, done, info.
  • render(self, mode='human', close=False): Render one frame of the environment. Display gym's status based on a user configurations.

Architecture

It's is simple architecture that you motivate follow and run this repo easily.

How to install

You can clone two repository into your local computer or cloud whatever. And you can run agent after including traidng gym as submodule or add gym's root into Python Path and then you can run trading agent itself. so simple!

You can do install of trading gym simply with:

git clone https://github.com/6-Billionaires/trading-gym.git

Quick Run

env = MyTGym(episode_type='0', percent_goal_profit=2, percent_stop_loss=5, episode_duration_min=60) # set env.

state = env.reset() # initiate env and get state

next_state, reward, done, info = env.step(action) # Do action and get next step information

An environment for learning reinforcement learning has been created, and reinforcement learning can be learned by designing agents.

Data

You have to put trade orderbook and execution data into data folder. You must use the data in accordance with the format. The data format can be found in the 'data' folder on github.

Path : trading-gym\data\'Episode type'\'Stock code'\

  • Episode type : Type what criteria you categorized your data
  • Stock code : stock codes within certain episodes

Trade Orderbook Data Format

  • File name format : 'Episode type'-'Stock code'-'Date'-order.csv
  • It have 41 columns with time, bid prices (10), bid volumes (10), ask prices (10), ask volumes (10)

Trade Execution Data Format

  • File name format : 'Episode type'-'Stock code'-'Date'-quote.csv
  • It have 12 columns with time, price(last executed), Buy/Sell/Total executed, Buy/Sell/Total Weighted Price, Execution Strength, Open/High/Low Price

Agent with this gym

Here can be reference. Those are that we built for currently working paper

Reference

  1. Trading gym followed by OpenAI Gym architecture, spread trading

  2. Trading gym followed by OpenAI Gym architecture, easy to look around with ipython example

  3. Sairen

  4. Others

Future Plan

  1. Packaging
    setup.py, Upload package into pip repo

  2. Refactoring 1, 2

  3. Run this on cloud and allow every agent can access through REST API to train

  4. Provide simple running agent

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].