Scope: This is an educational, one-stock, one-day risk example, not an investment recommendation or a production VaR model.
When a desk asks for a 99% one-day Value at Risk (VaR), the difficult question is not how to calculate a percentile. It is what we believe about losses we have barely observed. A normal model spends its statistical budget describing the whole return distribution; Extreme Value Theory (EVT) asks whether we can model the far tail more directly. The AXP EVT notebook in my market-risk examples is a useful way to work through that question, including where judgment enters the calculation.
We will use peaks over threshold (POT): select unusually large daily losses, fit a generalized Pareto distribution (GPD) to their excesses, and extrapolate to a loss quantile. The GPD approximation is an asymptotic result, not a promise that every empirical tail follows it (Coles, 2001).
Start with daily prices
The notebook reads historical American Express (AXP) prices, sourced from Investing.com, sorts dates, computes percentage changes in the closing price, and keeps roughly the last year of observations ending around January 2020. The stock is an illustration, not a deliberately selected stress portfolio. The notebook uses simple daily returns in percentage points, so a loss of $2$ in the calculations below means a 2% price move, not two dollars.
\[r_t = 100\left(\frac{P_t}{P_{t-1}} - 1\right).\]The order matters: sort the prices before computing returns. For a live risk process we would also check corporate actions, missing sessions, the price field’s formatting, and whether adjusted prices are required. None of that is resolved by the tail estimator itself.
Turn returns into losses
The notebook’s histogram and descriptive statistics show a negative skew of about $-0.35$ and pandas excess kurtosis of about $1.52$. Normal data have excess kurtosis zero (ordinary kurtosis three). This is motivation to inspect the left tail, not proof that a specific EVT distribution fits it: kurtosis alone cannot establish tail shape.
For the downside analysis define a positive loss magnitude $L_t=-r_t$ on days with $r_t<0$. Only those days enter the GPD fit, but the frequency of threshold exceedances must later be measured against all valid trading-day returns. Otherwise we would estimate a quantile conditional on a down day, not an unconditional one-day VaR.
Choose the tail threshold
For a candidate threshold $u$, a mean residual life plot shows the average loss above that threshold:
\[e(u) = E[L-u\mid L>u].\]Above a suitable threshold, an approximately straight mean-excess curve can support a GPD tail approximation. The notebook’s threshold sweep checks 40 candidates and visually selects $u\approx0.560314$ percentage points; its displayed table has about 57 losses beyond that threshold. This choice is graphical, not an optimized or independently validated cutoff. Lower thresholds bring more observations but more approximation bias; higher thresholds reduce bias while increasing estimation uncertainty (Scarrott & MacDonald, 2012).
For a production estimate I would also inspect parameter stability, exceedance counts, residual diagnostics, and sensitivity of VaR to several plausible thresholds. With just a year’s daily prices, there are not many extremes to work with.
Fit the exceedances
Fit the nonnegative excesses $Y=L-u$ conditional on $L>u$. With GPD shape $\xi$ and scale $\beta>0$, the usual CDF is
\[G(y) = 1-\left(1+\frac{\xi y}{\beta}\right)^{-1/\xi}, \quad y\geq0,\quad 1+\xi y/\beta>0.\]At $\xi=0$ the limit is exponential. Positive $\xi$ indicates a heavier, unbounded fitted tail; negative $\xi$ implies a finite endpoint. The scipy.stats.genpareto fit in the notebook reports shape $0.0884$, scale $0.6723$, and location $0.5661$, in return percentage points where applicable.
Modeling caveat: The notebook fits the raw losses above $u$ with a free location, then uses that estimated location in its VaR formula. That is not the same as fixing $u$ and fitting the excesses $L-u$ with location zero. To implement the standard POT construction consistently, fit the exceedances with
genpareto.fit(excesses, floc=0)and use the selected threshold $u$ in the quantile formula. The numerical results shown later are the notebook’s original outputs, not outputs from this corrected fit.
Extrapolate a tail quantile
Let $N$ be the number of valid daily returns and $N_u$ the number of losses exceeding $u$. Above the threshold, the POT survival probability is approximately
\[\Pr(L>x) \approx \frac{N_u}{N} \left(1+\frac{\xi(x-u)}{\beta}\right)^{-1/\xi},\qquad x>u.\]For tail probability $\alpha$ (confidence $1-\alpha$), solve $\Pr(L>\operatorname{VaR}_{1-\alpha})=\alpha$:
\[\operatorname{VaR}_{1-\alpha}^{\mathrm{POT}} = u+\frac{\beta}{\xi} \left[\left(\frac{N_u}{N\alpha}\right)^{\xi}-1\right], \qquad 0<\alpha<\frac{N_u}{N}.\]When $\xi\to0$, the added term tends to $\beta\log[N_u/(N\alpha)]$. Keep units consistent: this is a one-day percentage loss; multiplying a percentage by an exposure or changing the horizon requires further assumptions. Also drop the first NaN return before counting $N$: the notebook uses the number of price rows, which can include one row without a valid return.
Compare with normal VaR
For a baseline, the notebook fits a normal distribution to all daily returns. If $r\sim N(\mu_r,\sigma_r^2)$, the positive loss convention gives
\[\operatorname{VaR}_{1-\alpha}^{\mathrm{normal}} = -\left(\mu_r+\sigma_r\Phi^{-1}(\alpha)\right).\]The notebook’s saved comparison includes these illustrative one-day figures (percentage loss):
| Tail probability $\alpha$ | Confidence | Notebook EVT VaR | Normal VaR |
|---|---|---|---|
| 0.5% | 99.5% | 3.610% | 2.672% |
| 1% | 99% | 2.977% | 2.403% |
| 5% | 95% | 1.649% | 1.667% |
The difference is largest at the highest confidence shown, and it changes sign near 95%. EVT is not automatically more conservative at every confidence level: the estimated tail, threshold, sample, and sign convention all matter. In particular, these EVT figures inherit the free-location fitting caveat above and should not be mistaken for a validated POT recalculation.
For a desk, I would treat the model comparison as the start of a conversation, not the final limit. Repeat the analysis over different windows, test exceedances out of sample, report parameter uncertainty, and compare with historical and stress-scenario losses. VaR describes a quantile, not the size of losses beyond it; expected shortfall and stress tests provide complementary views of that exposure.
References
- Coles, S. (2001). An Introduction to Statistical Modeling of Extreme Values. Springer. https://doi.org/10.1007/978-1-4471-3675-0
- Scarrott, C., & MacDonald, A. (2012). A Review of Extreme Value Threshold Estimation and Uncertainty Quantification. REVSTAT - Statistical Journal, 10(1), 33–60.