Replies: 1 comment 2 replies
-
Off the top of my head, I'm thinking you may be able to load all of the dataframes for multiple assets (potentially even over varying timeframes). Then declare an array for each hyperparameter. Then create a for loop that goes through all assets... and within each asset loop, maybe run an individual asset optimize function multiple times - writing the optimized hyperparameters to their respective array with each loop. Then, find the mode of each hyperparameter array. I think I might give this a try and let it run overnight. I will report back with any results. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First off - thank you so much for this awesome utility and thank the entire community here for the awesome work done to support the effort!
I, like many others (I assume), hold multiple stocks in my portfolio... some individual, some ETFs. And although it's amazing how well backtesting.py has enabled me to hone in my hyperparameters using the optimize() function, it's left me wondering what could be done to take into account the varied nature of different assets (within reason... same asset class). I've already found that optimizing for one ticker can significantly improve my returns on another. But rather than just hope that optimization will carry across multiple assets, I'm trying to think of a way to optimize across them all together.
All this being said - I realize that the topic has been raised before. I'm just hoping to get some feedback on what others may have done to achieve this and/or ideas on how to account for multiple assets during optimization.
Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions