Adjust documentation for new parameter in loss functions
This commit is contained in:
@@ -550,7 +550,7 @@ class Hyperopt:
|
||||
processed=processed)
|
||||
|
||||
def _get_results_dict(self, backtesting_results, min_date, max_date,
|
||||
params_dict, params_details, processed: Dict):
|
||||
params_dict, params_details, processed: Dict[str, DataFrame]):
|
||||
results_metrics = self._calculate_results_metrics(backtesting_results)
|
||||
results_explanation = self._format_results_explanation_string(results_metrics)
|
||||
|
||||
|
@@ -1,5 +1,6 @@
|
||||
from datetime import datetime
|
||||
from math import exp
|
||||
from typing import Dict
|
||||
|
||||
from pandas import DataFrame
|
||||
|
||||
@@ -35,6 +36,7 @@ class SampleHyperOptLoss(IHyperOptLoss):
|
||||
@staticmethod
|
||||
def hyperopt_loss_function(results: DataFrame, trade_count: int,
|
||||
min_date: datetime, max_date: datetime,
|
||||
processed: Dict[str, DataFrame],
|
||||
*args, **kwargs) -> float:
|
||||
"""
|
||||
Objective function, returns smaller number for better results
|
||||
|
Reference in New Issue
Block a user