risk-report
Skill2 starsChanged 7 months agoMITView on GitHub
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.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- rgourley/quant-garagetheir own version, first seen Nov 1, 2026
- papisoV/Selenequanttheir own version, first seen Oct 20, 2026
- soloveliness-a11y/legal-risk-workflowtheir own version, first seen Oct 17, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- papisoV/Selenequant★ 41same name
- rgourley/quant-garage★ 7same name
- soloveliness-a11y/legal-risk-workflow★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- backtest-reviewSkill
- data-scrubSkill
- hedge-labSkill
- indicator-designSkill
- strategy-critiqueSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 80
Always present as a single markdown table, grouped by category (Return / Risk / Risk-adjusted / Tails / Stability).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Risk Report Skill
Generate a standardized one-page risk summary. Ask for the returns series location (CSV path or Python variable). Default: daily returns.
Metrics to compute
Return
- Total return (cumulative)
- CAGR (compounded annual)
- Monthly return distribution (mean, median, stdev)
Risk
- Annualized volatility
- Max drawdown (depth + duration)
- Ulcer index
- Downside deviation
Risk-adjusted
- Sharpe (rf = 0 unless specified)
- Sortino
- Calmar (CAGR / max DD)
- Omega (threshold = 0)
Tails
- 95% / 99% VaR (historical)
- 95% / 99% CVaR / Expected Shortfall
- Tail ratio (95th percentile / 5th percentile absolute)
- Skew, kurtosis
Correlation
- Beta vs. BTC
- Beta vs. SPY
- Rolling 30d correlation (chart description)
Stability
- Monthly hit rate
- Worst 3 months
- Best 3 months
- Drawdown distribution: number of DDs > 5%, > 10%, > 20%
Code template
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(),
}Output format
Always present as a single markdown table, grouped by category (Return / Risk / Risk-adjusted / Tails / Stability). Highlight any metric outside sane ranges:
- Sharpe > 3 → suspicious
- Max DD > 40% → risk
- Skew < -1 → tail-heavy losses
- Kurtosis > 5 → fat tails
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

