GridCombination#
tradeexecutor.backtest.grid_search.GridCombination Python class in Trading Strategy framework.
- class GridCombination[source]#
Bases:
object
One combination line in grid search.
- __init__(index, result_path, parameters)#
- Parameters:
index (int) –
result_path (Path) –
parameters (Tuple[GridParameter]) –
- Return type:
None
Methods
__init__
(index, result_path, parameters)as_dict
()Get as kwargs mapping.
Open parameters dict.
Get the path where the resulting state file is stored.
Human readable label for this combination
Get the path where the resulting state file is stored.
validate
()Check arguments can be serialised as fs path.
Attributes
How many of nth grid combinations this is
In which folder we store the result files of all grid search runs
Alphabetically sorted list of parameters
- result_path: Path#
In which folder we store the result files of all grid search runs
Each individual combination will have its subfolder based on its parameter.
- parameters: Tuple[GridParameter]#
Alphabetically sorted list of parameters
- get_relative_result_path()[source]#
Get the path where the resulting state file is stored.
Try to avoid messing with 256 character limit on filenames, thus break down as folders.
- Return type:
- destructure()[source]#
Open parameters dict.
This will return the arguments in the same order you pass them to
prepare_grid_combinations()
.
- __init__(index, result_path, parameters)#
- Parameters:
index (int) –
result_path (Path) –
parameters (Tuple[GridParameter]) –
- Return type:
None