Open jacktang opened 4 months ago
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 largest_growth_figure
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:
import logging
logging.basicConfig(level='INFO')
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!