run_experiment
function backtide.backtest.run_experiment(config=None, verbose=True, **kwargs)[source]
Run a backtest experiment with the provided configuration.
Performs the full pipeline end-to-end:
- Resolves and downloads the required market data (skipped if already present in the database).
- Computes indicators over the entire dataset.
- Runs every strategy in parallel. Each strategy has its own independent portfolio, order book and equity curve.
- Persists the results into the database.
Read more in the user guide.
| Parameters |
config : ExperimentConfig | None = None
The complete experiment configuration. If
verbose : bool, default=TrueNone, the configuration
must be provided through kwargs. Missing parameters are filled with
the default values.
Whether to display a progress bar while running.
**kwargs
Any combination of:
The
Keyword arguments take precedence over the corresponding fields in the
|
| Returns |
The aggregated result of the run.
|
Example
>>> from backtide.backtest import run_experiment
>>> from backtide.strategies import BuyAndHold
>>> result = run_experiment(
... name="Apple and Microsoft",
... symbols=["AAPL", "MSFT"],
... interval="1d",
... strategies=[BuyAndHold()],
... )
>>> print(result)
ExperimentResult(id="e647e8b213b44f6e", name="Apple and Microsoft", status="Success", n_strategies=1)