sharpe-ratio-non-iid-corrections
Generalized Sharpe ratio inference under non-Normal serially correlated returns. Implements López de Prado, Lipton & Zoonekynd (2026): PSR, MinTRL, DSR, pFDR, oFDR, SFDR with ρ-corrected variance (Eq 2-3). Numba JIT for production speed. Use when computing Sharpe significance, minimum track record, false discovery rates, or deflated Sharpe ratios with autocorrelation correction.
What this skill does
# Sharpe Ratio Non-IID Corrections Generalized Sharpe ratio inference framework for non-Normal, serially correlated returns. Reference implementation of López de Prado, Lipton & Zoonekynd (2026). > **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. ## Quick Start ```bash # Run all 18 validation tests (paper Exhibit 1 + numerical examples) uv run --python 3.14 --with numpy --with scipy --with numba \ python plugins/quant-research/skills/sharpe-ratio-non-iid-corrections/references/sharpe_numba.py ``` ## Paper Metadata | 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](./references/lopez-de-prado-sharpe-2026.pdf) | ## References | Topic | Reference File | | --------------------------------------- | --------------------------------------------------------------------------------------- | | Full Paper Transcription (82 equations) | [how-to-use-the-sharpe-ratio-2026.md](./references/how-to-use-the-sharpe-ratio-2026.md) | | Equation → Implementation Tracker | [sharpe-paper-tracker.md](./references/sharpe-paper-tracker.md) | | Numba JIT Implementation (850+ lines) | [sharpe_numba.py](./references/sharpe_numba.py) | | Source PDF | [lopez-de-prado-sharpe-2026.pdf](./references/lopez-de-prado-sharpe-2026.pdf) | | Paper Figures | [media/](./references/media/) (8 figures from pp. 12-45) | ## Preflight: Experimentation Context Assessment (CRITICAL) Before computing DSR or SFDR, Claude Code MUST assess the experimentation context to determine the correct parameters. These inputs require subjective judgment that cannot be derived from code alone. ### Decision: DSR vs SFDR | Situation | Use | Why | | ------------------------------------------------------------------------- | -------- | -------------------------------------------------------- | | You have return series for all K strategies tested | **DSR** | Can compute K_eff from eigenvalues of correlation matrix | | Strategy is the survivor of a long, unrecoverable experimentation history | **SFDR** | K is unknowable; SFDR sets a threshold without needing K | | Evaluating a single strategy with no selection involved | **PSR** | No multiple-testing correction needed (K=1) | **Default for this project**: Use **SFDR**. Our strategies are survivors of hundreds of regime explorations across WFO configurations, feature sets, model architectures, and metric cutoffs. The full experimentation history is unrecoverable. ### Parameters Requiring Judgment Before calling `sfdr_threshold()`, assess each parameter by examining the project context: | Parameter | What to assess | How to assess it | | --------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | **P[H₁]** (prior: fraction of genuine strategies) | "Out of all ideas ever tried in this project, what fraction were genuinely profitable?" | Check git history, experiment logs, signal-archaeology skill, WFO result archives. Conservative default: **0.05** (1 in 20 ideas is real). | | **SR₁** (alternative: what a real strategy's Sharpe looks like) | "When a strategy IS real, what Sharpe does it typically achieve?" | Look at validated production strategies, published benchmarks for the asset class. Crypto range bars: **0.3–0.5** monthly. | | **q** (false discovery tolerance) | "What false positive rate can I tolerate?" | Research: **0.05**. Production capital allocation: **0.01**. Exploratory screening: **0.10**. | | **γ₃, γ₄, ρ** (return distribution shape) | Skewness, Pearson kurtosis, lag-1 autocorrelation | Compute directly from the return series under evaluation. These are objective — no judgment needed. | | **T** (sample length) | Number of return observations | Count from data. Objective. | ### Preflight Checklist When this skill is invoked, Claude Code should: 1. **Identify the evaluation context**: Is this a single new strategy, a WFO fold comparison, or a survivor from extensive search? 2. **Determine DSR vs SFDR**: If return series for all candidates exist → DSR with K_eff. Otherwise → SFDR. 3. **Elicit P[H₁]**: Search for experimentation history (git log, experiment catalogues, the `signal-archaeology` skill). Count approximate ideas tried vs ideas that worked. If unknowable, use 0.05. 4. **Estimate SR₁**: From validated production strategies or asset-class benchmarks. 5. **Set q**: Based on the decision's consequence (research paper vs capital deployment). 6. **Compute objective parameters**: γ₃, γ₄, ρ, T directly from the return series. 7. **Report the assessment**: State all parameter choices and reasoning before computing, so the user can override. ### Example Preflight Output ``` SFDR Preflight Assessment: Context: Survivor of ~300 WFO configs × 5 feature sets × 3 architectures Method: SFDR (experimentation history unrecoverable) P[H₁]: 0.05 (conservative — ~15 genuine signals from ~300 ideas) SR₁: 0.4 (typical monthly Sharpe for validated crypto range bar strategies) q: 0.05 (research-grade threshold) γ₃: -2.448 (computed from return series) γ₄: 10.164 (Pearson kurtosis, computed from return series) ρ: 0.20 (lag-1 autocorrelation, computed from return series) T: 24 months → SFDR threshold: SR_c = 0.760 → Observed SR: 0.456 → VERDICT: FAIL (observed SR below SFDR threshold) ``` The user may override any parameter. If they disagree with P[H₁] or SR₁, recompute with their values. ## Key Formulas All equations use the paper's non-IID variance (Eq 2-3) with Pearson kurtosis convention (γ₄=3 for Gaussian). | Eq | Name | Formula | Function
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.