
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-codeInstalls into .claude/skills of the current project.
Files
Risk Assessment
Calculate risk metrics for stocks and positions.
Instructions
Note: If
uvis not installed orpyproject.tomlis not found, replaceuv run pythonwithpythonin 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 SPYvar_95- 95% Value at Risk (daily)var_99- 99% Value at Risk (daily)max_drawdown- Maximum drawdown in periodsharpe_ratio- Risk-adjusted returnposition_risk- If position-size provided, dollar VaR
Explain what the risk metrics mean and suggest position sizing if relevant.
Dependencies
numpyyfinance
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- Earnings Calendar
- Ib Account
- Ib Collar
- Ib Create Consolidated Report
- Ib Find Short Roll
- Ib Option Chain
- Ib Pmcc Advisor
- Ib Portfolio
- Ib Portfolio Action Report
- Ib Report Delta Adjusted Notional Exposure
- Ib Stop Loss
- Ib Trades History
- Ib Trailing Stop
- Insider Trading
- Markdown To Pdf
- Price History
- Scanner Bullish
- Scanner Pmcc
- Spread Analysis
- Whale Hunting
- Technical Analysis598
- News Sentiment246
- Fundamentals182
- Stock Quote131