Performance Benchmarks

Measured results, not marketing claims. Detailed benchmarks will be published alongside the v1.0 release.

StratForge vs Python Backtesters

Head-to-head comparison across core backtest operations.

MetricPythonStratForgeImprovement
Single Indicator (per bar)TBDTBDTBD
Strategy StepTBDTBDTBD
Full Backtest (1M bars)TBDTBDTBD
ThroughputTBDTBDTBD
Memory FootprintTBDTBDTBD

Optimization Journey

How StratForge compounds optimizations across the backtest pipeline.

Phase 1: Columnar Bar StorageTBD

Bars are stored in cache-friendly columnar buffers. Indicator computations stream through contiguous memory rather than chasing pointers.

Phase 2: Incremental IndicatorsTBD

Each indicator maintains internal state and updates in O(1) per bar. No sliding-window recomputation.

Phase 3: Branchless Decision PathsTBD

Strategy entry/exit logic is rewritten as branchless arithmetic where possible to avoid pipeline stalls on price-conditional code.

Phase 4: Compile-Time SpecializationTBD

Indicator parameters known at compile time become consteval. Specialized templates eliminate runtime dispatch.

Zero Allocation Proof

Running a backtest pass on the hot path.

OperationPython BacktesterStratForge
Heap AllocationsMany (per-bar Python objects)0
Bar Storagepandas DataFrame copiesstd::span views into columnar buffer
Indicator StatePer-call array allocationPre-allocated rolling state
Memory FootprintDynamic, GC-drivenStatic, pre-allocated
DeterminismFloating-point drift across runsBit-exact reproducible

Technique Comparison

Design decisions that compound to deterministic, low-latency backtesting.

TechniquePython BacktesterStratForge
Memory LayoutRow-oriented (DataFrame)Columnar (cache-friendly)
Indicator UpdatesRecompute window each callIncremental O(1) per bar
Loop DispatchInterpreted Python loopInlined C++ template loop
Numerical DeterminismNumPy / pandas-version dependentBit-exact across runs
Strategy CompositionClass hierarchy + dynamic dispatchConcepts + static polymorphism
Error HandlingExceptionsstd::expected (no throw)

Architecture Influences

Industry-leading libraries and frameworks studied during StratForge's design.

LibraryWhat We LearnedWhat We BuiltResult
TA-LibCanonical indicator definitions and edge-case handlingC++23 header-only indicator library138+ indicators
vectorbtVectorized backtest API and parameter sweepsTemplated parameter expansion at compile timeTBD
backtraderStrategy lifecycle and event hooksConcept-driven strategy interfaceType-safe lifecycle
QuantLibModular pricing and analytics architecturePluggable analytics modulesTBD
EigenExpression templates for zero-overhead mathLazy indicator compositionNo temporary buffers
ArrowColumnar memory layout standardsNative columnar bar storageCache-line friendly
FollyLock-free primitives and small_vectorPre-allocated trade journalsTBD
HighwayPortable SIMD abstractionSIMD-friendly indicator inner loopsTBD
fmtCompile-time format stringsZero-cost report formattingTBD
Boost.PMRMonotonic buffer for arena allocationstd::pmr::monotonic_buffer_resource poolZero heap allocation
Catch2BDD-style indicator unit testsBit-exact regression suiteReproducible CI

Ready to Try StratForge?

Three commands to clone and start backtesting.

git clone https://github.com/StratCraftsAI/StratForge.git cd StratForge ./start.sh build