plugins/wealth-management/skills/performance-metrics/SKILL.md
Evaluate investment performance on a risk-adjusted basis using industry-standard ratios and capture analysis. Use when the user asks about Sharpe ratio, Sortino ratio, Information Ratio, Treynor ratio, Calmar ratio, Omega ratio, or upside/downside capture. Also trigger when users mention 'risk-adjusted returns', 'return per unit of risk', 'M-squared', 'is this fund worth the volatility', 'how to compare two managers', 'capture ratio', or ask which investment performed better after accounting for risk.
npx skillsauth add joellewis/finance_skills performance-metricsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Evaluate investment performance on a risk-adjusted basis using industry-standard ratios and capture analysis. This skill covers the Sharpe, Sortino, Information, Treynor, and Calmar ratios, the Omega ratio, upside/downside capture ratios, and M-squared. These metrics allow fair comparison across strategies with different risk profiles.
1a — Realized Risk & Performance
Retrospective
The most widely used risk-adjusted performance measure. It divides excess return (over the risk-free rate) by total volatility.
SR = (R_p - R_f) / sigma_p
A higher Sharpe ratio indicates more return per unit of total risk. Typical benchmarks: SR < 0.5 is poor, 0.5-1.0 is acceptable, > 1.0 is strong, > 2.0 is exceptional.
Annualization: If computed from monthly data, SR_annual = SR_monthly * sqrt(12).
Replaces total volatility with downside deviation, penalizing only harmful volatility (returns below a Minimum Acceptable Return).
Sortino = (R_p - R_f) / sigma_downside
where sigma_downside = sqrt((1/n) * sum(min(R_i - MAR, 0)^2)).
Common MAR choices: 0%, risk-free rate, or a target return. Always state which MAR is used.
Measures active return (alpha) per unit of active risk (tracking error) relative to a benchmark.
IR = (R_p - R_b) / TE
where TE = std(R_p - R_b) * sqrt(N).
An IR above 0.5 is generally considered good; above 1.0 is exceptional and difficult to sustain.
Measures excess return per unit of systematic risk (beta) rather than total risk.
Treynor = (R_p - R_f) / beta_p
Useful for evaluating diversified portfolios where idiosyncratic risk has been diversified away. For undiversified holdings, the Sharpe ratio is more appropriate.
Relates annualized return to the worst peak-to-trough drawdown.
Calmar = CAGR / |MaxDrawdown|
A Calmar ratio above 1.0 means the annualized return exceeds the maximum drawdown. This ratio is popular among CTAs and hedge fund investors. Typically computed over a 3-year window.
A gain-loss ratio that considers the entire return distribution above and below a threshold tau.
Omega(tau) = integral from tau to +inf of [1 - F(r)] dr
/ integral from -inf to tau of F(r) dr
where F(r) is the cumulative distribution function of returns.
In practice, this is computed as:
Omega(tau) = sum(max(R_i - tau, 0)) / sum(max(tau - R_i, 0))
Omega > 1 means expected gains above tau exceed expected losses below tau. Unlike Sharpe, Omega captures the full shape of the distribution (skewness, kurtosis).
Measure how the portfolio participates in benchmark up and down markets.
Up Capture = R_p(in up months) / R_b(in up months) * 100
Down Capture = R_p(in down months) / R_b(in down months) * 100
Capture Ratio = Up Capture / Down Capture
Ideal profile: Up Capture > 100% and Down Capture < 100%, yielding a Capture Ratio > 1. "Up months" and "down months" are defined by the benchmark return being positive or negative, respectively.
Expresses risk-adjusted return in the same units as return, by leveraging or deleveraging the portfolio to match benchmark volatility.
M^2 = R_f + SR_p * sigma_b
= R_f + ((R_p - R_f) / sigma_p) * sigma_b
Interpretation: "If this portfolio were scaled to have the same volatility as the benchmark, it would have returned M-squared." This makes it directly comparable to benchmark returns.
| Formula | Expression | Use Case | |---------|-----------|----------| | Sharpe Ratio | (R_p - R_f) / sigma_p | Return per unit of total risk | | Sortino Ratio | (R_p - R_f) / sigma_downside | Return per unit of downside risk | | Information Ratio | (R_p - R_b) / TE | Active return per unit of active risk | | Treynor Ratio | (R_p - R_f) / beta_p | Return per unit of systematic risk | | Calmar Ratio | CAGR / |MaxDD| | Return per unit of drawdown risk | | Omega Ratio | sum(max(R_i - tau, 0)) / sum(max(tau - R_i, 0)) | Full-distribution gain-loss ratio | | Up Capture | R_p(up) / R_b(up) * 100 | Participation in rising markets | | Down Capture | R_p(down) / R_b(down) * 100 | Participation in falling markets | | M-Squared | R_f + SR_p * sigma_b | Risk-adjusted return in return units |
Given: A fund returned 12% annualized, the risk-free rate is 4%, and the fund's annualized volatility is 15%.
Calculate: Sharpe Ratio.
Solution:
SR = (0.12 - 0.04) / 0.15
= 0.08 / 0.15
= 0.533
The fund earned 0.533 units of excess return per unit of risk. This is in the "acceptable" range but below 1.0.
Given:
Calculate: Which fund is better for a downside-averse investor?
Solution:
Fund A has a higher Sharpe ratio (0.8 vs 0.7), indicating better total-risk-adjusted performance. However, Fund B has a notably higher Sortino ratio (1.5 vs 1.2), meaning it delivers significantly more return per unit of downside risk.
The divergence implies Fund B's volatility is more skewed to the upside -- its total volatility includes more "good" volatility (gains), while its downside volatility is relatively contained.
For a downside-averse investor, Fund B is preferable because the Sortino ratio better captures the risk they care about (losses), and Fund B's superior Sortino indicates better downside risk management.
Given: A portfolio returned 10% annualized, its benchmark returned 8%, and the tracking error is 4%.
Calculate: Information Ratio.
Solution:
IR = (0.10 - 0.08) / 0.04
= 0.02 / 0.04
= 0.50
The manager generated 0.50 units of active return per unit of active risk. This is generally considered a good IR, suggesting consistent alpha generation relative to benchmark deviations.
See scripts/performance_metrics.py for computational helpers.
testing
Model, forecast, and interpret volatility using time-series models and options-implied measures. Use when the user asks about EWMA, GARCH models, implied volatility, volatility surfaces, volatility term structure, or the VIX. Also trigger when users mention 'volatility smile', 'volatility skew', 'realized vs implied vol', 'volatility risk premium', 'vol clustering', 'mean-reverting volatility', 'options pricing inputs', 'RiskMetrics', 'decay factor', or ask how to forecast future volatility for risk management.
testing
Execute a complete tax-loss harvesting workflow from candidate identification through post-harvest monitoring. Use when the user asks about finding TLH candidates, gain/loss budgeting, replacement security selection, wash-sale compliance, or harvest execution planning. Also trigger when users mention 'unrealized losses in my portfolio', 'swap ETFs for tax purposes', 'harvest losses before year-end', 'substantially identical security', 'wash-sale window', 'NIIT offset', 'loss carryforward', or ask how much tax they can save by harvesting.
testing
Maximize after-tax returns through strategic asset location, tax-loss harvesting, gain/loss management, and withdrawal sequencing. Use when the user asks about asset location, tax-loss harvesting, Roth conversions, tax-efficient withdrawals, tax lot selection, or charitable giving with appreciated securities. Also trigger when users mention 'which account should I hold bonds in', 'wash-sale rule', 'tax drag', 'Roth vs Traditional', 'RMD planning', 'bracket stuffing', 'HIFO vs FIFO', or ask how to minimize taxes on investments.
development
Plan and track savings for specific financial goals including retirement, education, and home purchase. Use when the user asks about required savings rates, 529 plans, retirement accumulation targets, down payment planning, or goal prioritization. Also trigger when users mention 'how much do I need to save each month', 'am I on track for retirement', 'college savings', 'safe withdrawal rate', '4% rule', 'FIRE savings rate', 'catch-up contributions', 'employer match', or ask how to balance competing savings goals.