Metrics

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.

-7%-5%-3%-2%-1%0%+1%+2%+3%+4%+5%Candle returnsVaR = -3%(the door)CVaR = -6%(average inside)Worst 5%
VaR marks where the worst 5% begins. CVaR averages the returns inside that zone, revealing how severe the tail losses actually were.

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:

How many returns to average
count = floor((total candles - 1) * 0.05) + 1
CVaR
CVaR = average of the [count] worst candle returns

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.

CVaR is always equal to or more negative than VaR
The average of the worst returns is always at least as bad as the boundary that separates them from the rest. If VaR is -3%, CVaR will be -3% or worse. The gap between VaR and CVaR tells you how much damage concentrates in the tail.

Worked Examples

40 candle returns -- basic CVaR calculation

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%."

Same VaR, different CVaR

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.

CVaR close to VaR (small gap)
The worst candles were not much worse than the 5th percentile boundary. Losses in the tail are relatively contained.
CVaR much more negative than VaR (large gap)
The worst candles were significantly worse than the boundary. The strategy has concentrated tail risk -- its bad candles are not just slightly bad, they are substantially bad.
CVaR close to 0 (e.g., -0.50%)
Even the worst candles had small losses. The strategy's tail risk is minimal.
CVaR more negative than -5.00%
The average loss on the worst candles exceeded 5%. This signals that the strategy experienced some severe declines during the backtest.
CVaR depends on sample size
With fewer candles, fewer returns are averaged into CVaR. With 20 candles, CVaR is based on just the single worst return (count = floor(19 * 0.05) + 1 = 1). With 100 candles, it averages the 5 worst. A single extreme candle has more influence on CVaR when the backtest is short.

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.

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.