Building a Bitcoin trading RL platform using real market data
This recipe will help you build a cryptocurrency trading RL environment for your agents. This environment simulates a Bitcoin trading exchange based on real-world data from the Gemini cryptocurrency exchange. In this environment, your RL agent can place buy/sell/hold trades and get rewards based on the profit/loss it makes, starting with an initial cash balance in the agent's trading account.
Getting ready
To complete this recipe, make sure you have the latest version. You will need to activate the tf2rl-cookbook
Python/conda virtual environment. Make sure to update the environment so that it matches the latest conda environment specification file (tfrl-cookbook.yml
) in this cookbook's code repository. If the following import
statements run without issues, you are ready to get started:
import os import random from typing import Dict import gym import numpy as np import pandas as pd from gym import spaces...