statistics-fundamentals
Analyze financial return series with descriptive statistics, normality tests, and covariance estimation. Run CAPM regressions with significance testing, apply Ledoit-Wolf shrinkage for stable portfolio optimization, and bootstrap confidence intervals for statistics without clean analytical solutions.
Statistics Fundamentals applies statistical methods to analyze return distributions, test normality, and estimate covariance matrices for financial data.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-18
Statistics Fundamentals applies statistical methods to analyze return distributions, test normality, and estimate covariance matrices for financial data. Analyze financial return series with descriptive statistics, normality tests, and covariance estimation. Run CAPM regressions with significance testing, apply Ledoit-Wolf shrinkage for stable portfolio optimization, and bootstrap confidence intervals for statistics without clean analytical solutions.
Use it when
- statistics-fundamentals includes the Jarque-Bera test to assess whether financial returns are normally distributed by examining skewness.
- Unstable weights typically arise when you have more assets than observations, causing the sample covariance matrix to be ill-conditioned.
Verify before relying
Read SKILL.md below before installing (2 files). Open directory: indexed for reading, not audited.
Install
JoelLewis/finance_skills/statistics-fundamentals · repository language: Python
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I calculate volatility from returns using statistics-fundamentals?
statistics-fundamentals computes volatility as the standard deviation of your return series, applying Bessel correction (n−1 divisor) for unbiased sample estimates. For monthly returns, multiply the result by √12 to annualize; for daily data, use √252. The skill handles both raw and log returns, letting you test whether your data exhibits fat tails or skewness that violate normality assumptions.
What normality tests does statistics-fundamentals provide?
statistics-fundamentals includes the Jarque-Bera test to assess whether financial returns are normally distributed by examining skewness and kurtosis. The test flags fat tails and asymmetry common in stock data. You can also inspect raw descriptive statistics—mean, variance, skewness, kurtosis—to diagnose departures from normality before running parametric models like CAPM.
Why does my portfolio optimizer produce unstable weights with statistics-fundamentals?
Unstable weights typically arise when you have more assets than observations, causing the sample covariance matrix to be ill-conditioned. statistics-fundamentals addresses this via Ledoit-Wolf shrinkage estimation, which blends your sample covariance toward a structured target (often the identity or single-factor model). This stabilizes weights and improves out-of-sample performance without discarding data.
How does statistics-fundamentals estimate covariance matrices for portfolio construction?
statistics-fundamentals computes sample covariance and correlation matrices from your return data, then optionally applies Ledoit-Wolf shrinkage when assets exceed observations. It also supports rolling-window estimation to capture time-varying correlations. These stabilized estimates feed directly into mean-variance optimization and risk decomposition for portfolio construction.
Can statistics-fundamentals run CAPM regression to measure alpha and beta?
Yes. statistics-fundamentals performs CAPM regression of asset returns against a market benchmark, reporting beta (market sensitivity), alpha (intercept), and R-squared. It computes t-statistics and p-values to test whether alpha is significantly different from zero, helping you assess whether a fund or strategy has genuine outperformance or just noise.
How do bootstrap confidence intervals work in statistics-fundamentals?
statistics-fundamentals uses non-parametric bootstrap resampling to generate confidence intervals for statistics like Sharpe ratio, volatility, and correlation when analytical formulas are intractable or assumptions are violated. It resamples your return observations with replacement, recalculates the statistic thousands of times, and constructs percentile-based intervals—ideal for fat-tailed financial data.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
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
(truncated - see the full file via the links below)
File tree — 2 files
plugins/core/skills/statistics-fundamentals/SKILL.md
plugins/core/skills/statistics-fundamentals/scripts/statistics_fundamentals.py
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Apply statistical methods to analyze return distributions and test normality”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Factor Investing teaches you to apply multifactor models—from CAPM through Fama-French 3- and 5-factor frameworks plus momentum—to portfolio construction and fund evaluation. Regress fund returns against factors to separate true alpha from passive exposure, detect closet indexing, and assess smart-beta product purity and implementation quality.
Quantify how risky an investment has been using historical price data. This skill computes annualized volatility, maximum drawdown, recovery time, historical VaR, downside deviation, and tracking error—supporting multiple volatility estimators including Parkinson and Yang-Zhang methods. Use it to analyze peak-to-trough losses and asymmetric downside risk.
Pywayne Statistics provides a unified library for statistical hypothesis testing across normality assessment, group comparisons, correlation analysis, time series validation, and regression diagnostics. Each test returns consistent result objects with p-values, confidence intervals, and effect sizes, making it straightforward to validate data assumptions and detect significant effects in A/B tests and observational studies.
Statsmodels delivers rigorous statistical inference through comprehensive model estimation, diagnostic testing, and publication-ready summaries. It excels at linear and generalized linear regression, time series modeling, ANOVA, survival analysis, and causal inference—all with the p-values and confidence intervals essential for academic and scientific work.
Quantify potential portfolio losses across normal and extreme market conditions using parametric VaR, Monte Carlo simulation, Expected Shortfall, and scenario analysis. Decompose risk by position and factor to identify which holdings drive portfolio volatility. Stress-test portfolios against historical crises and custom market shocks.
Conduct rigorous statistical tests—t-tests, ANOVA, chi-square, correlation, regression, and Bayesian methods—with systematic assumption verification and effect size reporting. The skill walks you through test selection, data inspection, assumption diagnostics, and APA-style write-ups so your analysis withstands peer review.
More skills statistical-analysis (MIT) · statistics-verifier (MIT) · performance-attribution (MIT) · quant-statistics (MIT) · Statsmodels Statistical Modeling (NOASSERTION)