Conditional Value at Risk
Expected loss beyond the VaR threshold -- a tail-risk metric that answers "how bad can it get?"
What is Conditional Value at Risk?
Conditional Value at Risk (CVaR) measures how severe the losses were on your strategy's worst candles. While Value at Risk (VaR) marks the boundary where the worst 5% of candles begin, CVaR goes further and averages those worst candles together.
Think of it this way: if VaR tells you "the bad zone starts at -3%", CVaR tells you "inside the bad zone, the average loss was -7%." VaR is the door to the bad room. CVaR tells you what is inside.
Why CVaR Matters
VaR has a blind spot: two strategies can have the same VaR but very different worst-case behavior. One might have mild losses beyond the boundary while the other has catastrophic ones. CVaR distinguishes between these by looking at the actual size of the worst losses, not just where the boundary sits.
How It's Calculated
Simula finds the worst candle returns and averages them. The number of "worst" candles included depends on the total number of candles and the 5% cutoff:
In plain English: figure out how many candles fall in the bottom 5% of the sorted return list, then average those returns together. That average is CVaR.
With 40 candles: count = floor(39 * 0.05) + 1 = floor(1.95) + 1 = 1 + 1 = 2. CVaR is the average of the 2 worst returns. With 100 candles: count = floor(99 * 0.05) + 1 = 4 + 1 = 5. CVaR is the average of the 5 worst returns.
Worked Examples
A strategy has 40 candle returns. Sorted from worst to best, the 5 worst are:
-8.0%, -5.0%, -3.0%, -2.5%, -2.0%, ...
Step 1: How many returns to average?
count = floor((40 - 1) * 0.05) + 1
count = floor(1.95) + 1
count = 1 + 1 = 2
Step 2: Average the 2 worst returns:
CVaR = (-8.0% + -5.0%) / 2
CVaR = -13.0% / 2 = -6.5%
For comparison, this strategy's VaR is -3.10%. VaR says "the bad zone starts at -3.10%", and CVaR says "inside the bad zone, the average loss was -6.50%."
Two strategies both have a VaR of -3.03%. Their worst 2 candles are different:
- Strategy A worst 2: -4.0%, -3.5%
- Strategy B worst 2: -20.0%, -3.5%
VaR is the same because it marks the boundary at the 5th percentile, and both strategies have the same returns around that boundary. But their CVaR values are very different:
- Strategy A CVaR = (-4.0% + -3.5%) / 2 = -3.75%
- Strategy B CVaR = (-20.0% + -3.5%) / 2 = -11.75%
VaR alone makes these strategies look equally risky. CVaR reveals that Strategy B has far worse tail risk -- when it has a bad candle, it loses much more.
Reading Your Results
CVaR is displayed as a percentage. More negative values indicate more severe losses on the worst candles.
Things to Watch Out For
CVaR is still an average
CVaR averages the worst candle returns together. If one candle lost -20% and another lost -2%, CVaR reports -11% -- it smooths over the individual extremes.
CVaR depends on the backtest period
Like VaR, CVaR is calculated from the actual returns in the backtest. A backtest that does not include extreme market conditions will produce a less negative CVaR than one that does. A different time period could reveal worse tail behavior.
Leverage amplifies CVaR
If your strategy uses leverage, the worst candle returns are magnified. A -5% loss becomes -10% at 2x leverage, pushing CVaR proportionally more negative. Simula reports CVaR for each leverage level separately.
Related Metrics
Value at Risk (VaR) -- marks the boundary of the worst 5% of candles. CVaR and VaR work as a pair: VaR shows where the tail begins, CVaR shows the average severity within the tail.
Max Drawdown -- measures the largest cumulative decline from peak to trough. CVaR focuses on individual candle losses, while max drawdown captures the effect of multiple losing candles in sequence.
Volatility -- measures the overall variation in returns, both up and down. CVaR focuses exclusively on the worst returns, making it a more targeted measure of downside risk.
Monte Carlo simulation -- your CVaR is measured on one historical path. Reshuffling the trade sequence shows how much worse the tail could have looked under a different ordering of the same trades.