Building a stock market trading RL platform using price charts
Human traders look at several indicators on their price monitor in order to vet and identify a potential trade. Can we allow the agents to also visually look at the price candlestick charts to trade stocks instead of providing just a tabular/CSV representation? Yes, we can! This recipe will teach you how to build a visually rich trading environment for your RL agents.
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:
import os import random from typing import Dict import cv2 import gym import numpy as np import pandas as pd from gym...