-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lookahead Bias #15
Comments
I do not think this line is look ahead bias. |
No, this is most definitely look ahead bias. At each time step the agent is able to see the closing price, while still being able to buy/sell at the open price. In a real trading scenario, this would never be possible. To make the environment more realistic, you would have to set the Setting |
I am not sure if I would agree with you but I see what you mean and I will give it another look. |
RL-Bitcoin-trading-bot/RL-Bitcoin-trading-bot_4/RL-Bitcoin-trading-bot_4.py
Line 229 in 10dac5e
Hi Rokas,
Thank you for the lesson and fantastic work on this tutorial. I have a quick question about why you set the current price equal to the 'open' price rather than the Close. The agent is able to see the close price for any time step, but is still able to execute at the open price. Doesn't this provide information that a real trader would not have? In other words, isn't the agent able to see that, for example, the close is higher than the open, and therefore should buy? I think this introduces some form of lookahead bias. Do you know what your results look like if you set the current price to the close?
Thanks
The text was updated successfully, but these errors were encountered: