Elena & backtesting
Elena is QuantDesk’s dedicated backtest lifecycle agent. It is not MIKEY-AI (general protocol intelligence). Elena orchestrates dataset selection, strategy specs, simulation, walk-forward validation, and deploy gating.Status
| Component | Status | Notes |
|---|---|---|
elena-ai/ service (port 3006) | Shipped | Conductor + tool registry |
/api/v2/backtest/* | Shipped | Job queue, manifests, deploy gate |
Pro BT + Lite backtest flows | Shipped | Real APIs — no mock-only production path |
| Live LLM Conductor | Optional | Set LLM API key; VITE_MOCK_ELENA=true for UI-only dev |
| GPU optimization pool | Optional | CPU path default; use_gpu: true falls back with notice |
Architecture
- Elena never re-implements sim logic — it calls backend
/api/v2/backtest/*as a client. - MIKEY has no tool that submits sim jobs directly.
Gateway routes
| Route | Purpose |
|---|---|
POST /api/elena/chat | Conductor chat (privacy-scrubbed proxy to Elena) |
GET /api/elena/health | Elena service health via gateway |
Backtest API (narrative)
Base:/api/v2/backtest. Full schemas in Swagger (/api/docs/).
| Route | Purpose |
|---|---|
GET /datasets | Browse oracle-history datasets (dataset_id, version, resolution) |
POST /runs | Submit backtest job (requires fees, slippage, funding — zero-cost rejected) |
GET /runs/:id | Manifest + metrics (Sharpe, Sortino, max DD, DSR, trade count) |
POST /runs/:run_id/deploy-gate/check | Pass/fail vs thresholds (min trades, OOS Sharpe, max DD) |
POST /runs/:run_id/deploy-bundle | Versioned artifact for paper → live place_order_v2 |
POST /compliance/scan | AST guardrail before queue (lookahead, blocklisted imports) |
POST /optimize | Parameter sweeps (optional GPU queue) |
POST /walk-forward | Rolling OOS validation |
StrategyCardSchema
Developer output emits StrategyCardSchema JSON — SSOT formax_leverage, cost model refs, and Solana friction (priority fees + slippage floor). Deploy bundles extend this schema; there is no competing parallel format.
Deploy gate → flex publish
- Complete backtest →
run_id deploy-gate/checkpasses (evaluates DSR, not raw Sharpe alone)- Optional paper/live deploy via scoped session keys
- Publish flex card:
POST /api/v2/social/flex-cardswithrun_id— see Verified flex charter
Local dev
bash scripts/services/start-all.sh from repo root (full fleet; docs site not auto-started).
Related
- V2 API endpoints — social, markets, data plane
- Building on QuantDesk —
place_order_v2live deploy - Data plane overview — dataset dumps and candles
- Verified flex charter