GithubHelp home page GithubHelp logo

pseudobit / trademaster Goto Github PK

View Code? Open in Web Editor NEW

This project forked from trademaster-ntu/trademaster

0.0 0.0 0.0 380.68 MB

TradeMaster is an open-source platform for quantitative trading empowered by reinforcement learning :fire: :zap: :rainbow:

License: Apache License 2.0

Python 7.64% Jupyter Notebook 92.34% Dockerfile 0.02%

trademaster's Introduction

TradeMaster: An RL Platform for Trading

 

Python 3.9 Platform License Document


TradeMaster is a first-of-its kind, best-in-class open-source platform for quantitative trading (QT) empowered by reinforcement learning (RL), which covers the full pipeline for the design, implementation, evaluation and deployment of RL-based algorithms.

What's NEW!

Update Status
Release TradeMaster 1.0.0 :octocat: Released v1.0.0 on 5 March 2023

Outline

Overview


TradeMaster is composed of 6 key modules: 1) multi-modality market data of different financial assets at multiple granularity; 2) whole data preprocessing pipeline; 3) a series of high-fidelity data-driven market simulators for mainstream QT tasks; 4) efficient implementations of over 13 novel RL-based trading algorithms; 5) systematic evaluation toolkits with 6 axes and 17 measures; 6) different interfaces for interdisciplinary users.

Installation

Here are the installation tutorials for different operating systems and docker:

Tutorial

We provide tutorials covering core features of TradeMaster for users to get start with.

Algorithm Dataset Market Task Code Link
EIIE DJ30 US Stock Portfolio Management tutorial
DeepScalper FX Crypto Intraday Trading tutorial
SARL DJ30 US Stock Portfolio Management tutorial
PPO SSE 50 China Stock Portfolio Management tutorial
ETTO Bitcoin Crypto Order Execution tutorial
Double DQN Bitcoin Crypto High Frequency Trading tutorial

Useful Script

Dataset

Dataset Data Source Type Range and Frequency Raw Data Datasheet
S&P500 Yahoo US Stock 2000/01/01-2022/01/01, 1day OHLCV SP500
DJ30 Yahoo US Stock 2012/01/01-2021/12/31, 1day OHLCV DJ30
FX Kaggle Foreign Exchange 2000/01/01-2019/12/31, 1day OHLCV FX
Crypto Kaggle Crypto 2013/04/29-2021/07/06, 1day OHLCV Crypto
SSE50 Yahoo China Stock 2009/01/02-2021/01/01, 1day OHLCV SSE50
Bitcoin Binance Crypto 2021/04/07-2021/04/19, 1min LOB Binance

Dates are in YY/MM/DD format.

OHLCV: open, high, low, and close prices; volume: corresponding trading volume; LOB: Limit order book.

Users can download data of the above datasets from Google Drive or Baidu Cloud (extraction code:x24b)

Model Zoo

DeepScalper based on Pytorch (Shuo Sun et al, CIKM 22)

OPD based on Pytorch (Fang et al, AAAI 21)

DeepTrader based on Pytorch (Wang et al, AAAI 21)

SARL based on Pytorch (Yunan Ye et al, AAAI 20)

ETTO based on Pytorch (Lin et al, 20)

Investor-Imitator based on Pytorch (Yi Ding et al, KDD 18)

EIIE based on Pytorch (Jiang et al, 17)

Classic RL based on Pytorch and Ray: PPO A2C Rainbow SAC DDPG DQN PG TD3

Visualization Toolkit

TradeMaster provides many visualization toolkits for a systematic evaluation of RL-based quantitative trading methods. Please check this paper and repository for details. Some examples are as follows:

PRIDE-Star is a star plot containing normalized score of 8 key financial measures such total return (TR) and Sharpe ratio (SR) to evaluate profitability,risk-control and diversity:



Publications

PRUDEX-Compass: Towards Systematic Evaluation of Reinforcement Learning in Financial Markets (2023)

Reinforcement Learning for Quantitative Trading (Survey) (ACM Transactions on Intelligent Systems and Technology 2023)

Deep Reinforcement Learning for Quantitative Trading: Challenges and Opportunities (IEEE Intelligent Systems 2022)

DeepScalper: A Risk-Aware Reinforcement Learning Framework to Capture Fleeting Intraday Trading Opportunities (CIKM 2022)

Commission Fee is not Enough: A Hierarchical Reinforced Framework for Portfolio Management (AAAI 21)

File Structure

| TradeMaster
| ├── configs
| ├── data
| │   ├── algorithmic_trading 
| │   ├── high_frequency_trading  
| │   ├── order_excution          
| │   └── porfolio_management
| ├── deploy
| │   ├── backend_client.py
| │   ├── backend_client_test.py 
| │   └── backend_service.py        
| │   ├── backend_service_test.py  
| ├── docs
| ├── figure
| ├── installation
| │   ├── docker.md
| │   ├── requirements.md
| ├── tools
| │   ├── algorithmic_trading          
| │   ├── data_preprocessor
| │   ├── high_frequency_trading
| │   ├── market_dynamics_labeling
| │   ├── missing_value_imputation  
| │   ├── order_excution  
| │   ├── porfolio_management  
| │   ├── __init__.py      
| ├── tradmaster       
| │   ├── agents   
| │   ├── datasets 
| │   ├── enviornments 
| │   ├── evaluation 
| │   ├── imputation 
| │   ├── losses
| │   ├── nets
| │   ├── preprocessor
| │   ├── optimizers
| │   ├── pretrained
| │   ├── trainers
| │   ├── transition
| │   ├── utils
| │   └── __init__.py     
| ├── unit_testing
| ├── Dockerfile
| ├── LICENSE
| ├── README.md
| ├── pyproject.toml
| └── requirements.txt

Team

  • This repository is developed and maintained by AMI group lead by Prof Bo An at Nanyang Technological University.
  • We have positions for software engineer, research associate and postdoc. If you are interested in working at the intersection of RL and quantitative trading, feel free to send us an email with your CV.

Competition

TradeMaster Cup 2022

Contact Us

If you have any further questions of this project, please contact [email protected]

trademaster's People

Contributors

12869741 avatar ai-gamer avatar dvampire avatar ec2ez4rd avatar qinmoelei avatar xiahaochong98 avatar xuewanqi avatar yonggang-xie avatar yumuqi-1995 avatar zong0004 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.