Training a cryptocurrency trading bot using RL
The soft actor-critic Agent is one of the most popular and state-of-the-art RL Agents available and is based on an off-policy, maximum entropy-based deep RL algorithm. This recipe provides all the ingredients you will need to build a soft actor-critic Agent from scratch using TensorFlow 2.x and train it for cryptocurrency (Bitcoin, Ethereum, and so on) trading using real data from the Gemini cryptocurrency exchange.
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 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:
mport functools import os import random from collections import deque from functools...