◆ Overview⚡ Benchmarks◇ Q&A◬ News
v1.0-rc · MIT · header-only
Backtesting Engine · C++23 · header-only

StratForge.
The hot path, forged.

A C++23 backtesting engine with 138 built-in indicators.
No reproducible measurement results or Python comparison are published yet. The previous development targets and placeholder comparisons have been withdrawn until a versioned run and method are available.

Core capabilities.

Built for fast, reproducible quantitative research with modern C++ best practices, with the discipline to leave nothing on the heap.

138 built-in indicators.

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

Production-ready reference strategies.

Dual MA, Bollinger Bands, MACD, Turtle, R-Breaker and more. Ship-shape implementations you can drop in, fork, or extend.

DualMABollingerMACDTurtleR-Breaker+12

Deterministic backtests.

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

SHA-256run_001 ≡ run_002cross-OS verified

Modern C++23.

std::expected for error handling, std::span for zero-copy views, concepts for compile-time validation, consteval lookup tables. The hot path, written in the language it deserves.

// compile-time validated
template<Indicator I>
auto compose(std::span<const Bar>) -> std::expected<R,E>;

Header-only API.

Drop-in include path. No build-system gymnastics, no link-time surprises. Compose indicators and strategies with template-driven generic code.

#include <stratforge.hpp>
// that's it. no CMake, no linker. just compile.

How it works.

Three stages, one event loop. Each stage owns its memory and never reaches back across the boundary.

1 Stage 1 · Load & index

Bars in, columns aligned.

Bar data is loaded into pre-allocated columnar buffers and indexed for O(1) access by timestamp or position. No surprise copies, just std::span everywhere.

columnarmmapstd::spanO(1) seek
2 Stage 2 · Compute & evaluate

Indicators tick, strategy decides.

Indicators compute incrementally per bar. Strategy logic evaluates entries and exits against indicator state through branchless decision paths.

incrementalbranchlessSIMD-readyconsteval
3 Stage 3 · Report & persist

Trades and curves, streamed out.

Trades, equity curves, and performance metrics are streamed into pre-allocated report buffers and exported deterministically to Parquet, CSV, or your sink of choice.

ParquetCSVJSONdeterministic

Reference strategies, ready to fork.

Production-quality implementations of the classics. Drop one in, replace the parameters, ship.

▣ TREND

Dual Moving Average

◇ MEAN-REV

Bollinger Bands

∿ MOMENTUM

MACD

▲ BREAKOUT

Turtle

◬ INTRADAY

R-Breaker

Dive deeper.

Two threads to pull on next: the benchmark deep dive, or the live Q&A with the engine authors.

Get started with StratForge.

MIT licensed, header-only, and ready to drop into your existing C++ project. No build-system tax, no runtime dependencies. Just a header and a compiler that understands C++23.

MIT licensed header-only C++23 · clang ≥ 17 · gcc ≥ 13 Win · macOS · Linux

Explore other projects.

StratForge is one of three engines in the StratCraft suite. Same philosophy: open-source where possible, performance-first, no lock-in.