MathFin
Map / Risk · Value at risk and expected shortfall / MathFin.Risk.RiskClosedForms

Closed forms for value-at-risk and expected shortfall: exponential and Pareto losses

MathFin.Risk.RiskClosedFormsMSC 91G70MSC 60E05JEL G32 source

The general value-at-risk and expected shortfall of Risk/ValueAtRisk.lean evaluated on two textbook laws (McNeil–Frey–Embrechts, Quantitative Risk Management, Example 2.14; QRM Exercise Book, Exercises 2.12 and 2.23):

  • the exponential law Exp(λ) (Mathlib's expMeasure), a light tail: VaR_α = −log(1 − α)/λ and ES_α = (1 − log(1 − α))/λ;
  • the Pareto law of Mathlib's paretoMeasure t r (type I, F(x) = 1 − (t/x)^r on [t, ∞)) and its shift to the origin, the Lomax (Pareto type II) law Pa(θ, κ) with F(x) = 1 − (κ/(κ + x))^θ on [0, ∞) (lomaxMeasure), heavy tails: VaR_α = κ((1 − α)^{−1/θ} − 1) and ES_α = κ(θ/(θ − 1)·(1 − α)^{−1/θ} − 1) for θ > 1.

The two tails separate in the shortfall-to-quantile ratio ES_α/VaR_α as α → 1: it tends to 1 for the exponential law and to θ/(θ − 1) > 1 for the Lomax law. For the type-I Pareto law the ratio is r/(r − 1) at every level. A heavy tail makes the average loss beyond VaR a fixed multiple of VaR, however far into the tail one looks.

The median shortfall, the median of the loss conditional on exceeding VaR_α, is itself a value-at-risk, MS_α = VaR_{(1+α)/2}, whenever the distribution function is continuous (medianShortfall_eq_valueAtRisk, QRM Exercise Book, Exercise 2.29 b)).

Every quantile below is read off the CDF through quantile_eq_iff: quantile μ p = a exactly when p ≤ F(a) and F(x) < p for x < a. Mathlib records the Pareto CDF only as an integral of its density; cdf_paretoMeasure_of_le evaluates it.

Main definitions

  • lomaxMeasure: the Lomax (Pareto type II) law Pa(θ, κ), the type-I Pareto law of scale κ and shape θ shifted to the origin, with F(x) = 1 − (κ/(κ + x))^θ on [0, ∞).
  • medianShortfall: the median of the law of a loss X conditioned on exceeding its value-at-risk, F⁻¹_{X | X > VaR_α(X)}(1/2).

Main results

  • valueAtRisk_eq_iff: a VaR is characterised by the CDF (from quantile_eq_iff in Probability/Laws/Quantile.lean).
  • valueAtRisk_of_hasLaw_expMeasure (via quantile_expMeasure in Probability/Laws/Quantile.lean), expectedShortfall_of_hasLaw_expMeasure: the exponential closed forms.
  • tendsto_expectedShortfall_div_valueAtRisk_expMeasure: ES_α/VaR_α → 1 (light tail).
  • cdf_paretoMeasure_of_le, cdf_paretoMeasure_of_lt, quantile_paretoMeasure: the type-I Pareto CDF and quantile.
  • expectedShortfall_of_hasLaw_paretoMeasure: ES_α = r/(r − 1)·VaR_α for type-I Pareto with r > 1.
  • cdf_lomaxMeasure, valueAtRisk_of_hasLaw_lomaxMeasure, expectedShortfall_of_hasLaw_lomaxMeasure: the Lomax CDF and closed forms.
  • tendsto_expectedShortfall_div_valueAtRisk_lomaxMeasure: for θ > 1, ES_α/VaR_α → θ/(θ − 1) as α → 1 (heavy tail).
  • medianShortfall_eq_valueAtRisk: the median of the loss beyond VaR_α is VaR_{(1+α)/2} for a continuous distribution function.

References

  • QRM Exercise Book [QRMExerciseBook], Ex. 2.12(a); Ex. 2.12(d); Ex. 2.23(a); Ex. 2.23(c); Ex. 2.29(b)

Tags

VaR closed form, exponential loss, Pareto loss, Lomax distribution, heavy tails, median shortfall, light tail, tail risk, MSC 91G70, MSC 60E05, JEL G32

Import neighbourhood

Above: what it imports. Below: what imports it.

Corpus entries

qrm-es-exponential · quantitative_risk_management.json · full statement
Expected Shortfall of an Exponential Loss

For X ~ Exp(r) (r > 0) and α ∈ (0, 1): ES_α(X) = (1 − log(1 − α))/r (the VaR is `valueAtRisk_of_hasLaw_expMeasure`: −log(1 − α)/r).

qrm-es-var-ratio-exponential · quantitative_risk_management.json · full statement
ES/VaR → 1 for the Exponential Law

For X ~ Exp(r), ES_α(X)/VaR_α(X) → 1 as α → 1⁻ (light tail).

qrm-es-lomax · quantitative_risk_management.json · full statement
Expected Shortfall of a Pareto (Lomax) Loss

For X with Lomax law F(x) = 1 − (κ/(κ + x))^θ, θ > 1, κ > 0 and α ∈ (0, 1): ES_α(X) = κ(θ/(θ − 1)·(1 − α)^(−1/θ) − 1).

qrm-es-var-ratio-pareto · quantitative_risk_management.json · full statement
ES/VaR → θ/(θ − 1) for Pareto Tails

For X with Lomax law (θ > 1, κ > 0), ES_α(X)/VaR_α(X) → θ/(θ − 1) as α → 1⁻: the heavy tail is visible in the shortfall-to-quantile ratio.

qrm-median-shortfall · quantitative_risk_management.json · full statement
Median Shortfall Equals VaR at (1 + α)/2

For a loss with continuous CDF and α ∈ (0, 1), the median of the conditional law of X given X > VaR_α(X) equals VaR_{(1+α)/2}(X).

Declarations 20

theoremMathFin.valueAtRisk_eq_iffsource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {P : Measure Ω} {X : Ω → ℝ} {α : ℝ} [IsProbabilityMeasure P], AEMeasurable X P → α ∈ Set.Ioo 0 1 → ∀ {a : ℝ}, valueAtRisk X P α = a ↔ α ≤ P.real {ω | X ω ≤ a} ∧ ∀ x < a, P.real {ω | X ω ≤ x} < α

A VaR is pinned down by the distribution function of the loss: VaR_α(X) = a ↔ α ≤ P(X ≤ a) ∧ ∀ x < a, P(X ≤ x) < α.

theoremMathFin.expectedShortfall_eq_of_valueAtRisk_eqsource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {P : Measure Ω} {X : Ω → ℝ} {α : ℝ} {f : ℝ → ℝ}, (∀ u ∈ Set.Ioo α 1, valueAtRisk X P u = f u) → expectedShortfall X P α = (1 - α)⁻¹ * ∫ (u : ℝ) in Set.Ioo α 1, f u

The VaR curve is the quantile curve on (α, 1), so ES is the average of any closed form for it.

theoremMathFin.valueAtRisk_of_hasLaw_expMeasuresource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {P : Measure Ω} {X : Ω → ℝ} {α r : ℝ}, 0 < r → HasLaw X (expMeasure r) P → α ∈ Set.Ioo 0 1 → valueAtRisk X P α = -Real.log (1 - α) / r

VaR of an exponential loss: VaR_α(X) = −log(1 − α)/λ for X ~ Exp(λ).

theoremMathFin.expectedShortfall_of_hasLaw_expMeasuresource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {P : Measure Ω} {X : Ω → ℝ} {α r : ℝ}, 0 < r → HasLaw X (expMeasure r) P → α ∈ Set.Ioo 0 1 → expectedShortfall X P α = (1 - Real.log (1 - α)) / r

ES of an exponential loss: ES_α(X) = (1 − log(1 − α))/λ for X ~ Exp(λ).

theoremMathFin.tendsto_one_sub_nhdsLT_onesource
Filter.Tendsto (fun α => 1 - α) (nhdsWithin 1 (Set.Iio 1)) (nhdsWithin 0 (Set.Ioi 0))

As the level α rises to 1, the tail mass 1 − α falls to 0 from above.

theoremMathFin.tendsto_expectedShortfall_div_valueAtRisk_expMeasuresource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {P : Measure Ω} {X : Ω → ℝ} {r : ℝ}, 0 < r → HasLaw X (expMeasure r) P → Filter.Tendsto (fun α => expectedShortfall X P α / valueAtRisk X P α) (nhdsWithin 1 (Set.Iio 1)) (nhds 1)

Light tail: for an exponential loss the shortfall-to-quantile ratio tends to 1, ES_α/VaR_α → 1 as α → 1⁻ (QRM Exercise Book, Exercise 2.23 a)).

theoremMathFin.cdf_paretoMeasure_of_ltsource
∀ {t r x : ℝ}, 0 < t → 0 < r → x < t → ↑(cdf (paretoMeasure t r)) x = 0

Below its scale t the Pareto law puts no mass: F(x) = 0 for x < t.

theoremMathFin.cdf_paretoMeasure_of_lesource
∀ {t r x : ℝ}, 0 < t → 0 < r → t ≤ x → ↑(cdf (paretoMeasure t r)) x = 1 - (t / x) ^ r

The Pareto CDF: F(x) = 1 − (t/x)^r for x ≥ t. Mathlib states the CDF only as the integral of the density; the tail integral ∫_x^∞ r t^r y^{−(r+1)} dy = (t/x)^r evaluates it.

theoremMathFin.quantile_paretoMeasuresource
∀ {p t r : ℝ}, 0 < t → 0 < r → p ∈ Set.Ioo 0 1 → quantile (paretoMeasure t r) p = t * (1 - p) ^ (-r⁻¹)

The Pareto quantile: F⁻¹(p) = t (1 − p)^{−1/r}.

theoremMathFin.integral_one_sub_rpowsource
∀ {α r : ℝ}, α < 1 → 1 < r → ∫ (u : ℝ) in Set.Ioo α 1, (1 - u) ^ (-r⁻¹) = r / (r - 1) * (1 - α) ^ (1 - r⁻¹)

∫_α^1 (1 − u)^{−1/r} du = r/(r − 1)·(1 − α)^{1 − 1/r} for r > 1: the Pareto quantile is integrable up to level 1 exactly when the mean is finite.

theoremMathFin.expectedShortfall_of_hasLaw_paretoMeasuresource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {P : Measure Ω} {X : Ω → ℝ} {α t r : ℝ}, 0 < t → 1 < r → HasLaw X (paretoMeasure t r) P → α ∈ Set.Ioo 0 1 → expectedShortfall X P α = r / (r - 1) * (t * (1 - α) ^ (-r⁻¹))

ES of a Pareto loss (r > 1): ES_α(X) = r/(r − 1)·VaR_α(X), a constant multiple of VaR_α at every level.

defMathFin.lomaxMeasuresource
ℝ → ℝ → Measure ℝ

The Lomax (Pareto type II) law Pa(θ, κ): the type-I Pareto law of scale κ and shape θ, shifted to start at 0. Its CDF is F(x) = 1 − (κ/(κ + x))^θ on [0, ∞) (cdf_lomaxMeasure); Pa(θ, 1) is the Pareto law of the QRM Exercise Book, Exercise 2.12 d).

theoremMathFin.isProbabilityMeasure_lomaxMeasuresource
∀ {θ κ : ℝ}, 0 < θ → 0 < κ → IsProbabilityMeasure (lomaxMeasure θ κ)
used by 1: cdf_lomaxMeasure
theoremMathFin.cdf_lomaxMeasuresource
∀ {θ κ : ℝ}, 0 < θ → 0 < κ → ∀ {x : ℝ}, 0 ≤ x → ↑(cdf (lomaxMeasure θ κ)) x = 1 - (κ / (κ + x)) ^ θ

The Lomax CDF: F(x) = 1 − (κ/(κ + x))^θ for x ≥ 0.

theoremMathFin.quantile_lomaxMeasuresource
∀ {p θ κ : ℝ}, 0 < θ → 0 < κ → p ∈ Set.Ioo 0 1 → quantile (lomaxMeasure θ κ) p = κ * ((1 - p) ^ (-θ⁻¹) - 1)

The Lomax quantile: F⁻¹(p) = κ((1 − p)^{−1/θ} − 1).

theoremMathFin.valueAtRisk_of_hasLaw_lomaxMeasuresource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {P : Measure Ω} {X : Ω → ℝ} {α θ κ : ℝ}, 0 < θ → 0 < κ → HasLaw X (lomaxMeasure θ κ) P → α ∈ Set.Ioo 0 1 → valueAtRisk X P α = κ * ((1 - α) ^ (-θ⁻¹) - 1)

VaR of a Lomax loss: VaR_α(X) = κ((1 − α)^{−1/θ} − 1) for X ~ Pa(θ, κ) (QRM Exercise Book, Exercise 2.12 d)).

theoremMathFin.expectedShortfall_of_hasLaw_lomaxMeasuresource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {P : Measure Ω} {X : Ω → ℝ} {α θ κ : ℝ}, 1 < θ → 0 < κ → HasLaw X (lomaxMeasure θ κ) P → α ∈ Set.Ioo 0 1 → expectedShortfall X P α = κ * (θ / (θ - 1) * (1 - α) ^ (-θ⁻¹) - 1)

ES of a Lomax loss (θ > 1, finite mean): ES_α(X) = κ(θ/(θ − 1)·(1 − α)^{−1/θ} − 1) for X ~ Pa(θ, κ) (QRM Exercise Book, Exercise 2.12 d)).

theoremMathFin.tendsto_expectedShortfall_div_valueAtRisk_lomaxMeasuresource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {P : Measure Ω} {X : Ω → ℝ} {θ κ : ℝ}, 1 < θ → 0 < κ → HasLaw X (lomaxMeasure θ κ) P → Filter.Tendsto (fun α => expectedShortfall X P α / valueAtRisk X P α) (nhdsWithin 1 (Set.Iio 1)) (nhds (θ / (θ - 1)))

Heavy tail: for a Lomax loss with θ > 1 the shortfall-to-quantile ratio tends to θ/(θ − 1) > 1, ES_α/VaR_α → θ/(θ − 1) as α → 1⁻ (QRM Exercise Book, Exercise 2.23 c)).

defMathFin.medianShortfallsource
{Ω : Type u_1} → {mΩ : MeasurableSpace Ω} → (Ω → ℝ) → Measure Ω → ℝ → ℝ

The median shortfall of a loss X at level α: the median of the law of X conditioned on exceeding its value-at-risk, MS_α(X) = F⁻¹_{X | X > VaR_α(X)}(1/2).

theoremMathFin.medianShortfall_eq_valueAtRisksource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {P : Measure Ω} {X : Ω → ℝ} {α : ℝ} [IsProbabilityMeasure P], Continuous ↑(cdf (Measure.map X P)) → α ∈ Set.Ioo 0 1 → medianShortfall X P α = valueAtRisk X P ((1 + α) / 2)

Median shortfall is a value-at-risk (QRM Exercise Book, Exercise 2.29 b)): for a loss with a continuous distribution function, MS_α(X) = VaR_{(1+α)/2}(X). Given that the loss exceeds VaR_α, its conditional CDF is (F − α)/(1 − α), which crosses 1/2 exactly where F crosses (1 + α)/2.