Basic Prerequisites: Statistics & Inference (quantiles, distributions).


1. Intuition & Practical Objective

This page builds the why of Value at Risk with no prior risk knowledge needed. The objective is one idea: VaR is just a quantile of your portfolio’s loss distribution - the number that says “I only lose more than this with probability .” Everything else in this folder is about how to obtain that quantile in practice, because you almost never know the true loss distribution; you have to estimate it from a model or from data.

Start with the dumbest framing. A trader holds a portfolio. Tomorrow the market moves and the portfolio gains or loses dollars. We don’t know in advance - it is random, drawn from some distribution. Define the loss (positive when we lose money, and a negative loss is a gain). The 99% VaR over one day is the number such that

i.e. 99% of the time the loss is no worse than ; only on 1 day in 100 do we lose more. Three mental “aha”s:

  1. VaR is a quantile, not an expectation. It speaks about the right tail of the loss distribution, not its center. The mean loss could be tiny while VaR is huge - they answer different questions (“how much on a normal day” vs “how bad on a bad day”).

  2. Confidence and horizon are the two knobs. Raise confidence and VaR grows (you go further into the tail); lengthen the horizon and VaR grows like under i.i.d. returns. There is no single “the VaR” - every VaR number is meaningless unless it comes with a confidence and a horizon.

  3. VaR is model-free as a definition, but not as a number. The definition “the -quantile of the loss distribution” needs no assumptions. But computing it requires the distribution, and that is where the three methods part ways: parametric assumes the shape, historical samples it from the past, Monte Carlo builds it by simulation.


2. Mathematical Ground Truth & Derivations

VaR as an inverse CDF. Let be the distribution of loss. The -quantile is the inverse

Because we defined loss as , a larger is worse, so the -quantile of is the number that the loss exceeds with probability .

Horizon scaling (i.i.d. returns). If returns are i.i.d. with variance per day, the -day loss variance is , so for any distribution whose tail scales the same way, the quantile scales as

This is the famous rule (Hull Ch 22: “N-day VaR = 1-day VaR × √N”). It is exact only under i.i.d. normal-ish returns - when losses cluster (GARCH), the true -day VaR scales slower or faster - a failure mode in 05.

Why a quantile at all? (vs the average loss). The average loss (Expected Shortfall, ES) answers “given I’m in the tail, how bad is it?”, which is why regulators now prefer it. But VaR is the historically standard number: it is a single market-stable capital figure a board can hold, and it is computable from each of the three methods below.


3. Computational Implementation - “what is a quantile, really?”

There is literally nothing mysterious here: a quantile is one line of Python. We take a set of hypothetical daily portfolio losses (our “crystal ball” of the future) and just grab the right one. Stdlib only.

Watch the behavior: the median loss is negative (a typical day is a small gain), yet the 99% and 99.9% VaR are thousands of dollars in losses. That is exactly the tail-vs-center gap from §1 - and it shows why confidence matters: raise the confidence and the VaR rockets into the tail. Note quantile() sorts the loss upward, so the k-th smallest loss at rank round(αn) is exactly the -quantile.


4. Failure Modes & First-Principles Breakdowns

  1. “The 99% VaR.” Saying just that is ambiguous - VaR lives in (confidence, horizon) space: 99% what? 1-day or 10-day? Differ by . Cite both, always.
  2. Quantile instability in the tail. Less data lives out at 99.9%, so estimates bounce wildly (Glasserman Ch 9: quantile-estimation variance blows up as ). The 99.9% number in §3 is the least reliable of the four.
  3. Sign errors. Loss ; compute VaR on the wrong sign and you have quoted gains as risk. Getting VaR from P&L requires taking - exactly once, in the right place.
  4. VaR isn’t subadditive. can exceed (Artzner et al. 1999; ES is the coherent fix). Summing desk VaRs to get firm VaR can understate risk - dangerous precisely because it feels safe.

5. References

  • Hull, Options, Futures, and Other Derivatives
  • Glasserman, Monte Carlo Methods in Financial Engineering
  • Jorion, Philippe: Value at Risk: The New Benchmark for Managing Financial Risk (3rd ed., 2006)

6. Connected Graph Bridges