Computes ρ-corrected Sharpe ratio variance, PSR, MinTRL, critical Sharpe, and test power for a single strategy with non-Normal, autocorrelated returns. Implements López de Prado, Lipton & Zoonekynd (2026).
Ships in quant-research. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Sharpe ratio inference for a single strategy whose returns are non-Normal and serially correlated. Reference implementation of the generalized sampling variance in López de Prado, Lipton & Zoonekynd (2026), and of the single-test statistics that use it.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
Never compute, report, rank by or cite the Deflated Sharpe Ratio or any other trial-count correction: FWER and FDR procedures (Holm, Bonferroni/Šidák, Benjamini-Yekutieli, the paper's pFDR/oFDR/SFDR), e-LOND and other online multiple testing, expected-maximum-Sharpe deflation, effective-number-of-trials estimates, and the minimum backtest length (MinBTL), which is a function of the number of trials. MinTRL is a different quantity (one rule's own track record) and stays. They were removed from this skill on purpose. Instead:
PSR, MinTRL, the ρ-corrected variance and power are single-test statistics and stay. PBO/CSCV describes a selection procedure and is not covered by the rule.
# Run the 9 validation tests (paper Exhibit 1 numerical examples)
uv run --no-project --with numpy --with numba \
python plugins/quant-research/skills/sharpe-ratio-non-iid-corrections/references/sharpe_numba.py
| Field | Value |
|---|---|
| Title | How to Use the Sharpe Ratio |
| Authors | Marcos López de Prado, Alexander Lipton, Vincent Zoonekynd |
| Series | ADIA Lab Research Paper Series, No. 19 |
| Date | March 7, 2026 |
| SSRN | 5520741 |
| Replication | https://github.com/zoonek/2025-sharpe-ratio |
| Source PDF | lopez-de-prado-sharpe-2026.pdf |
The PDF is kept because the variance derivation (Section 2, Appendix A.1–A.2) and the PSR/MinTRL/power equations this skill implements are cited by equation number from it. Only those sections are used; the transcription omits the rest.
| Topic | Reference File |
|---|---|
| Paper transcription (implemented excerpt) | how-to-use-the-sharpe-ratio-2026.md |
| Equation → Implementation Tracker | sharpe-paper-tracker.md |
| Numba JIT Implementation | sharpe_numba.py |
| Source PDF | lopez-de-prado-sharpe-2026.pdf |
| Paper Figures | media/ (Exhibit 2, variance vs autocorrelation, pp. 12-13) |
Inputs are all objective, computed from the return series under evaluation:
| Parameter | Meaning | Source |
|---|---|---|
| SR̂ | Observed (non-annualized) Sharpe ratio | Return series |
| T | Number of return observations | Return series |
| γ₃, γ₄ | Skewness, Pearson kurtosis (γ₄=3 is Gaussian) | Return series |
| ρ | Lag-1 autocorrelation | Return series |
| SR₀ | Benchmark Sharpe under the null (often 0) | Fixed before the run |
| SR₁, α | Alternative Sharpe and test size, for power | Fixed before the run |
Fix SR₀, SR₁ and α in the registration, before looking at results. Report SR̂, σ[SR̂], PSR, MinTRL against T, and power together.
All equations use the paper's non-IID variance (Eq 2-3) with Pearson kurtosis convention (γ₄=3 for Gaussian).
| Eq | Name | Formula | Function |
|---|---|---|---|
| 2-3 | SR Variance | V[SR̂] = (1/T)·(a − b·γ₃·SR + c·(γ₄−1)/4·SR²) | sr_variance() |
| 9 | PSR | Φ((SR̂ − SR₀) / σ[SR₀]) | psr() |
| 11 | MinTRL | (a − b·γ₃·SR₀ + c·(γ₄−1)/4·SR₀²) · (z_{1−α}/(SR̂−SR₀))² | min_trl() |
| 8, 14 | Critical SR | SR₀ + σ[SR₀]·z_{1−α} | critical_sr() |
| 13-15 | Power | 1 − Φ((SR_c − SR₁) / σ[SR₁]) | power() |
| 17 | β (Type II) | Φ((z_{1−α}·√(a(ρ)) − SR₁·√T) / √(a − b·γ₃·SR₁ + c·(γ₄−1)/4·SR₁²)) | power() → 1 - power |
Where a = (1+ρ)/(1−ρ), b = (1+ρ+ρ²)/(1−ρ²), c = (1+ρ²)/(1−ρ²) are AR(1) variance coefficients (ar1_variance_coeffs()).
Hedge fund: T=24 months, γ₃=−2.448, γ₄=10.164 (Pearson), SR=0.036/0.079≈0.456, ρ=0.2.
| Quantity | Equation | Value | Notes |
|---|---|---|---|
| σ[SR̂] (non-Gaussian) | Eq 3 | 0.379 | vs 0.214 Gaussian — 77% wider |
| PSR (SR₀=0) | Eq 9 | 0.966 | Still significant despite wider CI |
| PSR (SR₀=0.1) | Eq 9+5 | 0.900 | Harder benchmark reduces confidence |
| MinTRL (SR₀=0) | Eq 11 | 19.543 months | T=24 > 19.5 → sufficient |
| MinTRL (SR₀=0.1) | Eq 11 | 39.369 months | More than doubles for SR₀ closer to SR̂ |
| β (power, SR₁=0.5) | Eq 17 | 0.411 | vs 0.224 IID Normal — 84% higher |
| Power (1−β) | Eq 15 | 0.589 | Low for 24-month track record |
4-tier dependency hierarchy (Numba JIT, Rust-ready):
Tier 0: erfinv, norm_cdf, norm_ppf
Tier 1: sr_variance (Eqs 3/58), ar1_variance_coeffs
Tier 2: psr (Eq 9), min_trl (Eq 11), critical_sr (Eq 8)
Tier 3: power (Eqs 12-17)
| Skill | Relationship |
|---|---|
| opendeviation-eval-metrics | Consumes PSR and MinTRL for range bar evaluation (ρ=0 quick-ref) |
| adaptive-wfo-epoch | Reports PSR per walk-forward fold |
After this skill completes, check before closing:
Only update if the issue is real and reproducible — not speculative.
references/how-to-use-the-sharpe-ratio-2026.md (opens in a new tab)references/media/fig-p12-01.png (opens in a new tab)references/media/fig-p12-02.png (opens in a new tab)references/media/fig-p13-01.png (opens in a new tab)references/media/fig-p13-02.png (opens in a new tab)references/sharpe-paper-tracker.md (opens in a new tab)references/sharpe_numba.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
8 skills in this plugin
/adaptive-wfo-epochAdaptive epoch selection for Walk-Forward Optimization. TRIGGERS - WFO epoch, epoch selection, WFE optimization, overfitting epochs./backtesting-py-oraclebacktesting.py configuration for SQL oracle validation and range bar pattern backtesting. Use when running backtesting.py against./evolutionary-metric-rankingMulti-objective evolutionary optimization for per-metric percentile cutoffs and intersection-based config selection.Other plugins' skills for the same job
/quant-research:sharpe-ratio-non-iid-correctionsfrom quant-research
npx claudepluginhub terrylica/cc-skills --plugin quant-research