Inspiration

We noticed that many algorithmic traders and researchers struggle with Python’s speed limitations when working with millions of ticks. We wanted to build a tool that combines the raw performance of C++ with the usability of Python, so quants can run fast backtests and simulations without worrying about performance bottlenecks.

What it does

Our project provides a Python API backed by a C++ engine that ingests tick-level data at very high rates, maintains a rolling window of the most recent ticks, and computes statistics like mean, standard deviation, min, max, and VWAP in constant time. Traders can query these features instantly to train models, test strategies, or simulate live conditions.

How we built it

We designed a lock-free SPSC ring buffer in C++ for ingestion, a rolling window to always keep the last N ticks, and a stats module to compute metrics efficiently. We then exposed this engine to Python using pybind11 and built the package with scikit-build-core. Finally, we tested ingestion via a CSV file and validated results in Python.

Challenges we ran into • Understanding and correctly using atomics and memory order in C++. • Getting the Python bindings to work (packaging with pyproject.toml, CMake, scikit-build-core). • Deciding on a practical data ingestion format that would be useful to traders (CSV/DataFrames vs. live feeds).

Accomplishments that we’re proud of • We built a real-time rolling stats engine that runs in C++ and integrates seamlessly into Python. • Achieved constant-time feature access even while ingesting thousands of ticks per second. • Learned how to connect low-level systems programming with high-level data science workflows.

What we learned • How lock-free data structures like ring buffers work in practice and why they’re important for high-frequency trading. • How to package and distribute a C++/Python hybrid library. • The importance of designing for both performance and usability — traders want simple Python calls, even if the engine is complex inside.

What’s next for QuantDev API • Add time-based windows in addition to tick-based windows. • Support for multi-symbol ingestion, so strategies can compute stats across many assets at once. • Adapters for live data feeds (WebSocket, broker APIs) so the engine can be used in live or paper trading setups.

Built With

Share this project:

Updates