Appearance
Phase 2: Strategy Development
Phase 2 turns the data-source research into a working research-and-backtest platform. Code lives in strategies/ at the repo root.
Decisions
| Decision | Choice | Rationale |
|---|---|---|
| First market | MES / MNQ | Deepest liquidity of the 14 targets, richest free auxiliary data (VIX family, COT TFF, macro calendar) |
| Style | Swing, 1–10 day holds | Backtests on daily bars; the US$2.74 round-trip cost is negligible at swing P&L scale; no depth data required |
| Engine | NautilusTrader (1.221) | Event-driven, same strategy code for backtest and live; native Databento adapter for the eventual live path |
| Market data | Databento GLBX.MDP3 | The catalog's primary price-history pick; continuous-contract symbology (MES.v.0), usage-based pricing |
| Tooling | Python 3.11 + uv | Standard quant ecosystem |
What exists now
- Instrument model — continuous-contract futures instruments (
MES.GLBX) with correct tick size/multiplier; rolls handled in data, not simulation. - Execution-cost model — Wealthsimple fees charged per contract per side (US$1.00 commission + ~$0.37 pass-throughs, see broker constraints) via Nautilus
PerContractFeeModel. - Data pipeline — Databento ingest (raw volume-rolled daily bars → parquet; Panama back-adjustment at load time), plus keyless loaders for CFTC COT (TFF) and Cboe VIX-family history, plus deterministic synthetic bars for offline testing.
- Baseline strategy — long-only 20/10 Donchian breakout (
SwingBreakout): the wiring-validation baseline every real strategy must beat. - Smoke test —
uv run pytestruns a full backtest offline and asserts fills, positions, and per-contract commissions.
Running it
sh
cd strategies
uv sync
uv run pytest # offline smoke test
echo 'DATABENTO_API_KEY=db-...' > .env # your key
uv run python -m vibe_trader.data.databento_ingest --symbol MES --start 2019-05-06
uv run python -m vibe_trader.backtest.run --symbol MES --source databentoRoadmap
- Ingest real MES/MNQ history (2019→) and ES/NQ (2010→) once the Databento key is configured; validate the continuous series against CME settlements.
- Feature layer: VIX regime, COT positioning z-scores, macro-calendar proximity — joined to daily bars.
- Hypothesis backlog → per-strategy research notes here in the docs; every candidate benchmarked against
SwingBreakoutand buy-and-hold, with walk-forward splits before any parameter is trusted. - Wealthsimple-realistic portfolio checks: front-two-expiry roll rules, margin headroom, per-order fee drag.