GridParameter#

API documentation for tradeexecutor.backtest.grid_search.GridParameter Python class in Trading Strategy framework.

class GridParameter[source]#

Bases: object

One value in grid search matrix.

__init__(name, value, single, optimise=False)#
Parameters:
  • name (str) –

  • value (Any) –

  • single (bool) –

  • optimise (bool) –

Return type:

None

Methods

__init__(name, value, single[, optimise])

get_computable_value()

Handle use of rounded Decimals in optimiser.

is_searchable()

to_path()

Attributes

optimise

Is this parameter a search space point in an optimiser

name

Name e.g.

value

Value e.g 0.8

single

Was this parameter part of the grid search space, or is it a single parameter.

name: str#

Name e.g. rsi_low

value: Any#

Value e.g 0.8

single: bool#

Was this parameter part of the grid search space, or is it a single parameter.

Also true for empty lists

optimise: bool = False#

Is this parameter a search space point in an optimiser

get_computable_value()[source]#

Handle use of rounded Decimals in optimiser.

Return type:

float | int | bool | str

__init__(name, value, single, optimise=False)#
Parameters:
  • name (str) –

  • value (Any) –

  • single (bool) –

  • optimise (bool) –

Return type:

None