A QuanuX strategy moves through a defined sequence of stages before it can run on a live execution node. You start in Python—where iteration is fast and the full data science ecosystem is available—then move through backtesting, AI-assisted C++ generation, and deterministic verification before deployment. No strategy can skip the final step: every binary that runs on the C++ core must carry a SHA-256 hash that matches a signed Git commit. This is not a policy you configure; it is enforced at the hardware level by the Sovereign Sentinel.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 full lifecycle
Prototype in Python
Write and iterate on your strategy logic in Python using the standard QuanuX Anaconda environment. The Anaconda channel (Use the QuanuX Python API to connect your prototype to live or historical market data and validate your signal logic before investing time in compilation.
conda install quanux) provides tight package management and serves as the source of truth for dependencies. At this stage you have access to the full data science stack—NumPy, Pandas, PyTorch, and any other packages in your Conda environment.Backtest with Crucible
Once your prototype signal looks promising, run it through the Crucible backtesting engine. Crucible uses TSC-injection to feed the same C++ engine object code historical Databento L3 packet timestamps—the engine’s internal state machine replays sessions with zero behavioral drift from the live path.Monitor progress with
quanuxctl crucible status and pull the metrics report with quanuxctl crucible report my_strategy. Because the backtest and live engine share the same compiled code path, there is no sim-to-live drift in execution behavior.Forge: AI-assisted C++ generation
The Foundry Forge translates your strategy intent into high-performance C++ (or Cython) via an AI generation pipeline. You describe the component you want—an indicator, entry logic, exit logic, or a complete strategy—and the Forge dispatches a job over NATS to the AI generation backend.POST The API returns a The
/api/foundry/forgejob_id immediately. The generation runs asynchronously over the NATS subject sys.foundry.request.forge.component_type field accepts: indicator, entry, exit, or strategy. The target_lang field accepts: python, cython, or cpp.Verify mathematical equivalence
Before the generated C++ can be deployed, it must pass the Foundry’s deterministic sandbox—a mathematical equivalence test that confirms the compiled logic produces identical outputs to your Python prototype.POST Like the forge step, verification is asynchronous and returns a
/api/foundry/verifyjob_id. The sandbox publishes results over the NATS subject sys.foundry.request.verify.Sign and commit (Git-as-Governance)
After verification passes, you commit the generated strategy to your repository with a GPG-signed commit. QuanuX extracts the SHA-256 hash of this commit and records it in the Forge audit log.No strategy binary can run on the C++ core unless its hash matches a record in this log. The Sovereign Sentinel enforces this at the hardware level: if
invoke_hot_swap is called with a binary whose hash does not match a verified, signed commit, the Sentinel keeps the risk_interlock in STATE_HALT. There is no administrative bypass.This replaces traditional “who authorized this?” audit trails with mathematical certainty—the commit history is the authorization record.Deploy to execution node
Once the commit is signed and recorded, deploy the strategy to your execution node using Confirm the engine is live:
quanuxctl nest drop with the updated engine payload. The engine compiles natively on the edge node and the Sovereign Sentinel lifts the interlock once it confirms hash parity.API reference summary
POST /api/foundry/forge
Initiates AI code generation for a strategy component. Accepts
component_type, name, target_lang, and an optional natural-language prompt. Returns a job_id for tracking the async job over NATS.POST /api/foundry/verify
Triggers the deterministic sandbox to verify mathematical equivalence between the generated C++ and the Python prototype. Accepts
strategy_name. Returns a job_id for tracking the async verification job.The legacy
POST /api/strategy/generate endpoint is deprecated. All strategy generation goes through the Foundry endpoints described above.