Home

Awesome

Trading Bitcoin with Reinforcement Learning

This post describes how to apply reinforcement learning algorithm to trade Bitcoin. This repository provides an implementation aims to reproduce the result.

<p align="center"><img src="Figure_1.png">

Dependencies

Data

The minute-by-minute data is downloaded from Kaggle. I resample them into 15-minute interval and compute all the features we need. Then I save the two dataframes under bitcoin-historical-data.

Note that,

How to run

# E.g. clone to local (say to Downloads)
cd ~/Downloads/trading-bitcoin-with-reinforcement-learning/

# Usage: python main.py <path-to-one-minute-data>
# If argument not provided, the default file path
# './bitcoin-historical-data/coinbaseUSD_1-min_data.csv' is given
python main.py ./bitcoin-historical-data/coinbaseUSD_1-min_data.csv

Note: I observed substantial variability in the test result therefore the equity curve you got may not be 100% the same as mine.