- Python 3.10 Install the required packages with:
pip install -r requirements.txt
Please also clone the environment we created from https://github.com/leafoliage/gym-futures-trading/tree/dev
In DQN.py
,
If you want to test the trained model, please remember to comment out the training section.
If you want to test different months, please modify
env = gym.make('futures3-v0') # Test in March
or
env = gym.make('futures1-v0') # Test in January
Please note that we only have data from January to April.
If you want to test different model, just change the file path in test function.
test(env, "./Tables/DQN_GG.pt")
We get the data from Binance API
Run the following command to fetch and set the data up for training:
python .\DataDownloader\download-kline.py -t um -s BTCUSDT -i 5m -startDate 2024-01-01 -endDate 2024-04-30 -skip-daily 1
python .\data_utils\process_zipped_data.py
plain_plot.py
can be used to plot candle chart. Use:
python3 plain_plot.py ../data/{target}