Risk Metrics

Volatility, drawdown, Sharpe, Sortino, and beta, all calculated from your actual snapshot history. It helps you see whether your returns came from skill, leverage, or simply enduring a rough ride.

Computes portfolio risk metrics from daily snapshot data. Beta is calculated against SPY by default (or a custom benchmark) when a Finnhub key is configured. Sharpe and Sortino assume a 5% annual risk-free rate unless overridden.
$firma show risk
Risk Metrics
Period2024-01-02 → 2026-04-27 (320 days)
Returns
Total+61.23%
Annualized+28.47%
Volatility
Daily std dev1.82%
Annualized28.91%
Drawdown
Max drawdown-22.40%
Current from ATH-8.30%
Risk-Adjusted Ratios (rf = 5.0%)
Sharpe1.23
Sortino1.87
Beta vs SPY
Beta1.450 more volatile than market
Requires at least 10 daily snapshots. Run firma add snapshot regularly, or lean on firma brief, which auto-snaps if today's entry is missing.
vol
Volatility
Standard deviation of daily returns, annualized (×√252). Higher numbers mean wider day-to-day swings. Concentrated portfolios often land around 25-35%, while broad-market funds are usually closer to 12-18%.
dd
Drawdown
Peak-to-trough decline. Max drawdown shows the worst stretch you lived through, while current drawdown shows how far you are from your all-time high today.
shr
Sharpe Ratio
Excess return per unit of total volatility. Above 1 is solid, above 2 is excellent, and below 0 means you'd have been better off in T-bills.
sor
Sortino Ratio
Like Sharpe, but it only penalizes downside volatility. That makes it more useful when upside swings are not something you consider a real risk.
β
Beta
Sensitivity to market moves. β = 1 means you generally move with the benchmark. β = 1.5 means a 1% market move tends to move your portfolio 1.5%, while β = 0.7 means a milder response.
win
Win Rate
Percent of days with positive returns. A high win rate paired with a weak Sharpe often means lots of small wins were wiped out by a few large losses.
--from / --toDate range (default: all available snapshots → today)
-b, --benchmarkTicker for beta calculation (default: SPY)
--rf <rate>Annual risk-free rate % for Sharpe / Sortino (default: 5.0)
--jsonOutput as JSON for scripting
MIT License