Allow hyperopting on strategies
This commit is contained in:
parent
4fdf8a75cd
commit
4277062314
@ -36,6 +36,9 @@ class IHyperOpt(ABC):
|
|||||||
"""
|
"""
|
||||||
ticker_interval: str
|
ticker_interval: str
|
||||||
|
|
||||||
|
def __init__(self, config: dict = None) -> None:
|
||||||
|
self.config = config
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def populate_indicators(dataframe: DataFrame, metadata: dict) -> DataFrame:
|
def populate_indicators(dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||||
|
@ -65,7 +65,7 @@ class HyperOptResolver(IResolver):
|
|||||||
abs_paths.insert(0, Path(extra_dir).resolve())
|
abs_paths.insert(0, Path(extra_dir).resolve())
|
||||||
|
|
||||||
hyperopt = self._load_object(paths=abs_paths, object_type=IHyperOpt,
|
hyperopt = self._load_object(paths=abs_paths, object_type=IHyperOpt,
|
||||||
object_name=hyperopt_name)
|
object_name=hyperopt_name, kwargs={'config': config})
|
||||||
if hyperopt:
|
if hyperopt:
|
||||||
return hyperopt
|
return hyperopt
|
||||||
raise OperationalException(
|
raise OperationalException(
|
||||||
|
Loading…
Reference in New Issue
Block a user