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:
Return type:

None

Methods

__init__(parameters, result_path, results, ...)

determine_result_path(result_path, parameters)

Generate result path or use the exiting.

get_cached_count()

How many of the results were directly read from the disk and not calculated on this run.

get_combination_count()

How many combinations we searched in this optimiser run.

get_failed_count()

How many backtest runs failed with an exception.

get_filtered_count()

How many of the results were filtered out by result filter.

get_results_as_grid_search_results()

Get all search results as grid search results list for the analysis.

is_empty()

The optimiser run generated zero results.

Attributes

parameters

The parameters we searched

result_path

results

Different grid search results

indicator_storage

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.

is_empty()[source]#

The optimiser run generated zero results.

Return type:

bool

static determine_result_path(result_path, parameters)[source]#

Generate result path or use the exiting.

Parameters:
Return type:

Path

get_combination_count()[source]#

How many combinations we searched in this optimiser run.

Return type:

int

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:

list[tradeexecutor.backtest.grid_search.GridSearchResult]

get_cached_count()[source]#

How many of the results were directly read from the disk and not calculated on this run.

Return type:

int

get_failed_count()[source]#

How many backtest runs failed with an exception.

Return type:

int

get_filtered_count()[source]#

How many of the results were filtered out by result filter.

See perform_optimisation()

Return type:

int

__init__(parameters, result_path, results, indicator_storage)#
Parameters:
Return type:

None