Skip to content
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

Train - test split (allready seen samples) #38

Closed
illUkc opened this issue Mar 8, 2021 · 2 comments
Closed

Train - test split (allready seen samples) #38

illUkc opened this issue Mar 8, 2021 · 2 comments

Comments

@illUkc
Copy link

illUkc commented Mar 8, 2021

Hello,

First of all great work Robert.

I find one big mistake ( everyone do that ) in backtesting.py -> row 40 - u are using shuffle = True ( by default is true in train_test_split ) and when u doing i+1 or i+x targets data is already seen when doing learning. Because of that u get always different result when running backtesting.py. If u change shuffle = False u will get 45-50% less of trades and Accuracy score will drop to 0.6/0.65 max.

Best

@robertmartin8
Copy link
Owner

@illUkc this is the mistake that's being referred to in the readme

@Tom-Ryder
Copy link

Tom-Ryder commented Apr 7, 2021

There's another important caveat btw - the data is biased to companies who outperform the market. That is, deciding to buy all of the shares in a 20% test split and you will outperform the market by ~4%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants