Explore parameter ranges
Run fast/slow window sweeps from a Python-facing interface. Invalid fast-at-or-above-slow combinations are excluded.
A developer-focused backtesting engine that pairs a C++20 core with Python workflows and an optional CUDA build path for quantitative research on historical market data.
Early-stage engineering project · CPU fallback verified on macOS Apple Silicon · GPU validation remains in progress
MochaTrade focuses on the compute layer of strategy research: prepare historical data, explore parameter ranges, and inspect results with execution assumptions made explicit.
Run fast/slow window sweeps from a Python-facing interface. Invalid fast-at-or-above-slow combinations are excluded.
Configure latency, bid-ask spread or slippage, and transaction fees or commission when evaluating a strategy.
Review total P&L, Sharpe ratio, maximum drawdown, trade count, and win rate. These are backtest statistics, not a promise of live performance.
A shared engine interface supports CPU development and a separate CUDA-enabled build path. The project documents NumPy inputs through nanobind and a Structure of Arrays data layout. Input data is copied into unified memory; the Python-to-engine handoff is not zero-copy.
An N+1 execution lock is intended to enforce temporal barriers and help reduce look-ahead bias. CPU and GPU output equivalence remains a validation goal.
The project records CPU fallback verification on macOS Apple Silicon. The following engineering work is still open.
If a language-model integration is added, it could help draft a parameter-sweep configuration for review, summarize result tables, or explain configuration and test output. There is no Claude integration today, and any generated research suggestions would need independent validation. The engine does not make live trading or investment decisions.
Backtesting has limitations. Results depend on data quality and assumptions about timing, costs, liquidity, and market impact. This project does not include live order execution, portfolio construction, risk management, or compliance controls.
Browse the implementation, build notes, test suite, and GPU validation guides in the public repository.
Open the GitHub repository