Skip to content

Repository files navigation

Market Strats Lab

Status: Research complete / v1 research cycle concluded Frozen research endpoint: 2026-05-01

Market Strats Lab is a reproducible research system for testing whether transparent market rules and point-in-time machine-learning signals can improve long-term investing outcomes without overstating what historical evidence proves.

The Question

Can systematic ETF risk controls or a point-in-time individual-stock ranking process outperform SPY Buy & Hold after costs while remaining robust, operationally credible, and investable?

The Final Answer

Not on all required dimensions.

  • SPY Buy & Hold remained the raw-return and terminal-wealth winner.
  • A transparent defensive SPY overlay retained most long-run CAGR while materially reducing historical drawdown and improving the return/drawdown trade-off.
  • A controlled stock-ranking pilot produced encouraging out-of-sample rank-correlation evidence, but its hand-selected survivor universe prevents credible generalisation.
  • The canonical stock experiment could not be qualified from the permitted free sources because historical identity, membership, delisting, terminal-value, and complete price evidence remained unresolved. That is a data-foundation result, not a model failure.

The project therefore ends with a useful risk-control result, a promising but noncanonical stock signal result, and a clear demonstration that point-in-time data integrity became the binding constraint on credible free-data equity research.

Key Findings

1. No universal strategy winner

No tested strategy dominated SPY Buy & Hold simultaneously on raw wealth, risk, and practical liveability. The ETF figures below are frozen historical research results for 2006-04-28 through 2026-05-01, not forecasts.

Strategy End value CAGR Calmar Maximum drawdown
SPY Buy & Hold $79,306.63 10.90% 0.197 -55.19%
SPY 3D Overlay + deep-drawdown guard + loose relief $71,779.16 10.35% 0.429 -24.12%

Conclusion: SPY Buy & Hold remained the raw-return and terminal-wealth winner, while the final ETF overlay materially reduced historical drawdown and improved the return/drawdown trade-off.

Aggregate ETF comparison

2. Encouraging stock-ranking evidence, with a decisive caveat

The controlled 16-stock pilot was explicitly:

NONCANONICAL
SURVIVORSHIP-BIASED
RESEARCH-ONLY
NOT INVESTABLE PERFORMANCE

Its strictly out-of-sample Ridge rankings produced:

Diagnostic Frozen result
Mean Spearman IC 0.1225
Median Spearman IC 0.1485
Positive-IC date fraction 62.9%
Top-k 20-day average excess return 1.2166%
Top-minus-bottom rank spread 2.8345%
Within-date permutation IC p-value 0.0099

The moving-block-bootstrap IC interval was 0.0069 to 0.2420, but the rank-spread interval was -0.0031 to 0.0576 and crossed slightly below zero. The result supports scientific interest, not an investable-performance claim.

Aggregate stock-pilot evidence

3. Free data reached a hard canonical boundary

The final universe contract prohibited current-survivor filtering, ticker-only identity, same-close execution, missing-price imputation, and zero-valued missing delisting returns. The final bounded real-source rerun preserved those rules and produced:

blocked_identity_reconciliation_failure

SEC acquisition succeeded with HTTP 200 and returned 10,398 current mapping rows. Even so, only 42 of 1,126 historical identities resolved under the strict name/ticker evidence rule. The frozen run also retained 36 membership conflicts, 348 price-coverage failures, 648 unresolved delisting outcomes, and zero qualified monthly decisions. The final engineering rerun completed and persisted all 12 Parquet evidence tables plus the source manifest, licence audit, and JSON/Markdown summaries. The persisted summary records the verdict above and explicitly leaves canonical model training unauthorized. The bounded zero-cost research path is closed.

4. Research design mattered more than complexity

Increasing model complexity was not the main determinant of credible evidence. Point-in-time availability, security identity, costs, benchmark discipline, purging and embargoes, robustness tests, and honest failure states mattered more.

Research Architecture

point-in-time sources
  -> immutable local snapshots and availability evidence
  -> source qualification and coverage audits
  -> frozen features, targets, and model comparisons
  -> research-only signal exports
  -> portfolio, cost, and robustness diagnostics
  -> prospective shadow records with delayed outcomes
  -> explicit stop gates before broker or real-money use

market_strats.intelligence owns point-in-time source and signal evidence. The broader market_strats package owns strategy evaluation, portfolio diagnostics, costs, robustness, and benchmarks. Neither layer authorizes live execution.

What Was Built

  • ETF buy-and-hold, trend, momentum, allocation, and defensive-overlay research;
  • transaction-cost, spread, impact, turnover, tax, and behavioural diagnostics;
  • walk-forward, rolling-window, bootstrap, permutation, and ablation controls;
  • a point-in-time market, macro-vintage, FOMC, BLS, and SEC evidence layer;
  • interpretable Ridge ranking and a fixed tree comparator;
  • purged and embargoed out-of-sample stock evaluation;
  • immutable source snapshots, hashes, availability records, and fail-closed contracts;
  • manual paper and prospective shadow infrastructure with no broker authority;
  • a strict point-in-time S&P 500 universe qualification system.

Methodological Safeguards

  • SPY Buy & Hold remained the primary raw-return benchmark.
  • Historical endpoint and rules were frozen before closeout.
  • Transaction costs and execution timing were explicit.
  • Same-close execution and lookahead data were prohibited.
  • Stock labels used chronological purging and embargoes.
  • Current-survivor filtering and ticker-only identity were prohibited.
  • Missing prices and delisting values were never silently set to zero.
  • Artifact-backed tests remained separate from portable CI.
  • Raw provider data, credentials, generated reports, and restricted evidence remained local.

Final Status

Research track Final v1 status
ETF raw-return benchmark SPY Buy & Hold remained the winner
ETF risk-adjusted candidate Useful historical return/drawdown trade-off; not universally dominant
Individual-equity model Encouraging noncanonical pilot; no broad-universe claim
Canonical point-in-time universe Blocked on unresolved evidence
Individual-equity prospective shadow Proposal generated; first entered session remained pending
Broker/live/real money Never authorized
Additional strategy development Intentionally stopped for v1

Future work would be a new research cycle, not continuation by default. A canonical equity v2 would require a new preregistered objective and appropriately licensed historical constituent, security-master, delisting, and terminal-value evidence if the free-data boundary remains.

Reproducibility

Python 3.11 is supported.

py -3.11 -m venv .venv
.\.venv\Scripts\python -m pip install -e ".[dev]"
.\.venv\Scripts\python -m ruff check --select E,F,I,UP `
  src/market_strats/intelligence src/market_strats/universe `
  tests/test_mi*.py tests/universe
.\.venv\Scripts\python -m pytest -q -m "not artifact"

Rebuild the public-safe aggregate figures with:

.\.venv\Scripts\python scripts\build_public_closeout_figures.py

The plotting script uses only frozen aggregate values already published in docs/research_history.md; it does not read or redistribute provider time series.

Repository Map

src/market_strats/intelligence/        point-in-time source and signal research
src/market_strats/universe/            canonical-universe qualification
src/market_strats/analysis/            evaluation and diagnostics
src/market_strats/strategies/          transparent rules and benchmarks
src/market_strats/global_multi_asset/  multi-asset contracts and tournaments
configs/                               frozen research contracts
tests/                                 portable and artifact-marked validation
docs/                                  conclusions, architecture, methods, and detailed history

Read More

Publication And License

Source code is MIT licensed. Third-party data is governed by its provider terms and is not covered by the code license. Raw SEC filings, provider responses, large generated panels, release archives, credentials, personal paths, and redistribution-restricted evidence remain excluded from Git.

Research and education only. Nothing in this repository is financial advice, an investment recommendation, a live signal, or authorization to place an order.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages