Unit 11, lesson 85

Stress testing and scenario aggregation

How a stress test revalues a portfolio under a scenario vector, why a joint stress scenario needs nonlinear revaluation, when scenario aggregation is exact, and how a reverse stress test finds the least extreme scenario.

  • Video 85
  • Stress testing and liquidity risk

A risk committee asks what a portfolio loses if an equity index falls sharply while implied volatilities jump, and someone proposes adding the loss of the index move to the loss of the volatility move. For a portfolio whose value is nonlinear in its risk factors, such as one holding options, that sum can be far from the loss in the combined state. This lesson treats a scenario as a vector of factor moves, revalues a portfolio in a joint scenario, shows exactly when isolated losses add up, and turns the question around with a reverse stress test, which looks for the least extreme scenario that reaches a given loss.

Key terms

Stress testing

Definition A stress test fixes a portfolio, a valuation date and a horizon, and computes the loss

L(s)=V(0)−V(s)L(s) = V(0) - V(s)

of the portfolio under one or more specified scenarios ss. Here V(s)V(s) is the value of the portfolio, in currency units, after its risk factors change by ss, and V(0)V(0) is its current value. The loss is positive for an adverse outcome, so a value change ΔV=V(s)−V(0)\Delta V = V(s) - V(0) corresponds to the loss −ΔV-\Delta V. Positions are held fixed during the scenario unless the test states a rule for trading, collateral or contract events. A stress test needs a value function and a scenario, and no probability. It reports what the portfolio would lose if the stated state occurred, not how likely that state is, whereas a quantile such as value at risk needs a distribution over states. Historical scenarios replay the factor moves of a past period on today’s positions, hypothetical scenarios are chosen to probe a weakness, and a sensitivity test is a scenario that moves one factor alone.

In plain words A stress test is a what-if calculation. Choose a state of the world, revalue everything in it, and report the loss.

Example Take a constructed portfolio whose value in currency units depends on two normalized, dimensionless factors xx and yy, both 00 today,

V(x,y)=100+8x−5y+3x2+4xy+2y2.\begin{aligned} V(x, y) &= 100 + 8x - 5y \\[0.4em] &\quad + 3x^2 + 4xy + 2y^2 . \end{aligned}

Under the scenario (x,y)=(−2,1)(x, y) = (-2, 1) the value is 8585, so the loss is 1515. The number 1515 says nothing about how likely such a move is.

Scenario vector

Definition A scenario vector s=(s1,…,sd)⊤s = (s_1, \dots, s_d)^{\top} lists one change for each of the dd risk factors that the valuation uses, such as prices, rates, implied volatilities, credit spreads and exchange rates. Each component has stated units, for example basis points, log returns or absolute changes in volatility points, and a stated type, absolute or relative. A complete scenario also fixes the dates, the horizon, the portfolio, and the liquidity, collateral and contract-state assumptions needed to revalue it, such as whether a barrier has been crossed. The name of a historical crisis does not supply these coordinates by itself. An admissible set S⊆RdS \subseteq \mathbb{R}^d, written as bounds or joint restrictions on ss, records which vectors the test treats as possible. A scenario carries no probability unless a distribution over scenario vectors is specified separately.

In plain words A scenario is a precise list of factor moves, one number per factor with its units, together with the assumptions needed to revalue the portfolio. Saying that rates rise in a crisis is not yet a scenario.

Example In the constructed portfolio d=2d = 2, and s=(−2,1)⊤s = (-2, 1)^{\top} moves the first normalized factor by −2-2 and the second by +1+1. If a factor measured an index move in units of 1010 percent, its component −2-2 would mean a 2020 percent fall, and without such units the vector could not be applied to another portfolio. An admissible set that ties the factors together, such as the line S={(x,y):y=−x/2}S = \{(x, y) : y = -x/2\}, contains (−2,1)(-2, 1) but not (−2,0)(-2, 0).

Nonlinear revaluation

Definition Nonlinear revaluation, also called full revaluation, computes L(s)=V(0)−V(s)L(s) = V(0) - V(s) by pricing every position again at the shocked factor values with its pricing model, instead of approximating the change. A sensitivity approximation uses a Taylor expansion at the current factors. If VV is twice continuously differentiable near 00, with gradient g=∇V(0)g = \nabla V(0) and Hessian Γ=∇2V(0)\Gamma = \nabla^2 V(0), then

V(s)=V(0)+g⊤s+12s⊤Γs+R(s),\begin{aligned} V(s) &= V(0) + g^{\top} s \\[0.4em] &\quad + \tfrac12 s^{\top} \Gamma s + R(s), \end{aligned}

with R(s)/∥s∥2→0R(s)/\lVert s \rVert^2 \to 0 as s→0s \to 0. The first-order loss −g⊤s-g^{\top} s and the second-order loss −g⊤s−12s⊤Γs-g^{\top} s - \tfrac12 s^{\top}\Gamma s are approximations whose error depends on the size of ss, and stress scenarios are large by design. Positions with nonlinear payoffs, such as options, callable bonds and barrier products, can have a large remainder exactly in the scenarios that matter. When VV is a quadratic polynomial, R=0R = 0 and the second-order expansion is exact.

In plain words Sensitivities describe small moves. For a large move the reliable answer is to price the portfolio again in the new state, and a sensitivity estimate is a shortcut whose error has to be checked.

Example For the constructed value

g=(8−5),Γ=(6444),\begin{aligned} g &= \begin{pmatrix} 8 \\ -5 \end{pmatrix}, \\[0.4em] \Gamma &= \begin{pmatrix} 6 & 4 \\ 4 & 4 \end{pmatrix}, \end{aligned}

and the second-order expansion is exact because VV is quadratic. At s=(−2,1)⊤s = (-2, 1)^{\top} the linear terms change the value by −16−5=−21-16 - 5 = -21 and the quadratic terms by 12−8+2=612 - 8 + 2 = 6, so the value falls by 1515. The first-order approximation alone would report a loss of 2121, overstating the full revaluation by 66.

Joint stress scenario

Definition A joint stress scenario moves several risk factors at once, and the portfolio is revalued once at the full vector ss. Its components should be jointly meaningful, meaning that the moves can occur together under the stated narrative or model, for example because of an economic constraint, a funding link or an assumed dependence. For two factors and a twice continuously differentiable VV, the second-order loss at s=(x,y)⊤s = (x, y)^{\top} contains the cross term −Γ12 xy-\Gamma_{12}\,xy, which depends on both moves and is missed by every scenario that moves only one factor. The dependence that a joint scenario expresses is an assumption of the test design. It is an estimate of a correlation only if a model was fitted to data.

In plain words In a real stress, prices, volatilities and spreads tend to move together, and a portfolio can be hurt by the combination more than by any one of the moves. A joint scenario puts that combination into one state and prices it.

Example In the constructed portfolio the joint scenario (−2,1)(-2, 1) loses 1515. The cross term 4xy4xy contributes 4⋅(−2)⋅1=−84 \cdot (-2) \cdot 1 = -8 to the value, so 88 of the 1515 come from the two moves acting together. Under the admissible line y=−x/2y = -x/2, which ties the second factor to the first, the scenario (−2,1)(-2, 1) is allowed, while the one-factor move (−2,0)(-2, 0) is not a state the test considers possible.

Scenario aggregation

Definition Scenario aggregation combines scenario results into portfolio or summary figures, and each rule has its own hypotheses. Across positions, the portfolio value is the sum of the position values, V=∑iViV = \sum_i V_i, so under one common scenario L(s)=∑iLi(s)L(s) = \sum_i L_i(s) exactly. Adding losses of positions computed under different scenarios has no such meaning. Across factors, the sum of isolated one-factor losses equals the joint loss for every scenario exactly when VV is additively separable, V(x,y)=f(x)+h(y)V(x, y) = f(x) + h(y). For a twice continuously differentiable VV with mixed partial derivative V12=∂2V/∂x ∂yV_{12} = \partial^2 V/\partial x\,\partial y, the gap is

L(x,y)−L(x,0)−L(0,y)=−∫0x ⁣ ⁣∫0yV12(a,b) db da.\begin{aligned} &L(x, y) - L(x, 0) - L(0, y) \\[0.4em] &\quad = -\int_0^x \!\! \int_0^y V_{12}(a, b)\,db\,da . \end{aligned}

Across scenarios, the worst-case loss max⁡s∈SL(s)\max_{s \in S} L(s) over a finite set SS summarizes the set without probabilities. Viewed as a function of the loss profile on SS, it is monotone, positively homogeneous and subadditive, and adding a cash amount mm to the portfolio lowers it by mm, so it is a coherent risk measure in the sense of Expected shortfall and coherent risk, with the scenarios in SS as the states. A probability-weighted average or a quantile over scenarios needs a distribution on SS, which the scenarios themselves do not provide.

In plain words Losses of positions add up when every position sees the same scenario. Losses of one-factor scenarios add up to the loss of the combined scenario for all moves only when the factors do not interact in the value. A worst case over a list of scenarios is a valid summary, but an average or a quantile over the list requires probabilities.

Example In the constructed portfolio, moving xx to −2-2 alone loses 100−V(−2,0)=4100 - V(-2, 0) = 4, and moving yy to 11 alone loses 100−V(0,1)=3100 - V(0, 1) = 3, a total of 77. The joint scenario loses 1515. The mixed partial derivative is the constant 44, so the gap is −4xy=8-4xy = 8, exactly the difference. Over the set S={(−2,0),(0,1),(−2,1)}S = \{(-2, 0), (0, 1), (-2, 1)\} the worst-case loss is 1515, from the joint scenario.

Reverse stress test

Definition A reverse stress test fixes an unacceptable loss ℓ>0\ell > 0 and searches for the scenarios that reach it. To single one out, it needs an admissible set SS and a cost c(s)c(s) that measures how extreme a scenario is, and it solves

min⁡s∈S  c(s)subject to L(s)≥ℓ.\begin{aligned} &\min_{s \in S}\; c(s) \\[0.4em] &\text{subject to } L(s) \ge \ell . \end{aligned}

Common costs are the squared Euclidean norm s⊤ss^{\top}s, a covariance-weighted norm s⊤Σ−1ss^{\top}\Sigma^{-1}s for an invertible covariance matrix Σ\Sigma of factor changes, and penalties on the number of factors moved. Each gives a different geometry. A low cost does not make a scenario likely unless a distribution is specified. For normally distributed factor changes with mean 00 and invertible Σ\Sigma, the covariance-weighted cost orders scenarios by their density, and when Σ\Sigma is singular the scenarios must be restricted to its range, where a pseudo-inverse defines the cost. For a linear surrogate loss a⊤sa^{\top}s with a≠0a \ne 0, S=RdS = \mathbb{R}^d and the Euclidean cost, the Cauchy-Schwarz inequality a⊤s≤∥a∥ ∥s∥a^{\top}s \le \lVert a \rVert\,\lVert s \rVert shows that a⊤s≥ℓa^{\top}s \ge \ell forces ∥s∥≥ℓ/∥a∥\lVert s \rVert \ge \ell/\lVert a \rVert, with equality only at

s∗=ℓ∥a∥2 a,s^{*} = \frac{\ell}{\lVert a \rVert^{2}}\, a ,

so this is the unique minimizer. A scenario found with a surrogate has to be revalued with the full model. If VV is convex, the feasible set {s:V(s)≤V(0)−ℓ}\{s : V(s) \le V(0) - \ell\} is convex, so the full problem with Euclidean cost and S=RdS = \mathbb{R}^d has a unique solution whenever it is feasible, and the largest attainable loss is V(0)−min⁡VV(0) - \min V when that minimum exists.

In plain words A stress test asks what a chosen scenario costs. A reverse stress test asks which allowed scenario is the least extreme way to lose a given amount, and the answer depends on how extremeness is measured and on the model that computes the loss.

Example In the constructed portfolio, take the linear surrogate loss −8x+5y-8x + 5y, so a=(−8,5)⊤a = (-8, 5)^{\top} and ∥a∥2=89\lVert a \rVert^2 = 89, with target ℓ=20\ell = 20 and the Euclidean cost. The minimizer is

s∗=2089(−8,5)⊤≈(−1.798,1.124)⊤,\begin{aligned} s^{*} &= \tfrac{20}{89}(-8, 5)^{\top} \\[0.4em] &\approx (-1.798, 1.124)^{\top}, \end{aligned}

with squared distance 400/89≈4.494400/89 \approx 4.494. Full revaluation at s∗s^{*} gives a loss of only about 15.85915.859, because the quadratic terms add value, so the surrogate solution misses the target. Solving the full problem numerically gives the scenario (−1.758,1.806)(-1.758, 1.806) with squared distance about 6.3536.353. The quadratic part of VV has coefficient matrix with rows (3,2)(3, 2) and (2,2)(2, 2), whose leading minor 33 and determinant 22 are positive, so VV is strictly convex. Its gradient (8+6x+4y, −5+4x+4y)(8 + 6x + 4y, \, -5 + 4x + 4y) vanishes only at (−6.5,7.75)(-6.5, 7.75), where V=54.625V = 54.625, so no scenario in the plane loses more than 45.37545.375, and a target loss of 5050 is impossible in this model.

Check yourself

  1. For the constructed value V(x,y)=100+8x−5y+3x2+4xy+2y2V(x, y) = 100 + 8x - 5y + 3x^2 + 4xy + 2y^2, find the loss under the joint scenario (−1,1)(-1, 1), the two isolated one-factor losses and the interaction gap.
Show the answer

The linear terms give −8−5=−13-8 - 5 = -13 and the quadratic terms 3−4+2=13 - 4 + 2 = 1, so the value falls by 1212 and the joint loss is 1212. Moving xx alone gives the change −8+3=−5-8 + 3 = -5, a loss of 55, and moving yy alone gives −5+2=−3-5 + 2 = -3, a loss of 33. The isolated losses add to 88. The gap is

−4xy=−4⋅(−1)⋅1=4,\begin{aligned} -4xy &= -4 \cdot (-1) \cdot 1 \\[0.4em] &= 4, \end{aligned}

and indeed 8+4=128 + 4 = 12. Adding the isolated losses understates the joint loss by a third.

  1. A colleague runs the linear reverse stress test for the target 2020 by requiring g⊤s=8x−5y≥20g^{\top}s = 8x - 5y \ge 20 and reports the scenario 2089(8,−5)≈(1.798,−1.124)\tfrac{20}{89}(8, -5) \approx (1.798, -1.124). What went wrong, and what does full revaluation show at that scenario?
Show the answer

The expression g⊤sg^{\top}s is the first-order change in value, and the loss is its negative, −g⊤s=−8x+5y-g^{\top}s = -8x + 5y. The colleague found the least extreme scenario with a first-order gain of 2020. Full revaluation there gives V≈124.141V \approx 124.141, a gain of about 24.14124.141, that is a loss of about −24.141-24.141. With the loss sign stated correctly the minimizer is the opposite vector 2089(−8,5)≈(−1.798,1.124)\tfrac{20}{89}(-8, 5) \approx (-1.798, 1.124), and even that one needs full revaluation, which gives a loss of about 15.85915.859 rather than 2020.

  1. Suppose the test admits only scenarios on the line y=−x/2y = -x/2. Find the value along the line, the largest attainable loss and whether the target loss 2020 can be reached. Compare with the unrestricted plane.
Show the answer

Substituting y=−x/2y = -x/2 gives

V(x,−x/2)=100+8x+2.5x+3x2−2x2+0.5x2=100+10.5x+1.5x2.\begin{aligned} &V(x, -x/2) \\[0.4em] &= 100 + 8x + 2.5x \\[0.4em] &\quad + 3x^2 - 2x^2 + 0.5x^2 \\[0.4em] &= 100 + 10.5x + 1.5x^2 . \end{aligned}

This is minimized at x=−10.5/3=−3.5x = -10.5/3 = -3.5, the point (−3.5,1.75)(-3.5, 1.75), where V=81.625V = 81.625. The largest loss on the line is 18.37518.375, so the target 2020 cannot be reached, although the line contains the scenario (−2,1)(-2, 1) with loss 1515. In the unrestricted plane the minimum is at (−6.5,7.75)(-6.5, 7.75), which is not on the line, and the largest loss is 45.37545.375. The linear surrogate on the line is −10.5x-10.5x, which reaches 2020 at x≈−1.905x \approx -1.905 and so suggests the target is attainable, but the full loss there is only about 14.55814.558. The restriction is an assumption about admissible scenarios, not an estimate of a correlation.

How this lesson connects