How to optimize with a list of grouped parameters?
-
Hi,
I'm trying to run an optimization for a strategy. As I learned, I can do something like
cerebro.optstrategy(MyStrategy, param1=param1_val_list, param2=param2_val_list, param3=param3_val_list)
.However, I don't want to run over every value on the value grid, but just a manually picked subsets. In this way the parameters are grouped like this:
param_groups = [(param1_val, param2_val, param3_val), (param1_val, param2_val, param3_val), (param1_val, param2_val, param3_val), ...]
, so the value grid is irregular. Can someone suggest how to pass this list to the optimization engine? Thank you! -
@jesseliu0 This topic was discussed few times on this forum ( try to search for
optstrategy parameters
). Here some of the related posts:https://community.backtrader.com/topic/390/how-to-check-the-legality-of-parameters-before-running-the-test
https://community.backtrader.com/topic/2227/optimization-sequence-multiple-combination-of-parameters
https://community.backtrader.com/topic/2837/how-to-pass-a-list-of-dicts-to-optstrategyNot directly related but interesting nevertheless:
https://community.backtrader.com/topic/186/genetic-optimization
-
@vladisld Thank you!