contango.strategy.rule_based.cartesian_search
contango.strategy.rule_based.cartesian_search
cartesian_search
cartesian_search(strategy_cls: Type[StrategyT], param_grid: Mapping[str, Sequence[Any]]) -> Iterator[tuple[Callable[[], StrategyT], dict[str, Any]]]
Generates every parameter combination for a strategy class.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
strategy_cls
|
Type[StrategyT]
|
The strategy to perform a Cartesian search on. |
required |
param_grid
|
Mapping[str, Sequence[Any]]
|
A mapping of strings to sequences of values to be tested and parameterized into the strategy cls. |
required |
Yields:
| Type | Description |
|---|---|
Callable[[], StrategyT]
|
A tuple of |
dict[str, Any]
|
constructs |
Source code in src\contango\strategy\rule_based\cartesian_search.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |