staskh avatar

Risk Assessment

This gives you the core risk metrics traders actually care about: historical volatility, beta against SPY, Value at Risk at both 95% and 99% confidence levels, max drawdown, and Sharpe ratio. You can pass in a position size to get dollar-based VaR, which is handy for actual position sizing decisions. It pulls data via yfinance and lets you specify the lookback period from one month to a year. The output is straightforward JSON that Claude can explain in plain language. If you're doing any kind of portfolio work or need to quantify downside risk beyond just looking at price charts, this covers the standard metrics without requiring you to spin up a Bloomberg terminal.

skills.sh installs
105
GitHub stars
406
last updated
Jun 11, 2026

Install

$ npx -y skills add staskh/trading_skills --skill risk-assessment --agent claude-code

Installs into .claude/skills of the current project.

Files

Risk Assessment

Calculate risk metrics for stocks and positions.

Instructions

Note: If uv is not installed or pyproject.toml is not found, replace uv run python with python in all commands below.

uv run python scripts/risk.py SYMBOL [--period PERIOD] [--position-size SIZE]

Arguments

  • SYMBOL - Ticker symbol
  • --period - Analysis period: 1mo, 3mo, 6mo, 1y (default: 1y)
  • --position-size - Dollar amount for position-specific metrics (optional)

Output

Returns JSON with:

  • volatility - Historical volatility (annualized)
  • beta - Beta vs SPY
  • var_95 - 95% Value at Risk (daily)
  • var_99 - 99% Value at Risk (daily)
  • max_drawdown - Maximum drawdown in period
  • sharpe_ratio - Risk-adjusted return
  • position_risk - If position-size provided, dollar VaR

Explain what the risk metrics mean and suggest position sizing if relevant.

Dependencies

  • numpy
  • yfinance

Timezone

All timestamps and time-based calculations must use the America/New_York timezone. All JSON output must include generated_at (NY time string) and data_delay fields.

Sponsors

Details

Repository
github.com/staskh/trading_skills
Category
Finance & Trading
License
MIT
First seen
Jun 11, 2026

More from staskh/trading_skills

All 28
1staskh avatarib-report-delta-adjusted-notional-exposurestaskh/trading_skillsReport delta-adjusted notional exposure across all IBKR accounts. Calculates option deltas using Black-Scholes and reports long/short exposure by account and un0skills.sh installs
2staskh avatarprice-historystaskh/trading_skillsGet historical price data (OHLCV) for a stock. Use when user asks about price history, historical data, past performance, price over time, or needs data for cha0skills.sh installs
3tradermonty avatarmarket-news-analysttradermonty/claude-trading-skillsThis skill should be used when analyzing recent market-moving news events and their impact on equity markets and commodities. Use this skill when the user reque4.4Kskills.sh installs
4tradermonty avatarcanslim-screenertradermonty/claude-trading-skillsScreen US stocks using William O'Neil's CANSLIM growth stock methodology. Use when user requests CANSLIM stock screening, growth stock analysis, momentum stock 3.8Kskills.sh installs
5stripe avatarconnect-recommendstripe/aiUse this skill when the user asks about Stripe Connect configuration, charge patterns, Dashboard access, or how to get started with Connect, is building a marke3.7Kskills.sh installs
6tradermonty avatarearnings-calendartradermonty/claude-trading-skillsThis skill retrieves upcoming earnings announcements for US stocks using the Financial Modeling Prep (FMP) API. Use this when the user requests earnings calenda3.7Kskills.sh installs