Skip to content

run-study


command run-study

Run a parameter study defined in a configuration file.

Reads a .toml, .yaml/.yml, or .json file containing a config mapping with the shared experiment settings and a study mapping with the parameter sweep. Every candidate is run and persisted under one study record. Optional walk-forward validation selects candidates on training windows and evaluates them on the test windows that follow.

Read more in the study guide.

Parameters

config : Path

Path to a study configuration. The top-level config field accepts an ExperimentConfig. The top-level study field accepts parameter_space, optional saved strategy, min_trades, max_drawdown, and optional walk_forward settings.

--log_level, -l : str, default="warn"
Minimum log level to emit. Choose from: error, warn, info or debug.

--verbose/--no-verbose, -v : bool, default=True
Whether to display progress while the study is running.


See Also

Study

Run a study with a parameter sweep and optional walk-forward validation.

run-experiment

Run a backtest experiment defined in a configuration file.

launch

Launch the Backtide UI in a local web browser.


Example

Create study.toml using the name of one saved strategy:

[config]
metrics = ["sharpe"]

[config.general]
name = "SMA parameter study"

[config.data]
symbols = ["SPY"]
full_history = false
start_date = "2012-01-01"
end_date = "2025-12-31"

[config.strategy]
strategies = ["My SMA strategy"]

[study]
min_trades = 30
max_drawdown = 0.25

[study.parameter_space]
fast = [10, 20, 30]
slow = [100, 150, 200]

[study.walk_forward]
training_days = 1095
test_days = 365

Run the study:

backtide run-study study.toml