Historical Risk
Quantifies realized risk from historical prices using volatility estimators, drawdown analysis, and downside metrics.
- CCM score
- 62 of 100
- skills.sh installs
- 818
- GitHub stars
- 270
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers annualized close-to-close volatility, Parkinson and Yang-Zhang high-low estimators, and maximum drawdown with duration and recovery time
- Includes historical VaR, downside deviation, semi-variance, and tracking error, with formulas and worked examples for each measure
- Warns about annualizing volatility with the square root of time, using 252 trading days, and survivorship bias in price data
- Designed for analysts who need past risk measures and cross-references performance-metrics, forward-risk, and volatility-modeling
Install
$ npx -y skills add joellewis/finance_skills --skill historical-risk -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Historical Risk Analysis
Core Concepts
Close-to-Close Volatility
The simplest and most common volatility estimator. Compute the standard deviation of log returns and annualize.
sigma_annual = sigma_daily * sqrt(N)
where N = number of trading periods per year (typically 252 for daily, 52 for weekly, 12 for monthly).
Log returns are preferred: r_t = ln(P_t / P_{t-1}).
Parkinson (High-Low) Estimator
Uses intraday high and low prices to capture intraday volatility that close-to-close misses. More efficient than close-to-close when the true process is continuous.
sigma^2_Park = (1 / (4 * n * ln(2))) * sum( ln(H_i / L_i)^2 )
This estimator is roughly 5x more efficient than close-to-close for a diffusion process, but is biased downward when there are jumps or when the range is discretized.
Yang-Zhang Estimator
Combines overnight (close-to-open), open-to-close, and Rogers-Satchell components. It is unbiased for processes with both drift and opening jumps.
sigma^2_YZ = sigma^2_overnight + k * sigma^2_open-to-close + (1 - k) * sigma^2_RS
where k is chosen to minimize estimator variance:
k = 0.34 / (1.34 + (n + 1) / (n - 1))
Details
- Repository
- github.com/joellewis/finance_skills
- Categories
- Finance & Trading, Data Science & Analytics
- First seen
- Jun 3, 2026
Questions
What does the historical-risk skill do for Claude Code?
The historical-risk skill quantifies realized risk from past price data using volatility estimators, drawdown analysis, historical VaR, downside deviation, semi-variance and tracking error. It covers estimators such as Parkinson and Yang-Zhang, plus maximum drawdown and recovery time.
How do I install the historical-risk skill?
Run npx -y skills add joellewis/finance_skills --skill historical-risk -y in a project to install it. Once installed, Claude can answer questions about how risky an investment has been using those historical measures.
Which skills lead the Finance & Trading category next to historical-risk?
In the Finance & Trading category, historical-risk sits alongside wind-mcp-skill, stripe-best-practices, wind-find-finance-skill, convex-billing and create-payment-credential. Its focus is measuring past investment risk from historical data rather than payments or billing.
Does the skill include a script I can run?
Yes, the skill ships a script at scripts/historical_risk.py that you can run with uv run or python3 after installing numpy and scipy. A bare run prints a full risk analysis of the data, including maximum drawdown and 95% and 99% historical VaR.
More from joellewis/finance_skills
All 84- Order Lifecycle817
- Market Data813
- Currencies And Fx808
- Time Value Of Money804
- Bet Sizing802
- Liquidity Management802
- Financial Planning Workflow801
- Emergency Fund799
- Volatility Modeling799
- Performance Metrics797
- Return Calculations795
- Savings Goals795
- Account Transfers787
- Fund Vehicles786
- Data Quality782
- Forward Risk782
- Lending782
- Trade Execution777
- Equities772
- Performance Reporting771
- Tax Efficiency771
- Privacy Data Security768
- Real Assets765
- Fixed Income Corporate764
Similar to Historical Risk
More Finance & Tradingforward-riskjoellewis/finance_skills782 installsEstimates potential future portfolio losses through VaR, Expected Shortfall, Monte Carlo simulation, and stress testing.
longbridge-risk-analysislongbridge/skills496 installsRisk measurement and stress testing that computes VaR, CVaR, drawdown, and Sharpe via Longbridge data.
risk-metrics-calculationwshobson/agents11.8K installsPortfolio risk metric toolkit covering VaR, CVaR, Sharpe, Sortino, and drawdown measures for risk monitoring.
risk-assessmentstaskh/trading_skills118 installsQuantitative risk metrics for a stock or position, covering volatility, beta, VaR, and drawdown.
volatility-modelingjoellewis/finance_skills799 installsModel, forecast, and interpret volatility with EWMA, GARCH, implied volatility, and VIX.
option-vol-analysisanthropics/financial-services2.1K installsCombines vol surface pulls, option Greeks, and historical prices to compare implied and realized volatility.