ExperimentConfig
Complete configuration for a single backtest experiment.
Enum-valued settings accept both their enum variant and plain strings.
| Attributes |
general : GeneralExpConfig
Experiment name, tags and description.
data : DataExpConfig
Instrument type, symbols, date range and interval.
portfolio : PortfolioExpConfig
Initial cash, base currency and starting positions.
strategy : StrategyExpConfig
Strategies and benchmark to use in this experiment.
indicators : IndicatorExpConfig
Indicators to use in this experiment.
exchange : ExchangeExpConfig
Commission, slippage, order execution, margin and short-selling.
engine : EngineExpConfig
Warmup, timing and data-handling policies.
|
See Also
Methods
| to_dict | Convert the experiment configuration to a nested dictionary. |
| from_dict | Build an `ExperimentConfig` from a (possibly nested) dictionary. |
| to_toml | Serialise the configuration to a TOML string. |
| from_toml | Build an `ExperimentConfig` from a TOML string. |
Convert the experiment configuration to a nested dictionary.
| Returns |
dict
Self as dict.
|
Build an ExperimentConfig from a (possibly nested) dictionary.
The dict may use the same nested structure produced by to_toml
(with general, data, portfolio, etc. sections) or
a flat key-value mapping. Missing keys silently fall back to defaults.
| Parameters |
Source dictionary.
|
| Returns |
self
The created instance.
|
Serialise the configuration to a TOML string.
The output is grouped into [general][general], [data][data],
[portfolio][portfolio], [strategy][strategy], [indicators][indicators],
[exchange][exchange] and [engine][engine] sections.
| Returns |
str
TOML representation of the config.
|
Build an ExperimentConfig from a TOML string.
| Parameters |
TOML document.
|
| Returns |
self
The created instance.
|