Analytics Toolkit · Section 4.3
Tail Value at Risk (TVaR)
Tail Value at Risk: the average loss of the worst k trials, how it differs from CTE and expected shortfall on a trial set, and the code.
Value at Risk (VaR) tells you where the tail starts. Tail Value at Risk (TVaR) tells you how bad it gets once you are in it. At confidence level , TVaR is the average loss across the worst of trials: the expected severity of the tail.
TVaR is also known as Conditional Tail Expectation (CTE) and Expected Shortfall (ES). For continuous loss distributions, the three names describe the same quantity. On a discrete distribution, and every empirical trial set is discrete, the three differ at ties and at the tail boundary. CTE conditions on the loss value (“all trials with loss at or above VaR”), which at a tie includes more than trials and can fail the sub-additivity property. ES, as the literature defines it, averages exactly the worst of probability, which splits the boundary trial fractionally whenever is not a whole number. The rank-based tail average does neither: it averages whole trials, the worst of them, and remains sub-additive.1 This site computes the rank-based average (the worst trials, defined below), whichever of the three names appears.
Unless a figure says otherwise, the numbers on this page follow the assumptions of the Metrics overview: the aggregate exceedance probability (AEP) basis, results at 100%, and the 20-trial demo tier.
Definition and implementation
Section titled “Definition and implementation”Formal definition
Section titled “Formal definition”where is the number of tail trials and is the -th largest loss (rank in the descending exceedance probability (EP) curve). In words: take the worst trials and average their losses. The connection to is through : a higher confidence level means fewer but more extreme tail trials. TVaR inherits both VaR conventions: it averages observed losses, and at it is undefined rather than the maximum.
Business interpretation
Section titled “Business interpretation”TVaR is the expected loss conditional on being in the tail. It answers the chief underwriting officer’s (CUO’s) question: “If we have a bad year, one of the worst , how bad is it on average?”
What this means in code
Section titled “What this means in code”from caldera_re.aep import aep
from caldera_re.data import cedents
from caldera_re.report import fields
from caldera_re.utils import ep_index
def tvar(curve, alpha):
"""Compute TVaR at confidence level alpha from an EP curve.
The EP curve is sorted descending by loss (rank 1 = largest).
TVaR at alpha is the mean of the worst k trials,
where k = ep_index(N, alpha).
Same conventions as VaR: an average of observed losses, and at
k = 0 the quote does not exist (NaN), rather than the maximum.
"""
N = len(curve)
k = ep_index(N, alpha)
if k < 1:
return float('nan')
return curve.iloc[:k]['loss'].mean()
if __name__ == '__main__':
from caldera_re.var import var
curve = aep(cedents.suncoast)
for alpha in [0.80, 0.90, 0.95]:
v = var(curve, alpha)
tv = tvar(curve, alpha)
k = ep_index(len(curve), alpha)
tail = curve.iloc[:k]
print(f"At alpha = {alpha:.0%} ({k} tail trials):")
print(f" Tail losses: "
+ ", ".join(f"{x:.1f}M" for x in tail['loss']))
fields([('VaR', v, 'the threshold'),
('TVaR', tv, f"mean of worst {k}")], indent=2, sep=' = ')
print() The preference also has a formal basis: VaR of a combined distribution can exceed the sum of the standalone VaRs, and TVaR cannot.
Footnotes
Section titled “Footnotes”-
Philippe Artzner, Freddy Delbaen, Jean-Marc Eber, and David Heath, “Coherent Measures of Risk”, Mathematical Finance 9(3), 1999. Introduces the coherence axioms and shows that tail conditional expectation is not sub-additive in general. Carlo Acerbi and Dirk Tasche, “On the Coherence of Expected Shortfall”, Journal of Banking & Finance 26(7), 2002. Pins down exactly where the definitions diverge on discrete distributions and proves the averaging form coherent. ↩