Backtesting Engine

StratForge

High-performance C++23 backtesting engine.
138+ built-in indicators with vectorized execution on the hot path.

Performance at a Glance

Benchmark numbers will be published with the v1.0 release.

TBD
Indicator Latency
TBD
Faster Than Python
138+
Built-in Indicators
0
Heap Allocations on Hot Path

Core Capabilities

Built for fast, reproducible quantitative research with modern C++ best practices.

Zero-Allocation Hot Path

Pre-allocated indicator buffers and arena allocators eliminate GC pauses. Consistent latency across millions of bars.

138+ Built-in Indicators

Header-only indicator library covering trend, momentum, volatility, volume, and statistical primitives. Composable and SIMD-friendly.

Production-Ready Strategies

Reference implementations of dual moving average, Bollinger bands, MACD, Turtle, R-Breaker and more. Ready to extend.

Deterministic Backtests

Bit-exact reproducibility across runs. No hidden randomness, no platform drift — same input, same output.

Modern C++23

std::expected for error handling, std::span for zero-copy views, concepts for compile-time validation, consteval lookup tables.

Header-Only API

Drop-in include path. No build system gymnastics. Compose indicators and strategies with template-driven generic code.

How It Works

1

Load & Index

Bar data is loaded into pre-allocated columnar buffers and indexed for O(1) access by timestamp or position.

2

Compute & Evaluate

Indicators are computed incrementally per bar. Strategy logic evaluates exits/entries against indicator state with branchless decision paths.

3

Report & Persist

Trades, equity curves, and performance metrics are streamed into pre-allocated report buffers and exported deterministically.

Get Started with StratForge

MIT licensed. Header-only library. Drop into your existing C++ project with zero friction.