Experiments and CLI
Run experiment modules through the config-first fbtf CLI.
Experiments and CLI
Experiment modules
For CLI-driven runs, export a default experiment created with defineExperiment from @thecommandcat/fbtf/experiment.
An experiment module is the bridge between a reusable runner configuration and a repeatable local run. It is the right place to wrap a market, strategy, feed, and broker into one named unit.
Run config
The CLI expects one required config file.
This keeps the CLI flow simple: one file points at one experiment module and provides the run inputs in one place.
Run it
In practice this is useful when you want a repeatable local run that does not depend on remembering a pile of flags.
Repo examples
The repository keeps a very small curated example set:
examples/01-minimal-backtest.tsexamples/03-cost-slippage-comparison.tsexamples/07-minimal-experiment.tsexamples/09-databento-ema-bracket.ts
These examples live in the repo and are not shipped in the npm tarball.
When to use experiments
Use experiment modules when:
- you want repeatable local runs
- you want config-driven variation without rewriting the module
- you want a clean boundary between library API usage and runnable example workflows
Use the direct library API when:
- you are embedding
fbtfinside another application - you do not need the CLI workflow
- you want total control over orchestration in code
fbtf docs
Deterministic backtesting and live paper trading docs for TypeScript.
Getting started
Install fbtf and run your first minimal backtest.
Core concepts
Understand the runtime model behind fbtf.
Runtime flow
How feeds, strategies, brokers, and the runner interact during execution.
API overview
Learn the main entrypoints and useful subpaths.
Data and markets
Prepare inputs, define markets, and use adapter-based data loading.
Results and diagnostics
Inspect what happened after a run and understand how the runtime explains itself.
Roadmap
What FBTF is trying to finish next and what is intentionally out of scope.