Code Repository
Every data-driven claim on this site is backed by code that can be run and checked. Reproducibility is the first principle here: a result isn’t a finding until someone else can reproduce it.
This website
The full source for davidmaguire.ai is public and built with Quarto: github.com/davidolivermaguire-ai/davidmaguire.ai
Research code
Each Quant Research Lab experiment links to its own reproducible script or notebook. For example, the Monte-Carlo behind How Backtest Selection Inflates the Sharpe Ratio lives in code/backtest_overfitting.py in the repository above.
market-state-lab
github.com/davidolivermaguire-ai/market-state-lab
A purpose-built benchmark harness for the proposal’s RQ1 — which methods most reliably identify market state out of sample? Because that is a comparative question, the deliverable is a protocol rather than a model: one point-in-time data layer, one shared feature set, a pluggable estimator interface, one walk-forward engine, and one metrics suite, so that nine methods compete on identical terms.
It currently implements four transparent baselines, a Kalman local-linear-trend filter, a Gaussian HMM, a Markov-switching regression, and CUSUM and BOCPD change-point detectors, scored across four tiers: recovery on synthetic markets with known regimes, stability, timeliness, and decision value against a volatility-only benchmark. Every estimator must pass an automated look-ahead test asserting that its estimate at time t is unchanged when future data is appended — filtered, never smoothed.
The repository is public, MIT-licensed, and installable (pip install -e ".[data,dev]"). The committed Nasdaq CSV is frozen at a fixed date, so msl decision -c configs/trend_indices.yaml --offline reproduces the published result exactly, with no network access. Its README is a working research log rather than a sales pitch: it records the estimators that failed on real data and why, a claim generalised from one asset that the panel later refuted, and a confound hypothesis that was tested and rejected.
Principles
- Reproducibility first — code is published alongside the result it produces.
- Versioned — everything is tracked in Git, so results can be traced to the exact code that generated them.
- Honest — the code shows the full method, including the parts that didn’t work.