Measured results, not marketing claims. Detailed benchmarks will be published alongside the v1.0 release.
Head-to-head comparison across core backtest operations.
| Metric | Python | StratForge | Improvement |
|---|---|---|---|
| Single Indicator (per bar) | TBD | TBD | TBD |
| Strategy Step | TBD | TBD | TBD |
| Full Backtest (1M bars) | TBD | TBD | TBD |
| Throughput | TBD | TBD | TBD |
| Memory Footprint | TBD | TBD | TBD |
How StratForge compounds optimizations across the backtest pipeline.
Bars are stored in cache-friendly columnar buffers. Indicator computations stream through contiguous memory rather than chasing pointers.
Each indicator maintains internal state and updates in O(1) per bar. No sliding-window recomputation.
Strategy entry/exit logic is rewritten as branchless arithmetic where possible to avoid pipeline stalls on price-conditional code.
Indicator parameters known at compile time become consteval. Specialized templates eliminate runtime dispatch.
Running a backtest pass on the hot path.
| Operation | Python Backtester | StratForge |
|---|---|---|
| Heap Allocations | Many (per-bar Python objects) | 0 |
| Bar Storage | pandas DataFrame copies | std::span views into columnar buffer |
| Indicator State | Per-call array allocation | Pre-allocated rolling state |
| Memory Footprint | Dynamic, GC-driven | Static, pre-allocated |
| Determinism | Floating-point drift across runs | Bit-exact reproducible |
Design decisions that compound to deterministic, low-latency backtesting.
| Technique | Python Backtester | StratForge |
|---|---|---|
| Memory Layout | Row-oriented (DataFrame) | Columnar (cache-friendly) |
| Indicator Updates | Recompute window each call | Incremental O(1) per bar |
| Loop Dispatch | Interpreted Python loop | Inlined C++ template loop |
| Numerical Determinism | NumPy / pandas-version dependent | Bit-exact across runs |
| Strategy Composition | Class hierarchy + dynamic dispatch | Concepts + static polymorphism |
| Error Handling | Exceptions | std::expected (no throw) |
Industry-leading libraries and frameworks studied during StratForge's design.
| Library | What We Learned | What We Built | Result |
|---|---|---|---|
| TA-Lib | Canonical indicator definitions and edge-case handling | C++23 header-only indicator library | 138+ indicators |
| vectorbt | Vectorized backtest API and parameter sweeps | Templated parameter expansion at compile time | TBD |
| backtrader | Strategy lifecycle and event hooks | Concept-driven strategy interface | Type-safe lifecycle |
| QuantLib | Modular pricing and analytics architecture | Pluggable analytics modules | TBD |
| Eigen | Expression templates for zero-overhead math | Lazy indicator composition | No temporary buffers |
| Arrow | Columnar memory layout standards | Native columnar bar storage | Cache-line friendly |
| Folly | Lock-free primitives and small_vector | Pre-allocated trade journals | TBD |
| Highway | Portable SIMD abstraction | SIMD-friendly indicator inner loops | TBD |
| fmt | Compile-time format strings | Zero-cost report formatting | TBD |
| Boost.PMR | Monotonic buffer for arena allocation | std::pmr::monotonic_buffer_resource pool | Zero heap allocation |
| Catch2 | BDD-style indicator unit tests | Bit-exact regression suite | Reproducible CI |
Three commands to clone and start backtesting.
git clone https://github.com/StratCraftsAI/StratForge.git
cd StratForge
./start.sh build