Skip to content

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

DecisionChoiceRationale
First marketMES / MNQDeepest liquidity of the 14 targets, richest free auxiliary data (VIX family, COT TFF, macro calendar)
StyleSwing, 1–10 day holdsBacktests on daily bars; the US$2.74 round-trip cost is negligible at swing P&L scale; no depth data required
EngineNautilusTrader (1.221)Event-driven, same strategy code for backtest and live; native Databento adapter for the eventual live path
Market dataDatabento GLBX.MDP3The catalog's primary price-history pick; continuous-contract symbology (MES.v.0), usage-based pricing
ToolingPython 3.11 + uvStandard 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 testuv run pytest runs 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 databento

Roadmap

  1. Ingest real MES/MNQ history (2019→) and ES/NQ (2010→) once the Databento key is configured; validate the continuous series against CME settlements.
  2. Feature layer: VIX regime, COT positioning z-scores, macro-calendar proximity — joined to daily bars.
  3. Hypothesis backlog → per-strategy research notes here in the docs; every candidate benchmarked against SwingBreakout and buy-and-hold, with walk-forward splits before any parameter is trusted.
  4. Wealthsimple-realistic portfolio checks: front-two-expiry roll rules, margin headroom, per-order fee drag.

Last updated: