Skip to main content

Portfolio Risk Metrics

Value at Risk, Conditional VaR, portfolio volatility, drawdown analysis, Ulcer Index, and Ulcer Performance Index: what they mean and how to calculate them in Thrive.

From Thrive on YouTube

Watch the matching Thrive video

Watch the series
Scaling Risk After Wins Without Giving Them Back

Scaling Risk After Wins Without Giving Them Back

Part of Risk Management and Position Sizing. Education only. Not financial advice.

Value at Risk (VaR)

Value at Risk answers a simple question: what is the worst loss I should expect on a normal day? Specifically, a 95% daily VaR of $5,000 means there is a 5% chance of losing more than $5,000 in a single day. It does not tell you how much more, that is where CVaR comes in, but it draws a line in the sand for planning purposes.

Parametric VaR

Parametric VaR assumes returns follow a known distribution (typically normal or Student-t). The formula is: VaR = μ − z_α × σ, where μ is the mean return, z_α is the critical value (1.645 for 95%, 2.326 for 99%), and σ is the standard deviation. It is fast to compute but dangerous for crypto because the normal distribution dramatically underestimates tail risk. BTC has experienced single-day moves of 30%+ that a normal distribution says should happen once every few million years.

Historical VaR

Historical VaR makes no distributional assumption. It simply sorts your actual past returns and reads off the percentile. The 95% historical VaR is the 5th percentile of your return history. This captures the actual fat tails in your data, but assumes the future will resemble the past. In crypto, this is problematic because entirely new crash modes emerge (Luna/UST, FTX) that have no precedent in your historical sample.

sql-VaR analysis in the Workbench
1-- Compute parametric and historical VaR at 95% and 99% levels
2SELECT *
3FROM portfolio_risk_analysis('BTC,ETH,SOL,AVAX,LINK')
4WHERE metric IN (
5 'var_95_parametric',
6 'var_99_parametric',
7 'var_95_historical',
8 'var_99_historical',
9 'portfolio_value'
10);
11
12-- Interpretation:
13-- var_95_parametric = -3.2% means on 95% of days, loss won't exceed 3.2%
14-- var_99_historical = -7.8% means on 99% of days, loss won't exceed 7.8%
15-- If your portfolio is $100k, the 99% daily VaR is $7,800

Conditional VaR (CVaR) / Expected Shortfall

VaR tells you the threshold of your worst expected day. CVaR tells you the average loss on days that exceed that threshold. If your 95% VaR is -5% but your CVaR is -12%, it means that on the worst 5% of days, you lose an average of 12%, not just 5%. CVaR is a superior risk measure for crypto because it captures the severity of tail events, not just their frequency.

CVaR is also a coherent risk measure, meaning it satisfies the mathematical properties that make it suitable for portfolio optimization. VaR is not coherent. It can give counterintuitive results where diversification appears to increase risk. Every serious risk framework should use CVaR alongside or instead of VaR.

sql-CVaR / Expected Shortfall analysis
1-- Compare VaR and CVaR to understand tail severity
2SELECT *
3FROM portfolio_risk_analysis('BTC,ETH,SOL')
4WHERE metric IN (
5 'var_95_historical',
6 'cvar_95',
7 'var_99_historical',
8 'cvar_99',
9 'tail_ratio'
10);
11
12-- The gap between VaR and CVaR reveals tail severity.
13-- A large gap (CVaR >> VaR) signals fat-tailed distributions
14-- where extreme losses are disproportionately large.

CVaR over VaR for portfolio construction

When optimizing portfolio weights, use CVaR as your risk measure instead of variance or VaR. A minimum-CVaR portfolio explicitly minimizes expected losses in the worst scenarios: exactly the situations where you need protection most. In crypto, where tail events are regime-defining, this distinction is the difference between surviving a crash and getting wiped out.

Portfolio Volatility

Portfolio volatility is not simply the weighted average of individual asset volatilities. The correlation structure between assets determines whether diversification actually reduces risk. The portfolio variance formula is: σ²_p = Σᵢ Σⱼ wᵢ wⱼ σᵢ σⱼ ρᵢⱼ, where wᵢ are weights, σᵢ are individual volatilities, and ρᵢⱼ are pairwise correlations. When correlations are low, portfolio volatility can be dramatically lower than any individual asset. When correlations spike to 1.0 during crises, as crypto assets tend to do, diversification benefits evaporate precisely when you need them most.

sql-Portfolio volatility metrics
1-- Annualized and rolling volatility analysis
2SELECT *
3FROM portfolio_risk_analysis('BTC,ETH,SOL,AVAX')
4WHERE metric IN (
5 'annualized_volatility',
6 'rolling_30d_volatility',
7 'rolling_90d_volatility',
8 'volatility_of_volatility',
9 'volatility_regime'
10);
11
12-- volatility_of_volatility (vol of vol) measures
13-- how unstable your risk is. High vol-of-vol means
14-- your position sizing needs dynamic adjustment.

Drawdown Analysis

Maximum drawdown is the most psychologically relevant risk metric. A portfolio that drops 60% from peak needs a 150% gain just to break even. Drawdown analysis goes beyond the maximum: it examines the duration (how long you were underwater), the recovery time (how long to reach a new peak), and the frequency of significant drawdowns.

sql-Comprehensive drawdown analysis
1-- Full drawdown analysis from Thrive
2SELECT *
3FROM portfolio_drawdown_analysis()
4WHERE metric IN (
5 'max_drawdown',
6 'max_drawdown_duration_days',
7 'max_drawdown_recovery_days',
8 'current_drawdown',
9 'average_drawdown',
10 'drawdown_count_10pct',
11 'longest_underwater_days'
12);

Ulcer Index and Ulcer Performance Index

The Ulcer Index measures the depth and duration of drawdowns in a single number. Unlike standard deviation, which treats upside and downside volatility equally, the Ulcer Index only captures the pain of being underwater. The formula is: UI = √(1/n × Σ Dᵢ²), where Dᵢ is the percentage drawdown from the running peak at each point. A portfolio that recovers quickly from shallow drawdowns has a low Ulcer Index. One that grinds sideways in a deep drawdown for months has a punishingly high index.

The Ulcer Performance Index (UPI) is a risk-adjusted return metric that uses the Ulcer Index as the risk denominator: UPI = (Rp − Rf) / UI. It is a superior alternative to the Sharpe ratio for evaluating portfolios where drawdown severity is the primary concern, which is every crypto portfolio. A high UPI means you are generating returns without subjecting your capital to prolonged, deep drawdowns.

sql-Ulcer Index in the Workbench
1-- Ulcer-based risk metrics
2SELECT *
3FROM portfolio_risk_analysis('BTC,ETH,SOL,AVAX,LINK')
4WHERE metric IN (
5 'ulcer_index',
6 'ulcer_performance_index',
7 'sharpe_ratio',
8 'sortino_ratio',
9 'calmar_ratio'
10);
11
12-- Compare UPI against Sharpe and Sortino.
13-- UPI better captures the real trader experience:
14-- nobody loses sleep over upside volatility,
15-- but a 6-month drawdown destroys discipline and capital.

Which risk metric to prioritize

Use Sharpe for quick comparisons. Use CVaR for portfolio construction and worst-case planning. Use the Ulcer Performance Index for evaluating your actual trading experience over time. All three are available in every Workbench risk analysis query. Use them together for a complete picture.
Module Quiz

1.Your portfolio has a 95% VaR of -4% and a 95% CVaR of -11%. What does this tell you about the portfolio's tail risk?

2.Why is the Ulcer Index considered more relevant than standard deviation for evaluating crypto portfolio risk?

0/2 answered

Put this lesson to work

Free on Thrive, no account needed.