SearchResult#
API documentation for tradeexecutor.backtest.optimiser.SearchResult Python class in Trading Strategy framework.
- class SearchResult[source]#
Bases:
object
Single optimiser search result value.
This is used in different contextes
Return value from
SearchFunction
Passing data from child worker to the parent process
Passing data from
perform_optimisation()
to the notebook
- __init__(value, negative, combination=None, result=None, filtered=False)#
- Parameters:
value (float) –
negative (bool) –
combination (Optional[GridCombination]) –
result (Optional[GridSearchResult]) –
filtered (bool) –
- Return type:
None
Methods
__init__
(value, negative[, combination, ...])Get the original best search value.
hydrate
()Load the grid search result data for this result from the disk.
is_valid
()Could not calculate a value.
Attributes
The raw value of the search function we are optimising
Did we flip this value to negative because we are looking for a minimised result
For which grid combination this result was
Call
hydrate()
to make this data available.Did we filter out this 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()
- get_original_value()[source]#
Get the original best search value.
Flip off the extra minus sign if we had to add it
- Return type:
- __init__(value, negative, combination=None, result=None, filtered=False)#
- Parameters:
value (float) –
negative (bool) –
combination (Optional[GridCombination]) –
result (Optional[GridSearchResult]) –
filtered (bool) –
- Return type:
None