OptimiserSearchResult#

API documentation for tradeexecutor.backtest.optimiser.OptimiserSearchResult Python class in Trading Strategy framework.

class OptimiserSearchResult[source]#

Bases: object

Single optimiser search result value.

This is used in different contextes

__init__(value, negative, combination=None, result=None, filtered=False, iteration_duration=None, iteration=None)#
Parameters:
Return type:

None

Methods

__init__(value, negative[, combination, ...])

get_metrics_persistent_size()

Get the size of stored metrics.

get_original_value()

Get the original best search value.

get_state_size()

Get the size of stored state.

hydrate()

Load the grid search result data for this result from the disk.

is_valid()

Could not calculate a value.

Attributes

value

The raw value of the search function we are optimising

negative

Did we flip this value to negative because we are looking for a minimised result

combination

For which grid combination this result was

result

Call hydrate() to make this data available.

filtered

Did we filter out this result

iteration_duration

How long it took to run this iteration

iteration

Iteration id

value: float#

The raw value of the search function we are optimising

negative: bool#

Did we flip this value to negative because we are looking for a minimised result

combination: tradeexecutor.backtest.grid_search.GridCombination | None#

For which grid combination this result was

This is the key to load the child worker produced data from the disk in the parent process

result: tradeexecutor.backtest.grid_search.GridSearchResult | None#

Call hydrate() to make this data available.

filtered: bool#

Did we filter out this result

See result_filter in perform_optimisation()

iteration_duration: datetime.timedelta | None#

How long it took to run this iteration

Filled by main thread

iteration: int#

Iteration id

Filled by main thread

get_original_value()[source]#

Get the original best search value.

  • Flip off the extra minus sign if we had to add it

Return type:

float

hydrate()[source]#

Load the grid search result data for this result from the disk.

is_valid()[source]#

Could not calculate a value.

Return type:

bool

get_metrics_persistent_size()[source]#

Get the size of stored metrics.

Return type:

int

get_state_size()[source]#

Get the size of stored state.

Return type:

int

__init__(value, negative, combination=None, result=None, filtered=False, iteration_duration=None, iteration=None)#
Parameters:
Return type:

None