Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix tutorial #83

Merged
merged 1 commit into from
Feb 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions docs/source/tutorial/tutorial1.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
# Tutorial 1: Intraday Crypto Trading with DeepScalper
![DeepScalper.png](DeepScalper.png)

## Task
Intraday trading is a fundamental quantitative trading task, where traders actively long/short one pre-selected financial asset within the same trading day to maximize future profit.

## Algorithm
DeepScalper contains 4 technical contributions which all together make it better than direct use of RL algorithms.
- RL optimization with action branching
- reward function with hindsight bonus
- intraday market embedding
- risk-aware auxiliary task
DeepScalper use deep q network to optimize the reward sum got from reinforcement learning where a hindsight reward is used to capture the long-term porfit trends and embedding from both micro-level and macro-level market information.

Here is the construction of the DeepScalper:
<div align="center">
<img src="https://github.com/TradeMaster-NTU/TradeMaster/blob/main/docs/source/tutorial/DeepScalper.jpg" width = 900 height = 300 />
</div>



Here is a [tutorial](https://github.com/DVampire/TradeMasterReBuild/tree/main/tutorial/DeepScalper.ipynb) about how you can build DeepScalper in a few lines of codes using TradeMaster.
## Notebook and Script
In this notebook, we implement the training and testing process of DeepScalper based on the TradeMaster framework.

[Tutorial1_DeepScalper](https://github.com/TradeMaster-NTU/TradeMaster/blob/main/tutorial/Tutorial1_DeepScalper.ipynb)

And this is the script for training and testing.

[train.py](https://github.com/TradeMaster-NTU/TradeMaster/blob/1.0.0/tools/algorithmic_trading/train.py)
23 changes: 12 additions & 11 deletions docs/source/tutorial/tutorial2.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
# Tutorial 2: Portfolio Management with EIIE on US stocks

## Task
![EIIE.png](EIIE.png)
Portfolio management is the action of continuous reallocation of a capital into a number of financial assets periodically.

## Algorithm
EIIE contains 2 technical contributions which all together make it better than direct use of RL algorithms.
- Deterministic Policy Gradient
- Portfolio-Vector Memor
The framework consists of the Ensemble of Identical Independent Evaluators
(EIIE) topology, a Portfolio-Vector Memory (PVM), an Online Stochastic Batch Learning
(OSBL) scheme, and a fully exploiting and explicit reward function.





Here is the construction of the EIIE:
<div align="center">
<img src="https://github.com/TradeMaster-NTU/TradeMaster/blob/main/docs/source/tutorial/EIIE.jpg" width = 900 height = 300 />
</div>
## Notebook and Script
In this notebook, we implement the training and testing process of EIIE based on the TradeMaster framework.

[Tutorial2_EIIE](https://github.com/TradeMaster-NTU/TradeMaster/blob/main/tutorial/Tutorial2_EIIE.ipynb)

And this is the script for training and testing.

Here is a [tutorial](https://github.com/DVampire/TradeMasterReBuild/tree/main/tutorial/EIIE.ipynb) about how you can build EIIE in a few lines of codes using TradeMaster.
[train_eiie.py](https://github.com/TradeMaster-NTU/TradeMaster/blob/1.0.0/tools/portfolio_management/train_eiie.py)
15 changes: 9 additions & 6 deletions docs/source/tutorial/tutorial5.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Tutorial 5: High Frequency Trading with Double DQN

## Task
High Frequency Trading is a fundamental quantitative trading task, where traders actively buy/sell one pre-selected financial periodically in seconds with the consideration of order execution.

## Algorithm
HFT_DDQN contains 2 technical contributions which all together make it better than direct use of RL algorithms.
- Double deep q network
- Regulator from the true q table
HFT_DDQN use a decayed supervised regulator genereated from the real q table based on the future price information and a double q network to optimizer the portfit margine.

Here is a [tutorial](https://github.com/DVampire/TradeMasterReBuild/tree/main/tutorial/HFT.ipynb) about how you can build DDQN for HFT in a few lines of codes using TradeMaster.
## Notebook and Script
In this notebook, we implement the training and testing process of HFTDDQN based on the TradeMaster framework.

[Tutorial5_HFT](https://github.com/TradeMaster-NTU/TradeMaster/blob/main/tutorial/Tutorial5_HFT.ipynb)

And this is the script for training and testing.

[train.py](https://github.com/TradeMaster-NTU/TradeMaster/blob/1.0.0/tools/high_frequency_trading/train.py)
Loading