Provide access to strategy instance from hyperopt class.

This commit is contained in:
Rokas Kupstys
2021-03-13 09:45:16 +02:00
committed by Rokas Kupstys
parent 441d3fad39
commit 5e872273d1
2 changed files with 3 additions and 0 deletions

View File

@@ -73,6 +73,7 @@ class Hyperopt:
self.backtesting = Backtesting(self.config)
self.custom_hyperopt = HyperOptResolver.load_hyperopt(self.config)
self.custom_hyperopt.__class__.strategy = self.backtesting.strategy
self.custom_hyperoptloss = HyperOptLossResolver.load_hyperoptloss(self.config)
self.calculate_loss = self.custom_hyperoptloss.hyperopt_loss_function