Portfolio Risk Analyzer
БесплатноБез исполняемых скриптовНе проверенComplete investment portfolio risk management system. Analyze positions, calculate risk metrics, stress test scenarios, optimize allocations, and generate…
от modbender★ 21 звезда на GitHubОб этом скилле
Portfolio Risk Analyzer
Complete investment portfolio risk management system. Analyze positions, calculate risk metrics, stress test scenarios, optimize allocations, and generate institutional-grade risk reports — all without external APIs.
1. Portfolio Intake
When the user shares their portfolio (positions, tickers, amounts), structure it into this format:
portfolio:
name: "User Portfolio"
currency: USD
as_of: "2026-02-15"
positions:
- ticker: AAPL
shares: 50
avg_cost: 185.00
current_price: 228.50 # Look up via web search
asset_class: US_EQUITY
sector: Technology
- ticker: BTC
units: 0.5
avg_cost: 42000
current_price: 97500
asset_class: CRYPTO
sector: Digital Assets
- ticker: VOO
shares: 100
avg_cost: 410.00
current_price: 535.00
asset_class: US_EQUITY_ETF
sector: Broad Market
cash:
amount: 15000
currency: USD
Price Lookup
For each position, use web search to find current price:
- Search:
[TICKER] stock price today - For crypto:
[COIN] price USD today - Record source and timestamp
Portfolio Summary Table
| Position | Shares | Cost Basis | Current Value | Weight | P&L | P&L % |
|---|---|---|---|---|---|---|
| AAPL | 50 | $9,250 | $11,425 | 18.2% | +$2,175 | +23.5% |
| ... | ... | ... | ... | ... | ... | ... |
| TOTAL | $XX,XXX | $XX,XXX | 100% | ±$X,XXX | ±X.X% |
2. Risk Metrics Calculator
Calculate ALL of the following for every portfolio analysis:
2.1 Concentration Risk
Position Concentration:
- Any single position >20% of portfolio = HIGH RISK ⚠️
- Any single position >10% = MODERATE RISK
- Top 3 positions >50% = CONCENTRATED
Sector Concentration:
- Any sector >30% = OVERWEIGHT
- Count unique sectors — fewer than 4 = UNDER-DIVERSIFIED
Asset Class Breakdown:
- Equities: X%
- Fixed Income: X%
- Crypto: X%
- Cash: X%
- Alternatives: X%
2.2 Value at Risk (VaR) — Parametric Method
Calculate the maximum expected loss at given confidence levels:
Daily VaR Calculation:
1. Look up each position's historical volatility (annualized)
- Use web search: "[TICKER] historical volatility 30 day"
- Typical ranges: Large cap stocks 15-25%, Crypto 50-80%, Bonds 5-10%
2. Convert to daily volatility:
Daily Vol = Annual Vol / √252
3. Position VaR (95% confidence):
Position VaR = Position Value × Daily Vol × 1.645
4. Position VaR (99% confidence):
Position VaR = Position Value × Daily Vol × 2.326
5. Portfolio VaR (simplified — assumes correlation ≈ 0.5 for stocks):
Portfolio VaR ≈ √(Σ(Position VaR²) + 2×0.5×Σ(VaR_i × VaR_j))
Report:
- 1-Day 95% VaR: $X,XXX (X.X% of portfolio)
- 1-Day 99% VaR: $X,XXX (X.X% of portfolio)
- 10-Day 95% VaR: $X,XXX (= 1-Day VaR × √10)
- Monthly 95% VaR: $X,XXX (= 1-Day VaR × √21)
2.3 Maximum Drawdown Estimation
Based on asset class historical max drawdowns:
- US Large Cap: -50% (2008-09), typical correction -20%
- US Small Cap: -55%, typical correction -25%
- International Equity: -55%, typical -25%
- Emerging Markets: -65%, typical -30%
- Investment Grade Bonds: -15%, typical -5%
- High Yield Bonds: -30%, typical -10%
- REITs: -70%, typical -25%
- Crypto (BTC): -85%, typical -50%
- Gold: -45%, typical -15%
- Cash: 0%
Portfolio Max Drawdown Estimate:
= Σ(Position Weight × Asset Class Max Drawdown)
Report:
- Estimated worst-case drawdown: -$XX,XXX (XX.X%)
- Estimated typical correction: -$XX,XXX (XX.X%)
- Recovery time estimate: X-X months (based on historical averages)
2.4 Beta & Market Sensitivity
For each equity position:
- Look up beta via web search: "[TICKER] beta"
- Portfolio Beta = Σ(Position Weight × Position Beta)
Interpretation:
- Beta > 1.2: Portfolio is AGGRESSIVE (amplifies market moves)
- Beta 0.8-1.2: Portfolio is NEUTRAL
- Beta < 0.8: Portfolio is DEFENSIVE
- Negative beta positions: HEDGE value
Market Impact:
- If S&P 500 drops 10%, portfolio expected to move: Beta × -10%
2.5 Sharpe Ratio Estimation
Portfolio Expected Return = Σ(Weight × Expected Return)
Where Expected Return by asset class:
- US Large Cap: 8-10% annually
- US Small Cap: 9-11%
- International Developed: 6-8%
- Emerging Markets: 8-12%
- Investment Grade Bonds: 4-5%
- High Yield: 6-7%
- Crypto: highly variable (use 0% for conservative estimate)
- REITs: 7-9%
- Cash: current money market rate (~4.5%)
Risk-Free Rate: current 3-month T-bill rate (search if needed)
Sharpe Ratio = (Portfolio Expected Return - Risk-Free Rate) / Portfolio Volatility
Rating:
- > 1.0: EXCELLENT risk-adjusted returns
- 0.5-1.0: GOOD
- 0-0.5: MEDIOCRE — consider rebalancing
- < 0: POOR — return doesn't justify risk
2.6 Income Analy
Установить Portfolio Risk Analyzer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл Portfolio Risk Analyzer?
Complete investment portfolio risk management system. Analyze positions, calculate risk metrics, stress test scenarios, optimize allocations, and generate institutional-grade risk reports — all wit...
Как установить скилл Portfolio Risk Analyzer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Portfolio Risk Analyzer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic