OptimiserResult#
API documentation for tradeexecutor.backtest.optimiser.OptimiserResult Python class in Trading Strategy framework.
- class OptimiserResult[source]#
Bases:
object
The outcome of the optimiser run.
Contains all the grid search results we generated during the run
- __init__(parameters, result_path, results, indicator_storage)#
- Parameters:
parameters (StrategyParameters) –
result_path (Path) –
results (list[tradeexecutor.backtest.optimiser.OptimiserSearchResult]) –
indicator_storage (DiskIndicatorStorage) –
- Return type:
None
Methods
__init__
(parameters, result_path, results, ...)determine_result_path
(result_path, parameters)Generate result path or use the exiting.
How many of the results were directly read from the disk and not calculated on this run.
How many combinations we searched in this optimiser run.
How many backtest runs failed with an exception.
How many of the results were filtered out by result filter.
Get all search results as grid search results list for the analysis.
is_empty
()The optimiser run generated zero results.
Attributes
The parameters we searched
result_path
Different grid search results
Where did we store precalculated indicator files.
- parameters: StrategyParameters#
The parameters we searched
Both fixed and search space.
- results: list[tradeexecutor.backtest.optimiser.OptimiserSearchResult]#
Different grid search results
Sortd from the best to the worst.
- indicator_storage: DiskIndicatorStorage#
Where did we store precalculated indicator files.
Allows to peek into raw indicator data if we need to.
- static determine_result_path(result_path, parameters)[source]#
Generate result path or use the exiting.
- Parameters:
result_path (pathlib.Path | None) –
parameters (StrategyParameters) –
- Return type:
- get_combination_count()[source]#
How many combinations we searched in this optimiser run.
- Return type:
- get_results_as_grid_search_results()[source]#
Get all search results as grid search results list for the analysis.
Any results that are marked as filtered away are not returned
- Return type:
- get_cached_count()[source]#
How many of the results were directly read from the disk and not calculated on this run.
- Return type:
- get_filtered_count()[source]#
How many of the results were filtered out by result filter.
- Return type:
- __init__(parameters, result_path, results, indicator_storage)#
- Parameters:
parameters (StrategyParameters) –
result_path (Path) –
results (list[tradeexecutor.backtest.optimiser.OptimiserSearchResult]) –
indicator_storage (DiskIndicatorStorage) –
- Return type:
None