llSourcell / Reinforcement_Learning_for_Stock_Prediction

This is the code for "Reinforcement Learning for Stock Prediction" By Siraj Raval on Youtube
638 stars 362 forks source link

Contains future data #33

Open dayzorro opened 2 years ago

dayzorro commented 2 years ago

the reason why this code is able to predict peaks and troughs very well is because it uses the behavior at time T to buy and sell at time T. And the input data of T is obtained from the difference between the closing price of T on that day and the closing price of T-1. Therefore, future information is included. If in doubt, do two things: 1. Move the input window forward by one day, 2. Write a backtest program to test it.