sharpe-ratio-non-iid-corrections

sharpe-ratio-non-iid-corrections is a skill for Claude Code from terrylica/cc-skills. It costs 172 tokens per session (2,355 once invoked), scanned A, original, MIT.

A Python implementation for checking whether a Sharpe ratio is statistically meaningful when returns are non-normal and related over time. The Sharpe ratio compares investment returns with their risk, while the included tests estimate how much confidence to place in it.

In plain words
What is it for?
Use it to calculate corrected variance, probability-based Sharpe tests, minimum track record length, and several false-discovery measures for financial return series.
Why use it?
A standard Sharpe ratio calculation can overstate evidence when returns are serially correlated or many strategies were tested. These corrections account for those issues when assessing performance.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the quant-research plugin — 8 skills shipped together , and of cc-skills

Good fit Use it to calculate corrected variance, probability-based Sharpe tests, minimum track record length, and several false-discovery measures for financial return series.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/terrylica/cc-skills/sharpe-ratio-non-iid-corrections
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add terrylica/cc-skills --skill sharpe-ratio-non-iid-corrections
Clone the repo
git clone --depth 1 https://github.com/terrylica/cc-skills

Made for: Claude Code.

Or install quant-research, the plugin that ships this one along with the rest of its 8 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sharpe-ratio-non-iid-corrections

README.md
[![agentmods](https://agentmods.dev/badge/skills/terrylica/cc-skills/sharpe-ratio-non-iid-corrections/github.svg)](https://agentmods.dev/skills/terrylica/cc-skills/sharpe-ratio-non-iid-corrections)
Your own site
<a href="https://agentmods.dev/skills/terrylica/cc-skills/sharpe-ratio-non-iid-corrections"><img src="https://agentmods.dev/badge/skills/terrylica/cc-skills/sharpe-ratio-non-iid-corrections/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sharpe-ratio-non-iid-corrections

Your own site · 80×15
<a href="https://agentmods.dev/skills/terrylica/cc-skills/sharpe-ratio-non-iid-corrections"><img src="https://agentmods.dev/badge/skills/terrylica/cc-skills/sharpe-ratio-non-iid-corrections.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 172 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,355 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Rogue Agent · line 170
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
  • medium analysis-evasion · line 1
    Suspicious Unicode normalization or mixed-script content
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
  • medium Prompt Injection · line 66
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 72
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00172 $0.02355
Opus 5.5 $0.00069 $0.00942
Sonnet 5.5 $0.00034 $0.00471
Haiku 4.5 $0.00017 $0.00235

Measured 7d ago against content hash cd53f46a20a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sharpe-ratio-non-iid-corrections scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (references/sharpe_numba.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/quant-research/skills/sharpe-ratio-non-iid-corrections/SKILL.md · 133 lines

How it starts

The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sharpe Ratio Non-IID Corrections

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.

Out of scope — do not re-add (operator rule, 2026-10-15)

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:

  • Judge parsimony on the model itself (how many free parameters, how much was tuned), not by deflating a Sharpe for the number of trials.
  • Guard selection with registration before runs and with unused data: fix the hypothesis, rule and evaluation window before running, and confirm on data no run has touched.
  • Report each rule's own statistics: its Sharpe, ρ-corrected σ[SR̂], PSR, MinTRL and power.

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.

Quick Start

# 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

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

Read the full file on GitHub · 133 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago Changed · -40 lines · +61 tokens per session cd53f46a20a4
  2. 1mo ago First seen · 173 lines · 111 tokens per session scan A af089a5627e3

Subscribe to this mod's changes

sharpe-ratio-non-iid-corrections is a skill published in the GitHub repository terrylica/cc-skills (1 stars, last pushed today), licensed MIT. It adds 172 tokens to every session and 2,355 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

monetization-strategy

Revenue models, pricing strategies, and business monetization. Use when designing pricing, choosing business models, or optimizing revenue for products and services.

travisjneuman/.claude · 34 tokens

payment-integration

Stripe, RevenueCat, subscription billing, webhooks, PCI compliance, and tax. Use when integrating payments or subscriptions, handling payment webhooks, or reviewing billing and PCI scope.

travisjneuman/.claude · 40 tokens

finance

Financial analysis expertise for financial modeling (DCF, LBO, M&A), valuation, financial statement analysis, capital allocation, treasury management, and corporate finance decisions. Use when building financial models, analyzing statements, or making investment decisions.

travisjneuman/.claude · 48 tokens

financial-scenario-planner

Stress-test financial plans across scenarios (bull/bear/base), sensitivity tables, and Monte Carlo-style analysis. Use when evaluating financial assumptions, modeling risk scenarios, or building scenario-based financial plans.

travisjneuman/.claude · 44 tokens

investment-memo-generator

Investment memo creation combining financial analysis, document generation, and structured templates. Use when creating investment memos, pitch decks, deal summaries, or investment committee materials.

travisjneuman/.claude · 37 tokens

agent-payment-billing-specialist

Specialist subagent: Stripe integration, subscription billing, webhooks, PCI compliance, and tax handling specialist. Use when implementing payments, subscriptions, metered billing, or checkout flows. Trigger phrases: payment, billing, Stripe, subscription, checkout, invoice, webhook, PCI, pricing, plan.

travisjneuman/.claude · 67 tokens