What is CVaR?

Conditional Value at Risk, also called expected shortfall, is the average outcome across the worst share of possible scenarios — for example, the mean profit across the worst 5% of outcomes. Where probability of loss asks how often things go badly and an average asks what happens typically, CVaR asks how bad the bad cases are on average. It is magnitude-aware, unlike a frequency, and deliberately ignores the upside, unlike a mean, which makes it the standard measure when the purpose is to bound a downside rather than to describe a central tendency.

01/Formula

Formula

VaR at level α  = the α-quantile of the outcome distribution (the cutoff)
CVaR at level α = average outcome given the outcome is below that cutoff

A risk-aware objective blends the two views:
  objective = (1 − w) × expected profit  +  w × CVaR
  w = 0 → pure expected profit;  w = 1 → pure downside protection

Example

Two budget levels for the same Shopee campaign.

            expected daily profit   worst-5% average
  ฿8,000/day        +฿1,900              −฿1,100
  ฿14,000/day       +฿2,300              −฿6,400

The higher budget wins on the average by ฿400 and loses ฿5,300 more on
a bad day. Which is correct depends on how much a bad week costs you.

02/In detail

How is CVaR different from probability of loss?

Probability of loss counts occurrences; CVaR measures amounts. A campaign that loses 50 baht on most days has a high probability of loss and a mild CVaR. A campaign that wins almost always and occasionally loses forty thousand baht has a low probability of loss and a severe CVaR. These are opposite risk profiles and the frequency measure cannot distinguish them, which is why a stop rule built on probability of loss will happily keep a campaign whose rare failures are the thing that actually threatens the business. CVaR is specifically the tool for that case.

Why not just use the average?

Because an average is fragile when the outcome distribution has a long tail, which marketplace campaign profit reliably does — many small losing days and occasional large wins. The mean of such a distribution is dominated by the rare large outcomes, so it is highly sensitive to how well the model estimated their probability and their size. Small errors in the tail produce large swings in the mean. CVaR looks at the downside deliberately rather than being dragged around by the upside, and it is a coherent risk measure, meaning it behaves sensibly when positions are combined — a property the more familiar value at risk does not have.

How do you choose the risk weight?

From the business, not from the model. The weight expresses how much expected profit the shop is willing to give up to reduce the severity of bad outcomes, and that depends on things no optimizer can observe: cash runway, whether a bad month is survivable, how much of the budget this campaign represents, and whether the shop is in a growth phase or defending a position. A shop with thin working capital should carry a high weight and accept a lower average. A shop with reserves and a long horizon should carry a low one. Setting it once and reviewing it when circumstances change is more sensible than tuning it per campaign.

03/Why it matters

The trap, in one paragraph.

Marketplace ad outcomes are skewed and their downside is not symmetric with their upside — a bad month consumes working capital that constrains the next three, while a good month mostly just funds the next campaign. Optimising only the average treats those two as equivalent. Carrying a tail measure alongside it is what lets a shop scale spend without occasionally taking a loss it cannot absorb.

Common mistake

Reading CVaR as a forecast of what will happen. It is the average of the bad cases, conditional on being in them — a planning figure for the downside, not an expectation. Quoting it as “this campaign will lose ฿6,400” inverts its meaning; the correct reading is “if the worst one-in-twenty week arrives, it costs about ฿6,400 on average”.

04/In DataGlass

How CVaR is used in DataGlass.

For campaigns with enough history to model the whole outcome distribution, DataGlass optimizes a blend of expected profit and the tail average rather than expected profit alone, so the recommended budget reflects how severe the downside is and not only how good the average looks. The tail figure is shown as evidence on the recommendation.

05/Sources

  1. [1]
    Expected shortfall

    Definition of conditional value at risk as the expected loss conditional on exceeding the value-at-risk threshold.

  2. [2]
    Coherent risk measure

    The axioms CVaR satisfies and value at risk does not, including subadditivity — why CVaR behaves sensibly when risks are combined across campaigns.

Stop guessing. Start deploying.

Join the sellers using DataGlass to turn shop data into the next profit-maximizing action.