-
Notifications
You must be signed in to change notification settings - Fork 258
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
The result of backtesting 30 years is different from 5 years? #159
Comments
That's a good question, I hope it's not because Yahoo Finance data has changed in the meantime. Can you run the whole thing to try (it's monthly re-sampled, so it shouldn't be too bad). In general every back-test is path dependent so it will change based on the starting conditions, but this does seem like a large difference. |
@enzbus I run the demo with 30 years time window, and the result is almost the same with the example page, below is the |
Yeah, if read the code carefully you'll see that example actually runs many back-test sweeping over hyper-parameters, so each one will have different allocations. |
It is interesting :) I'd like to read the code deeply. BTW, is there any verbose option for debugging or output more detail logging? |
Yes, adding this two lines at the start should suffice:
|
Hello, I play the etf demo and change the
backtest_many
code as below (for 5 years time window) since my laptop is not very high performance.And the plots
And the original one for around 30 years time window
The portfolio value trend is very similar, but the largest 7 assets are quite different. Especially for cash. Can you explain why it changes so much? Thanks!
The text was updated successfully, but these errors were encountered: