joellewis avatar

Statistics Fundamentals

This gives Claude the statistical toolkit for quantitative finance work: descriptive stats, covariance matrices, OLS regression, hypothesis testing, and bootstrap resampling. You'll reach for it when analyzing return distributions, estimating correlations between assets, running CAPM regressions to get alpha and beta, or figuring out why your optimizer is producing unstable weights. It includes Ledoit-Wolf shrinkage for fixing ill-conditioned covariance matrices, which is the usual culprit when you have more assets than observations. The formulas cover the basics like volatility and skewness, plus practical diagnostics like R-squared and t-statistics. Also handles fat tails and non-normality, which matters because financial returns almost never pass a Jarque-Bera test.

skills.sh installs
856
GitHub stars
224
last updated
Aug 21, 2026

Install

$ npx -y skills add joellewis/finance_skills --skill statistics-fundamentals --agent claude-code

Installs into .claude/skills of the current project.

Files

Statistics Fundamentals

Core Concepts

Conventions and Decision Rules

Sample variance: use n-1

When estimating variance or standard deviation from a sample of returns, divide by n - 1 (Bessel's correction), not n. Dividing by n systematically underestimates dispersion. Standard deviation of returns is "volatility"; annualize with sigma_annual = sigma_period * sqrt(periods_per_year) (e.g., * sqrt(12) for monthly, * sqrt(252) for daily).

Normality testing: Jarque-Bera and its limits

JB = (n/6) * (skew^2 + excess_kurtosis^2 / 4), distributed chi-squared with 2 df under the null of normality (5% critical value: 5.99).

Low-power caveat: with small samples (n below roughly 50), JB rarely rejects even for clearly non-normal data — failing to reject is weak evidence of normality, not confirmation. With large samples, financial return series almost always reject due to fat tails and (for equities) negative skewness. Treat the test as a screen, and pair it with a look at the actual skew/kurtosis magnitudes and extreme observations.

Sponsors

Details

Repository
github.com/joellewis/finance_skills
Categories
Testing & QA, Data Science & ML, Productivity & Planning, Finance & Trading
First seen
Jun 3, 2026

More from joellewis/finance_skills

All 84
1martinholovsky avatarui-ux-expertmartinholovsky/claude-skills-generatorExpert UI/UX designer specializing in user-centered design, accessibility (WCAG 2.2), design systems, and responsive interfaces. Use when designing web/mobile a830skills.sh installs
2product-on-purpose avatarmeasure-experiment-designproduct-on-purpose/pm-skillsDesigns an A/B test or experiment with variants, success metrics, sample size, and duration for an existing hypothesis. Use when planning an experiment to valid801skills.sh installs
3product-on-purpose avatarfoundation-personaproduct-on-purpose/pm-skillsGenerates an evidence-calibrated product or marketing persona using the canonical v2.5 output contract. Use when shaping artifact perspective, stress-testing de792skills.sh installs
4mblode avatarscaffold-climblode/agent-skillsScaffolds a production-ready TypeScript CLI and npm package with ESM, a dual tsdown build (CLI binary plus typed library), vitest, oxlint and oxfmt via ultracit751skills.sh installs
5alirezarezvani avatarad-creativealirezarezvani/claude-skillsWhen the user needs to generate, iterate, or scale ad creative for paid advertising. Use when they say 'write ad copy,' 'generate headlines,' 'create ad variati733skills.sh installs
6dotnet avatarmcp-csharp-createdotnet/skillsCreate MCP servers using the C# SDK and .NET project templates. Covers scaffolding, tool/prompt/resource implementation, and transport configuration for stdio a722skills.sh installs