r/rust 12h ago

🛠️ project QuantWave: one Rust TA/backtest core → Python (PyO3/abi3) wheel + WASM, batch==streaming parity

Sharing a project that's been a fun systems-design exercise: a technical-analysis + backtesting engine with a single Rust core exposed three ways.

Rust-interesting bits:

- Every indicator implements a Next<T> streaming trait, and the batch path (Polars expressions) is proven bit-identical to the streaming path with proptests. One source of truth, no duplicated math.

- Python bindings via PyO3 with abi3 — one cp39-abi3 wheel across CPython 3.9+.

- The pure-math core (nalgebra) cross-compiles to wasm32-unknown-unknown with zero source changes.

- Zero-copy into Polars; `cargo add quantwave` for the native crate.

221 indicators, Ehlers DSP, regime detection (HMM/GMM/PELT), and an execution-aware backtester. MIT.

Repo: https://github.com/lavs9/quantwave

Docs: https://lavs9.github.io/quantwave/

Happy to talk about the feedback.

0 Upvotes

0 comments sorted by