Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Portfolio risk and optimization: mean-variance, risk parity, CVaR, CDaR, worst-case, and robust optimization. Factor models, Black-Litterman, NCO. Supports plotting and interactive dashboards.
.claude/skills/mkurman-riskfolio-lib/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | 87% | 0% |
| case-15 | ✗→✓ | ▲ Improved | -36% | 0% |
| case-03 | ✓→✓ | = Same ✓ | -17% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 40% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 5% | 0% |
Riskfolio-Lib provides portfolio optimization beyond mean-variance: risk parity, CVaR, CDaR, worst-case, robust optimization, NCO (Network Clustering), and hierarchical methods. Includes factor models, Black-Litterman, and built-in plotting for efficient frontiers.
bashuv pip install riskfolio-lib
pythonimport riskfolio as rp import yfinance as yf prices = yf.download(["AAPL", "MSFT", "GOOGL", "AMZN", "NVDA"], start="2022-01-01")["Close"] returns = prices.pct_change().dropna() port = rp.Portfolio(returns=returns) port.assets_stats(method_mu="hist", method_cov="hist") # Max Sharpe w = port.optimization(model="Classic", rm="MV", obj="Sharpe", hist=True) print("Optimal weights:", w.to_dict()) # Risk parity w_rp = port.optimization(model="Classic", rm="MV", obj="MinRisk", hist=True)
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 7,905 | 5,123 | -35% | 1 | 1 | 0% | 1,439 | 1,239 | -14% | 0 | 0 | — |
case-02 | fail→fail | 11,813 | 7,780 | -34% | 1 | 1 | 0% | 2,265 | 1,871 | -17% | 0 | 0 | — |
case-03 | pass→pass | 3,479 | 1,284 | -63% | 1 | 1 | 0% | 535 | 446 | -17% | 0 | 0 | — |
case-04 | pass→pass | 4,640 | 3,351 | -28% | 1 | 1 | 0% | 617 | 861 | +40% | 0 | 0 | — |
case-05 | pass→pass | 5,917 | 3,441 | -42% | 1 | 1 | 0% | 837 | 877 | +5% | 0 | 0 | — |
case-10 | pass→pass | 3,889 | 3,032 | -22% | 1 | 1 | 0% | 575 | 675 | +17% | 0 | 0 | — |
case-06 | fail→pass | 6,154 | 10,357 | +68% | 1 | 1 | 0% | 1,058 | 1,976 | +87% | 0 | 0 | — |
case-07 | pass→pass | 2,441 | 1,569 | -36% | 1 | 1 | 0% | 321 | 464 | +45% | 0 | 0 | — |
case-08 | pass→pass | 3,507 | 2,094 | -40% | 1 | 1 | 0% | 508 | 604 | +19% | 0 | 0 | — |
case-09 | pass→pass | 7,617 | 5,016 | -34% | 1 | 1 | 0% | 1,393 | 1,195 | -14% | 0 | 0 | — |
case-11 | pass→pass | 5,036 | 2,528 | -50% | 1 | 1 | 0% | 779 | 688 | -12% | 0 | 0 | — |
case-12 | pass→pass | 3,416 | 3,816 | +12% | 1 | 1 | 0% | 596 | 683 | +15% | 0 | 0 | — |
case-13 | pass→pass | 24,690 | 2,978 | -88% | 1 | 1 | 0% | 690 | 794 | +15% | 0 | 0 | — |
case-14 | pass→pass | 6,380 | 3,161 | -50% | 1 | 1 | 0% | 1,045 | 766 | -27% | 0 | 0 | — |
case-15 | fail→pass | 11,333 | 5,522 | -51% | 1 | 1 | 0% | 1,891 | 1,212 | -36% | 0 | 0 | — |
case-16 | pass→pass | 2,425 | 1,671 | -31% | 1 | 1 | 0% | 308 | 541 | +76% | 0 | 0 | — |
case-17 | pass→pass | 4,605 | 1,971 | -57% | 1 | 1 | 0% | 795 | 593 | -25% | 0 | 0 | — |
case-18 | pass→pass | 5,437 | 3,275 | -40% | 1 | 1 | 0% | 932 | 773 | -17% | 0 | 0 | — |
case-19 | pass→pass | 4,579 | 2,806 | -39% | 1 | 1 | 0% | 729 | 722 | -1% | 0 | 0 | — |
case-20 | pass→pass | 7,845 | 6,778 | -14% | 1 | 1 | 0% | 1,561 | 1,814 | +16% | 0 | 0 | — |
case-21 | pass→pass | 11,302 | 9,474 | -16% | 1 | 1 | 0% | 2,273 | 2,211 | -3% | 0 | 0 | — |
case-22 | pass→pass | 7,330 | 5,001 | -32% | 1 | 1 | 0% | 1,294 | 1,262 | -2% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +9 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.