Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Balance portfolio risk and return using Markowitz mean-variance, CVaR, Risk parity, and Kelly criterion methods.
.claude/skills/yogsoth-ai-risk-balancing/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 61% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 183% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 90% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 64% | 0% |
Construct a portfolio that achieves acceptable returns while managing downside risk, correlation between failures, and tail events. Applies Markowitz-style thinking beyond finance to any domain with uncertain outcomes.
| Dimension | Target | |-----------|--------| | Candidates evaluated | 8-20 | | Risk factors modeled | 2-5 | | Correlation pairs assessed | key pairs | | Efficient frontier points | >=5 |
| Field | Type | Description | |-------|------|-------------| | candidates | list | Candidates with expected return and risk estimates | | correlation_matrix | matrix | Pairwise correlation of candidate outcomes | | risk_tolerance | number | Stakeholder risk appetite parameter | | efficient_frontier | list | Risk-return trade-off curve | | selected_portfolio | list | Final allocation balancing risk and return |
| Tactic | When | |--------|------| | pareto-frontier-construction | Building the efficient frontier (risk vs return) | | scenario-stress-testing | Testing portfolio under adverse scenarios |
| SOP | Purpose | |-----|---------| | objective-definition | Define risk and return metrics | | optimization-run | Compute efficient frontier | | pareto-visualization | Visualize risk-return trade-off | | selection-from-frontier | Select portfolio matching risk tolerance | | scenario-construction | Define stress scenarios | | portfolio-evaluation-per-scenario | Test portfolio under stress |
yamlstrategy: risk-balancing selected_portfolio: - candidate: <name> allocation_weight: <0-1> expected_return: <value> risk_contribution: <value> portfolio_expected_return: <aggregate> portfolio_risk: <variance or CVaR> sharpe_ratio: <risk-adjusted return> method_used: <mean-variance|CVaR|risk-parity|Kelly>
<!-- BEGIN available-tables (generated) -->
Optional, no fixed order; the final leaf is always a sop.
| Tactic | When to use | | --- | --- | | pareto-frontier-construction | Build the Pareto frontier from multi-objective optimization, visualize trade-offs, and select a portfolio from non-dominated solutions. | | scenario-stress-testing | Construct distinct future scenarios, evaluate portfolio performance under each, and identify vulnerabilities and robustness characteristics. |
Optional, no fixed order; the final leaf is always a sop.
| SOP | When to use | | --- | --- | | objective-definition | Define optimization objectives, constraints, and trade-off preferences from context and candidate information. | | optimization-run | Execute multi-objective optimization on candidates to produce a Pareto front of non-dominated solutions. | | pareto-visualization | Create visual representation of the Pareto frontier showing trade-offs between objectives with narrative explanation. | | portfolio-evaluation-per-scenario | Evaluate a specific portfolio's performance metrics and vulnerabilities under a given scenario. | | scenario-construction | Construct distinct future scenarios spanning key uncertainties for portfolio stress testing. | | selection-from-frontier | Select the final portfolio from the Pareto front by applying stakeholder preferences and decision criteria. |
<!-- END available-tables (generated) -->
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-06 | pass→fail | 16,770 | 25,401 | +51% | 1 | 1 | 0% | 1,933 | 4,355 | +125% | 0 | 0 | — |
case-05 | pass→fail | 15,690 | 25,225 | +61% | 1 | 1 | 0% | 2,843 | 4,686 | +65% | 0 | 0 | — |
case-01 | fail→fail | 24,451 | 43,525 | +78% | 1 | 1 | 0% | 4,121 | 9,168 | +122% | 0 | 0 | — |
case-02 | fail→fail | 24,340 | 50,050 | +106% | 1 | 1 | 0% | 5,224 | 9,163 | +75% | 0 | 0 | — |
case-03 | fail→pass | 30,220 | 42,544 | +41% | 1 | 1 | 0% | 4,962 | 7,998 | +61% | 0 | 0 | — |
case-04 | pass→pass | 16,816 | 28,266 | +68% | 1 | 1 | 0% | 2,609 | 7,126 | +173% | 0 | 0 | — |
case-07 | fail→pass | 21,105 | 44,634 | +111% | 1 | 1 | 0% | 3,190 | 9,037 | +183% | 0 | 0 | — |
case-08 | pass→fail | 20,146 | 42,237 | +110% | 1 | 1 | 0% | 4,188 | 9,119 | +118% | 0 | 0 | — |
case-09 | fail→pass | 25,549 | 30,765 | +20% | 1 | 1 | 0% | 4,523 | 5,959 | +32% | 0 | 0 | — |
case-10 | fail→pass | 23,414 | 35,238 | +50% | 1 | 1 | 0% | 3,850 | 7,327 | +90% | 0 | 0 | — |
case-11 | fail→pass | 26,384 | 37,558 | +42% | 1 | 1 | 0% | 4,419 | 7,245 | +64% | 0 | 0 | — |
case-17 | fail→pass | 19,675 | 30,773 | +56% | 1 | 1 | 0% | 3,026 | 5,912 | +95% | 0 | 0 | — |
case-12 | fail→pass | 14,669 | 17,326 | +18% | 1 | 1 | 0% | 2,082 | 4,198 | +102% | 0 | 0 | — |
case-13 | fail→fail | 29,509 | 40,731 | +38% | 1 | 1 | 0% | 5,666 | 9,128 | +61% | 0 | 0 | — |
case-14 | fail→pass | 22,024 | 32,445 | +47% | 1 | 1 | 0% | 3,562 | 6,591 | +85% | 0 | 0 | — |
case-15 | fail→pass | 30,272 | 40,879 | +35% | 1 | 1 | 0% | 5,995 | 8,597 | +43% | 0 | 0 | — |
case-16 | fail→pass | 25,802 | 43,926 | +70% | 1 | 1 | 0% | 4,384 | 9,056 | +107% | 0 | 0 | — |
case-18 | fail→pass | 26,498 | 19,736 | -26% | 1 | 1 | 0% | 4,809 | 4,031 | -16% | 0 | 0 | — |
case-19 | fail→pass | 40,875 | 32,787 | -20% | 1 | 1 | 0% | 7,697 | 6,688 | -13% | 0 | 0 | — |
case-20 | fail→fail | 20,853 | 33,784 | +62% | 1 | 1 | 0% | 3,262 | 9,118 | +180% | 0 | 0 | — |
case-21 | fail→fail | 26,968 | 42,251 | +57% | 1 | 1 | 0% | 4,734 | 9,119 | +93% | 0 | 0 | — |
case-22 | fail→pass | 23,541 | 41,835 | +78% | 1 | 1 | 0% | 4,206 | 9,120 | +117% | 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 +37 percentage points is the difference between those two pass rates over the 22 comparable cases. 6 cases got worse with the skill loaded, and they are included in that figure.
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.