Promotion is the process of taking a strategy that has been written, verified, and backtested in Python and compiling it into the C++20 core that powers the QuanuX spreader. The pipeline moves through three stages: Python prototype, Cython bridge, and native C++ execution logic. Each stage produces a verifiable artifact, and no stage can be skipped. This page explains how each stage works, what the Foundry generates at each step, and what you need to have in place before C++ promotion becomes available.Documentation Index
Fetch the complete documentation index at: https://docs.quanux.org/llms.txt
Use this file to discover all available pages before exploring further.
The three-stage pipeline
Python — Your strategy lives inserver/strategies/ and inherits from the StrategyComponent base classes. This is the research layer. It has full access to pandas, numpy, and the broader Python data science ecosystem.
Cython — The Foundry generates a .pyx file with typed C++ declarations and a PyStrategyWrapper class that bridges Python calls into the C++ InjectionStub interface. The Cython extension compiles into a shared object that Crucible loads directly. This is the current stable promotion target.
C++ — The Foundry generates a native C++20 header and implementation conforming to the spreader’s InjectionStub contract. The compiled artifact runs inside the spreader’s Core 3 execution thread with no Python interpreter in the path. This target is in active development.
Anaconda environment management
QuanuX is the first quantitative trading platform to offer an official Conda channel. Anaconda is the recommended way to manage the boundary between Python research and C++ execution, because it lets you maintain separate, tightly controlled environments for each stage without dependency conflicts. Install QuanuX into Conda:quanuxctl.
Submitting a forge request targeting C++
The Foundry forge request is the same regardless oftarget_lang. The following example requests a C++ artifact for a spread strategy:
Response
InjectionStub interface. The generated calculate method maps directly onto the CLZ4_CLF5_Spread.json logic gates:
CLZ4_CLF5_Spread_injected.hpp (generated)
server/spreader-strategies/CLZ4_CLF5_Spread_wrapper.pyx exposes this to Python for Crucible backtesting:
CLZ4_CLF5_Spread_wrapper.pyx
Git-as-Governance requirement
Before any strategy can be loaded by the live spreader, the following conditions must all be true:- The strategy artifact (
.hpp,.pyx, or.py) is committed to the repository. - The commit is cryptographically signed (
git commit -S). - The SHA-256 of the artifact on disk matches the hash recorded in the signed commit.
STATE_HALT signal. This is a hard rule enforced by the Ritchie FSM — it cannot be bypassed.
Promotion checklist
Before promoting a strategy to the live spreader, confirm each of the following:- Python strategy passes unit tests in
server/strategies/ - Foundry forge request completed (
job_idreturnedaccepted) -
POST /api/foundry/verifyconfirms equivalence between Python and generated code - Crucible backtest passes with acceptable MAE, MFE, and latency slippage metrics
- All generated artifacts committed with a signed commit
- SHA-256 of artifacts on disk matches the signed commit hash