Skip to content

Repository files navigation

Open-Alpha-Lab — famous trading edges, taken apart one protocol at a time

Open-Alpha-Lab

Almost every famous trading edge is a mirage. Here is the graveyard, and the handful that survived.

I put every market anomaly, folk strategy and named factor people swear by through the same brutal protocol, and publish the verdict: edge or mirage.

Most are mirages. The honest write-up of why is the point. The survivors don't forecast anything — they manage risk, harvest a premium or a mechanical identity, stop a cost you were paying, or impose a discipline that pays for itself.

tests python license


Built by someone who ran the real thing — a fully systematic global-macro book scaled from sub-$100M to $9B+ in monthly traded notional — so every idea is judged on the two questions most repos skip: is the signal real? and does it survive real execution and scale?

The protocol

Every idea goes through the same protocol and earns two stamps, so results are comparable:

Signal — is the effect statistically real? Real Weak Mixed None
Tradability — does it survive costs, capacity & scale? Investable Fragile Mirage

Robust inference (Newey-West / Lo SEs, bootstrap CIs, White Reality Check for data-snooping), an honest alpha-vs-beta split, and a square-root market-impact capacity test — the full house style is written up in METHODOLOGY.md.


The graveyard

The bench on one grid — each study a numbered chip, sorted by its two stamps. Almost everything ends up bottom-right; the green corner is nearly empty — and not one chip in it is a forecaster. A Mixed signal — the verdict splits by regime or leg — counts with Weak, in the same amber bucket. The map is regenerated from the ledger, which lists every study and is the only place worth counting.

The bench map — every study placed on a Signal × Tradability grid

Open a cell — each link lands on the live map already filtered to that square, listing every study in it:

Investable Fragile Mirage
Real open → open → open →
Weak open → open →
None open → open →

Explore the live map — the same grid, but zoomable: click any chip to open its study, search by name or claim, and filter the whole bench by verdict. (GitHub can't make one image clickable square by square, which is what the table above is for.)


Where to go next

The full ledger → Every study, two stamps each, with the greens called out first. This is the single source of truth the map and the live page are built from.
What the teardowns taught us → The view from above: mortality by family of idea, and the lessons the bench keeps repeating.
The method → How a claim earns its two stamps — inference, the alpha-vs-beta split, the capacity test.
Reproduce the numbers → Data caches, fingerprints and the release bundle, to verify the published figures byte-for-byte.

New here? Open study 01, for the curious — one famous idea, taken apart in plain language, no finance background needed.

Here for the method? Open study 01, for the quants and the working paper — the same result with the inference, the robustness checks and the capacity work shown. Every study carries the same pair of notebooks.


Run it

python -m venv .venv
# Windows:  .venv\Scripts\Activate.ps1   |   *nix:  source .venv/bin/activate
pip install -r requirements.txt

pytest -q                                                            # the engine's test-suite
python studies/01-overnight-anomaly/examples/run_synthetic_demo.py   # offline, no network

Then open studies/01-overnight-anomaly/, or any of the others — every study folder has the same shape.

The engine — quantlab/ (a small, tested, reusable toolkit that powers every study)
Module Role
decompose.py Exact overnight/intraday/close-close return decomposition + Sharpe summary.
data.py Yahoo fetch + parquet cache; split/total-return/raw adjustment modes.
diagnostics.py Critique layer (offline): compounding, split-artefact injector/detector, synthetic markets.
backtest.py Cost-aware backtest, break-even cost, cost sweep.
stats.py Bootstrap Sharpe CIs, alpha-vs-beta (gap-risk) decomposition.
analytics.py HAC & Lo (2002) inference, calendar-time normalization, rolling-Sharpe decay, market-impact capacity.
universe.py Firm-level cross-section across an index (S&P 500 breadth).
simulate.py Adversarial steelman of a strategy/manipulator P&L vs capital.
bayes.py Bayesian hypothesis posteriors + White (2000) Reality Check.
plots.py Decomposition / grid plots.
repro.py Reproducibility stamp: pin an as-of date + content fingerprint so headline numbers reproduce.
brokers/ Swappable BrokerBase + MT5 template (dry_run=True).
Open-Alpha-Lab/
├── quantlab/        # the reusable research engine
├── tests/           # deterministic test-suite (CI on 3.10–3.12)
├── studies/         # one folder per study: notebooks, code, data, docs
└── pyproject.toml · CITATION.cff · LICENSE

A CITATION.cff is provided — use GitHub's "Cite this repository" button.


Built by Guillain d'Erceville — production systems, trading & market-data plumbing, and a habit of publishing the dead-ends, not just the wins.

Not investment advice. Research & education only. See LICENSE.

About

Hundreds of famous stock-market 'winning formulas', put to one honest test. Almost none survive — and the failures are published too.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages