Generate a one-page risk summary from a returns series. Computes Sharpe, Sortino, max DD, CVaR, tail ratio, rolling correlation. Use when analyzing backtest or live P&L output.
Ships in quant-review-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generate a standardized one-page risk summary. Ask for the returns series location (CSV path or Python variable). Default: daily returns.
import numpy as np
import pandas as pd
def risk_report(returns: pd.Series, periods_per_year: int = 252) -> dict:
r = returns.dropna()
cum = (1 + r).cumprod()
dd = cum / cum.cummax() - 1
downside = r[r < 0]
var95 = np.percentile(r, 5)
cvar95 = r[r <= var95].mean()
return {
"total_return": cum.iloc[-1] - 1,
"cagr": cum.iloc[-1] ** (periods_per_year / len(r)) - 1,
"vol_annual": r.std() * np.sqrt(periods_per_year),
"sharpe": r.mean() / r.std() * np.sqrt(periods_per_year),
"sortino": r.mean() / downside.std() * np.sqrt(periods_per_year),
"max_dd": dd.min(),
"dd_duration_days": (dd < 0).astype(int).groupby(dd.eq(0).cumsum()).sum().max(),
"calmar": (cum.iloc[-1] ** (periods_per_year / len(r)) - 1) / abs(dd.min()),
"var_95": var95,
"cvar_95": cvar95,
"skew": r.skew(),
"kurtosis": r.kurtosis(),
"hit_rate": (r > 0).mean(),
}
Always present as a single markdown table, grouped by category (Return / Risk / Risk-adjusted / Tails / Stability). Highlight any metric outside sane ranges:
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
6 skills in this plugin
/backtest-reviewAudit a trading-strategy backtest for look-ahead bias, overfitting, unrealistic assumptions, and regime-dependence. Use this skill when reviewing backtest code, backtest results, equity curves, or considering whether to deploy a strategy live./data-scrubAudit a market-data CSV for missing bars, timezone drift, weekend handling, stale ticks, duplicate timestamps, and survivorship. Use before running any backtest on new data./hedge-labExplore hedging constructs for a crypto position — delta hedging, basis trading, funding-rate capture, cross-exchange arb. Use when holding directional BTC/ETH exposure and wanting to reduce risk without closing the position./quant-review-skills:risk-reportfrom quant-review-skills
quant-review-skills@fin-skills is listed by howard-lynn-ye/fin-rsi — review the source before installing
npx claudepluginhub howard-lynn-ye/fin-rsi --plugin quant-review-skills