Building an advanced cryptocurrency trading platform for RL agents
Instead of allowing the Agent to only take discrete actions, such as buying/selling/holding a pre-set amount of Bitcoin or Ethereum tokens, what if we allowed the Agent to decide how many crypto coins/tokens it would like to buy or sell? That is exactly what this recipe will allow you to create in the form of a CryptoTradingVisualContinuousEnv
RL environment.
Getting ready
To complete this recipe, you need to ensure you have the latest version. You will need to activate the tf2rl-cookbook
Python/conda virtual environment. Make sure that you update the environment so that it matches the latest conda environment specification file (tfrl-cookbook.yml
), which can be found in this cookbook's code repository. If the following import
statements run without any issues, you are ready to get started:
import os import random from typing import Dict import cv2 import gym import numpy as np import pandas as pd from...