quant-validation

Featured

The methods a financial-ML result has to survive before it is evidence — purged cross-validation with an embargo, triple-barrier labelling, sample uniqueness under overlapping labels, fractional differentiation, meta-labelling, and multiple-testing correction. Written because the invariants were required of quant-researcher and nothing in the project explained how to satisfy them: a rule without a method produces either an invention or a block. Applied whenever a backtest, a feature or a label is being designed or judged.

Code & Development 92 stars 13 forks Updated today MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
66
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Validating a financial model — the five ways the number lies A backtest that looks excellent and loses money live is not usually a bad strategy. It is a good measurement of the wrong thing. Each section below is one mechanism by which a number becomes convincing without becoming true. **On sourcing.** The methods here are standard and attributable — most of them to Marcos López de Prado's *Advances in Financial Machine Learning*, with the information-ratio framing from Grinold & Kahn. This file states the MECHANISM and what to check, and deliberately does not restate formulas from memory. Where an implementation needs an exact expression — the deflated Sharpe ratio in particular — verify it against the primary source before shipping a number that depends on it. A formula recalled approximately is worse here than no formula: it produces a specific, wrong, confident figure. ## 1. Purged cross-validation with an embargo **The leak.** In a normal k-fold split, training and test rows are disjoint. In a financial series they are not independent: a label at time *t* is computed from data spanning *t* to *t+h*. A training observation inside that window has seen the future the test observation is being asked to predict. **Purging.** Drop from the training set every observation whose label window overlaps the label window of any test observation. Not the observation's timestamp — its *label window*. This is the step people skip, because a plain timestamp split looks like it alre...

Details

Author
avelikiy
Repository
avelikiy/great_cto
Created
5 months ago
Last Updated
today
Language
JavaScript
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

backtest-validation

Decide whether a result survives the number of things you tried. TRIGGER - "I tried N strategies or parameters and the best one..."; overfitting, p-hacking, data snooping, multiple testing, "is this result real", "is this statistically significant"; deflated Sharpe, DSR, PSR, probability of backtest overfitting, PBO; purged or combinatorial cross-validation, embargo, walk-forward, "cross validation on time series without leaking"; a grid search, hyperopt or AutoML picked a winner; triple-barrier labeling, meta-labeling, fractional differentiation, mlfinlab. Load whenever a Sharpe ratio is about to be offered as evidence for trading. SKIP only for plain performance metrics - Sharpe, Sortino, CAGR, drawdown (portfolio-and-risk); the deflated and probabilistic Sharpe ratios are computed HERE.

1 Updated today
howard-lynn-ye
Testing & QA Listed

backtest-validation

Validate whether a backtest result is trustworthy before drawing any conclusion from it. Trigger for "回测这个策略", "这个策略过拟合吗", "夏普这么高可信吗", "加上手续费还赚钱吗", "样本外表现", "validate this backtest", "is this strategy overfit", or whenever the user (1) presents or produces backtest results and wants a judgement, (2) asks whether an edge is real, (3) compares strategy variants and picks the best one, or (4) is about to deploy/paper-trade a strategy based on historical performance. Fire even when the user only asks for the metrics ("just show me the Sharpe") — the metrics are not a conclusion until the gauntlet passes. Pair with point-in-time-research: that skill guards the data going in; this one guards the claim coming out. Do NOT trigger for pure data fetching or for live trading questions with no historical simulation involved.

2 Updated 6 days ago
artherahq
AI & Automation Listed

research-integrity-guards

Second-pass audit that decides whether a finance result is real, applied after the work exists. TRIGGER - about to REPORT, publish or act on a backtest, factor test or model score; a result that looks good ("Sharpe 3.5", "beats SPY", "85% accuracy") and needs challenging; asked to validate, verify, sanity-check or critique a research design; asked "what should I check". Covers five gates: universe survivorship, availability timestamps, label leakage, cost realism, trial count. SKIP when the task is to BUILD something rather than judge it - go to the domain skill first (market-data-sourcing, backtesting-engines, factor-and-timeseries-research) and return here before reporting a number.

1 Updated today
howard-lynn-ye