Getting started
Install fbtf and run your first minimal backtest.
Getting started
Install
fbtf is ESM-only and targets Node 20+.
Minimal usage
What this example is doing
normalizeBars()turns simple input records into canonical bars with a market id and parsed timeframe.defineStrategy()gives the runner a deterministic decision function.createHistoricalFeed()replays the bars in order.createPaperBroker()handles fills, positions, and account state.createRunner()ties the strategy, market, feed, and broker together.
That is the core shape of the library. Most of the rest of the API is there to help you prepare inputs, inspect outputs, or run the same model through a config-driven experiment workflow.
What to expect from the first release
- a small root package surface
- explicit subpaths for data, markets, results, risk, and experiments
- deterministic bar-driven behavior
- futures-first practical examples
What you should not expect yet:
- real-money execution
- tick-level simulation
- a huge built-in strategy framework
- a multi-asset portfolio product
Next steps
- learn the core concepts
- see the runtime flow
- inspect the API overview
- read about data and markets
- use the config-first CLI workflow
fbtf docs
Deterministic backtesting and live paper trading docs for TypeScript.
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.
Experiments and CLI
Run experiment modules through the config-first fbtf CLI.
Roadmap
What FBTF is trying to finish next and what is intentionally out of scope.