-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Get more than one statistic when optimize #1147
Comments
To the best of my knowledge, there isn't a way it can be done directly in the library, but you could always rerun the parameters you are interested in to obtain your statistic of choice. |
You can run this yourself a different route and get the same results as well as the stats for every run.
|
This repo - https://github.com/s-kust/python-backtesting-template - may be helpful. See This solution is more flexible than the original |
I would suggest looking into Optuna (https://github.com/optuna/optuna). You can define custom objective functions, and you're not limited to scalar outputs. You can pass your backtest result inside the optimize function, and define the objective function as any combination of stats object's attributes. |
When I optimize a strategy I can get only a chosen statistic to see for every combinations, for example:
If I
print(heatmap)
I get:So I see the two parameters and corresponding return of that combination, but say I also want to see winrate and average trade % of every combination? How can I do that?
Thank's.
The text was updated successfully, but these errors were encountered: