Unit 11, lesson 81

Profit and loss attribution and sensitivities

How a Taylor expansion splits a change in portfolio value into market move terms from sensitivities, carry from the passage of time and a residual, and why an attribution convention decides where joint effects go.

  • Video 81
  • Attribution and tail risk measures

A book of positions is marked at 142 currency units at the start of a short period and at 153.8 at its end, a gain of 11.8. How much of that came from the move in the underlying price, how much from the move in volatility and how much from the passage of time, and is anything left unexplained? Profit and loss attribution answers with a defined comparison and an expansion in sensitivities. This lesson derives the Taylor expansion of the change in value with its remainder, defines the market move, carry and the residual, and shows that the part of a joint move created by two factors together is assigned by a convention, not by the mathematics.

Key terms

Profit and loss attribution

Definition Let V(t,x)V(t, x) be the signed mark of a fixed book of positions in one reporting currency, as a function of time tt in years and of a vector x∈Rdx \in \mathbb{R}^d of risk factors. Over a period from tt to t+Δtt + \Delta t in which the factors move from xx to x+Δxx + \Delta x, the mark change is

ΔV=V(t+Δt,x+Δx)−V(t,x).\begin{aligned} \Delta V &= V(t + \Delta t, x + \Delta x) \\[0.4em] &\quad - V(t, x) . \end{aligned}

The total profit and loss of the period is the mark change plus the cash flows of the period, such as coupons received, financing paid and fees. A report that also covers new trades adds their effect, which the fixed book leaves out. Profit and loss attribution writes one chosen quantity of this kind, here the mark change, as named contributions plus a residual,

ΔV=∑kAk+R,\Delta V = \sum_{k} A_k + R ,

where each AkA_k is computed by a stated formula, for example a sensitivity times a factor move, and RR is defined as whatever remains. The decomposition is an identity by construction. Its content lies in the choice of the compared quantity, of the factors, of the formulas for the AkA_k and of the convention that assigns joint effects. A formula for the mark change explains the mark change only, and cash flows enter only when they are added as their own terms.

In plain words Attribution first fixes exactly which change is being explained, for example the change in the mark of unchanged positions or the total gain including cash received. It then splits that change into pieces with names such as price, volatility and time, and the residual is the part the pieces do not cover.

Example Take the constructed value function, in currency units,

V(t,S,v)=0.01S2+2Sv+50v2−3t,\begin{aligned} V(t, S, v) &= 0.01 S^2 + 2Sv \\[0.4em] &\quad + 50v^2 - 3t , \end{aligned}

where SS is a price in currency units, vv is a decimal volatility input, tt is in years and the coefficients carry the units that make every term a currency amount. At t=0t = 0, S=100S = 100 and v=0.2v = 0.2 the three market terms are 100100, 4040 and 22, so the mark is 142142. After Δt=0.01\Delta t = 0.01 years with ΔS=3\Delta S = 3 and Δv=0.02\Delta v = 0.02 the mark is 106.09+45.32+2.42−0.03=153.8106.09 + 45.32 + 2.42 - 0.03 = 153.8, so ΔV=11.8\Delta V = 11.8. The next cards split this into 11.611.6 from first-order market terms, 0.230.23 from second-order market terms and −0.03-0.03 from time, with residual 00. If the book had also received a coupon of 1.51.5 in cash, its total profit and loss would be 13.313.3, and comparing that with the explained 11.811.8 would produce a residual of 1.51.5 that says nothing about pricing.

Market move

Definition The market move of the period is the vector Δx\Delta x of changes of the chosen risk factors over the period, each measured in a stated unit. The first-order contribution of factor ii is the sensitivity ∂V/∂xi\partial V/\partial x_i at (t,x)(t, x) times Δxi\Delta x_i, and the market part of the change at fixed time is the full revaluation

ΔxV=V(t,x+Δx)−V(t,x).\begin{aligned} \Delta_x V &= V(t, x + \Delta x) \\[0.4em] &\quad - V(t, x) . \end{aligned}

A sensitivity has the unit of value divided by the unit of its input, so the move must be expressed in the unit in which the sensitivity is a derivative. A derivative with respect to a decimal rate or a decimal volatility is multiplied by a decimal change, so one basis point is Δxi=0.0001\Delta x_i = 0.0001 and one volatility point is Δxi=0.01\Delta x_i = 0.01, while a sensitivity already quoted per basis point contains the factor 0.00010.0001. The same care applies to currency translation of foreign sensitivities. The choice of factors is part of the attribution. The same move written in other coordinates, such as log prices in place of prices or variance in place of volatility, has different first-order terms, although the full revaluation is unchanged.

In plain words The market move is what the market did over the period, written in the coordinates the risk system uses. Its first-order effect is each sensitivity times the matching move, and the move has to be measured in the units of the sensitivity, or correct arithmetic gives a wrong attribution.

Example For the constructed function the sensitivities at the start are ∂V/∂S=0.02S+2v=2.4\partial V/\partial S = 0.02S + 2v = 2.4 and ∂V/∂v=2S+100v=220\partial V/\partial v = 2S + 100v = 220. The moves ΔS=3\Delta S = 3 and Δv=0.02\Delta v = 0.02, which is two volatility points and not a relative rise of 22 percent, give first-order contributions 2.4⋅3=7.22.4 \cdot 3 = 7.2 and 220⋅0.02=4.4220 \cdot 0.02 = 4.4, together 11.611.6. The full market revaluation at fixed time is V(0,103,0.22)−V(0,100,0.2)=153.83−142=11.83V(0, 103, 0.22) - V(0, 100, 0.2) = 153.83 - 142 = 11.83. Written with the variance w=v2w = v^2 as the volatility factor, the same move is Δw=0.0084\Delta w = 0.0084 and the sensitivity is ∂V/∂w=550\partial V/\partial w = 550, so the first-order volatility term becomes 4.624.62 instead of 4.44.4. The value is not a quadratic polynomial in (S,w)(S, w), and the second-order expansion in these coordinates leaves a residual of about 0.01450.0145 against the same revalued 11.8311.83.

Taylor expansion of PnL

Definition Fix the time tt and suppose V(t,⋅)V(t, \cdot) is twice continuously differentiable on an open set that contains the segment from xx to x+Δxx + \Delta x. Write ∇xV\nabla_x V for its gradient and HxVH_x V for its Hessian in the market factors, and put

yu=x+u Δx,g(u)=V(t,yu),0≤u≤1.\begin{gathered} y_u = x + u\,\Delta x, \\[0.4em] g(u) = V(t, y_u), \quad 0 \le u \le 1 . \end{gathered}

The chain rule gives

g′(u)=∇xV(t,yu)⊤Δx,g′′(u)=Δx⊤HxV(t,yu) Δx,\begin{aligned} g'(u) &= \nabla_x V(t, y_u)^{\top} \Delta x, \\[0.4em] g''(u) &= \Delta x^{\top} H_x V(t, y_u)\, \Delta x, \end{aligned}

and the one-variable Taylor formula with integral remainder, g(1)=g(0)+g′(0)+∫01(1−u) g′′(u) dug(1) = g(0) + g'(0) + \int_0^1 (1 - u)\, g''(u)\,du, gives

ΔxV=∇xV⊤Δx+12Δx⊤HxV Δx+R3,\begin{aligned} \Delta_x V &= \nabla_x V^{\top} \Delta x \\[0.4em] &\quad + \tfrac12 \Delta x^{\top} H_x V\, \Delta x + R_3 , \end{aligned}

with the derivatives taken at (t,x)(t, x) and

R3=∫01(1−u)×(g′′(u)−g′′(0)) du.\begin{aligned} R_3 &= \int_0^1 (1 - u) \\[0.4em] &\qquad \times \bigl(g''(u) - g''(0)\bigr)\,du . \end{aligned}

Continuity of the Hessian gives R3/∥Δx∥2→0R_3/\lVert \Delta x \rVert^2 \to 0 as Δx→0\Delta x \to 0, a local statement that gives no number for a move of a given size. If in addition V(t,⋅)V(t, \cdot) is three times continuously differentiable there and ∣g′′′(u)∣≤M∥Δx∥3\lvert g'''(u) \rvert \le M \lVert \Delta x \rVert^3 for 0≤u≤10 \le u \le 1, then R3=∫0112(1−u)2g′′′(u) duR_3 = \int_0^1 \tfrac12 (1 - u)^2 g'''(u)\,du and

∣R3∣≤M6 ∥Δx∥3.\lvert R_3 \rvert \le \frac{M}{6}\,\lVert \Delta x \rVert^3 .

The delta-gamma-theta expansion adds a first-order time term,

ΔV≈Vt Δt+∇xV⊤Δx+12Δx⊤HxV Δx,\begin{aligned} \Delta V &\approx V_t\,\Delta t + \nabla_x V^{\top} \Delta x \\[0.4em] &\quad + \tfrac12 \Delta x^{\top} H_x V\, \Delta x , \end{aligned}

where Vt=∂V/∂tV_t = \partial V/\partial t at (t,x)(t, x) is theta per year. It keeps market curvature but omits the time curvature 12Vtt Δt2\tfrac12 V_{tt}\,\Delta t^2 and the time-market cross terms Δt ∇xVt⊤Δx\Delta t\, \nabla_x V_t^{\top} \Delta x, which a full second-order expansion in the joint coordinates (t,x)(t, x) contains. It is exact when V(t,x)=a+bt+Q(x)V(t, x) = a + bt + Q(x) with constants aa and bb and a polynomial QQ of degree at most two. A kink of VV on the segment, as at the strike of an expiring option, breaks the hypothesis, and the expansion then has no basis.

In plain words Along the straight line from the old factor values to the new ones the value is a function of one variable. Its slope at the start gives the sensitivity terms, its curvature at the start gives the second-order terms, and the change of curvature along the way is the remainder. How large that remainder is for an actual move depends on how fast the curvature changes, which the Hessian at the start does not reveal.

Example For the constructed function the Hessian in (S,v)(S, v) is constant,

HxV=(0.0222100),H_x V = \begin{pmatrix} 0.02 & 2 \\ 2 & 100 \end{pmatrix},

so the second-order market term is

12⋅0.02⋅32+2⋅3⋅0.02+12⋅100⋅0.022=0.09+0.12+0.02=0.23.\begin{aligned} &\tfrac12 \cdot 0.02 \cdot 3^2 + 2 \cdot 3 \cdot 0.02 \\[0.4em] &\quad + \tfrac12 \cdot 100 \cdot 0.02^2 \\[0.4em] &= 0.09 + 0.12 + 0.02 = 0.23 . \end{aligned}

The cross term 0.120.12 has no factor one half because the symmetric Hessian contains the mixed derivative twice. With Vt=−3V_t = -3 the time term is −3⋅0.01=−0.03-3 \cdot 0.01 = -0.03, and the expansion gives 11.6+0.23−0.03=11.811.6 + 0.23 - 0.03 = 11.8, exactly the revalued change, because the function has the form a+bt+Q(S,v)a + bt + Q(S, v) with QQ quadratic.

Carry

Definition Carry is the profit and loss from the passage of time over the period under a stated convention for what an unchanged market means, together with whatever accruals and financing flows of the period the comparison includes. With the factors held fixed in the stated coordinates, the mark part of carry is

C=V(t+Δt,x)−V(t,x),\begin{aligned} C &= V(t + \Delta t, x) \\[0.4em] &\quad - V(t, x), \end{aligned}

and its first-order estimate is Vt ΔtV_t\,\Delta t, theta per year times the elapsed time in years. The number depends on the convention. For a bond, holding its own yield fixed, holding the zero curve fixed as a function of time to maturity and letting today’s forward rates be realized are three different unchanged markets with three different carries, and the market move is then measured from the chosen baseline, so the total change is the same. A carry computed from theta also depends on the day count that turns calendar days into Δt\Delta t.

In plain words Carry is what the book would have earned if nothing in the market had moved. Since an unchanged market can be read in several ways, the reading has to be fixed before the number means anything.

Example For the constructed function the carry is exactly −3⋅0.01=−0.03-3 \cdot 0.01 = -0.03, since time enters linearly and without interaction. For a second constructed case, take a zero-coupon bond that pays 100100 in 55 years, with continuously compounded zero rates y(τ)=0.03+0.002τy(\tau) = 0.03 + 0.002\tau for time to maturity τ\tau in years, so its value is 100e−0.04⋅5≈81.8731100e^{-0.04 \cdot 5} \approx 81.8731. Over half a year with its own yield fixed at 0.040.04 the value becomes 100e−0.18≈83.5270100e^{-0.18} \approx 83.5270, a carry of about 1.65391.6539. If the curve instead keeps its shape in time to maturity, the bond is discounted at y(4.5)=0.039y(4.5) = 0.039 and is worth about 83.903783.9037, a carry of about 2.03072.0307, which includes about 0.37670.3767 of roll-down. If today’s forward rates are realized, the bond grows at the half-year zero rate y(0.5)=0.031y(0.5) = 0.031 to about 83.152083.1520, a carry of about 1.27891.2789. Theta with the own yield fixed is 0.04⋅81.8731≈3.27490.04 \cdot 81.8731 \approx 3.2749 per year, and 3.2749⋅0.5≈1.63753.2749 \cdot 0.5 \approx 1.6375 is the first-order estimate of the first carry.

Attribution residual

Definition The attribution residual is the compared change minus the sum of the explanatory terms,

R=ΔV−∑kAk.R = \Delta V - \sum_{k} A_k .

It is defined by subtraction, so it collects everything the chosen terms leave out. Its sources include terms of higher order than the expansion, a kink or fast-changing curvature on the path of the move, cash flows or position changes that the compared quantity contains but the terms do not, a change of model, calibration or market data between the two marks, and factors that moved but are not in xx. A residual is therefore not automatically a gain unexplained by risk. A small residual shows that the chosen terms explained this comparison, not that every risk of the book is modeled.

In plain words The residual is the gap between what happened and what the formula explains. Its size and sign are a diagnostic, and finding its source means asking which hypothesis behind the explained terms failed.

Example Add a cubic term cS3cS^3 with c=0.0001c = 0.0001 to the constructed function, which raises the initial mark to 242242. The sensitivities at the start become ∂V/∂S=2.4+3cS2=5.4\partial V/\partial S = 2.4 + 3cS^2 = 5.4 and ∂2V/∂S2=0.02+6cS=0.08\partial^2 V/\partial S^2 = 0.02 + 6cS = 0.08, and the expansion now explains

5.4⋅3+4.4+0.36+0.12+0.02−0.03=21.07.\begin{aligned} &5.4 \cdot 3 + 4.4 + 0.36 \\[0.4em] &\quad + 0.12 + 0.02 - 0.03 = 21.07 . \end{aligned}

Revaluation gives a change of 263.0727−242=21.0727263.0727 - 242 = 21.0727, so the residual is 0.00270.0027. It is exactly c ΔS3=0.0001⋅27c\,\Delta S^3 = 0.0001 \cdot 27, the one term of c(S+ΔS)3c(S + \Delta S)^3 beyond second order. The remainder formula gives the same number, since g′′′(u)=6c ΔS3=0.0162g'''(u) = 6c\,\Delta S^3 = 0.0162 is constant and ∫0112(1−u)2 du=16\int_0^1 \tfrac12 (1 - u)^2\,du = \tfrac16. The residual reveals a missing order of the expansion, not an error in the quadratic identity.

Attribution convention

Definition An attribution convention is the rule that assigns each part of the change to a named column. A sequential convention moves the factors one at a time in a fixed order and revalues after each step. If Δx(i)\Delta x^{(i)} moves the first ii factors of the order and leaves the others at their old values, with Δx(0)=0\Delta x^{(0)} = 0, the iith factor of the order receives

V(t,x+Δx(i))−V(t,x+Δx(i−1)).\begin{aligned} &V(t, x + \Delta x^{(i)}) \\[0.4em] &\quad - V(t, x + \Delta x^{(i-1)}) . \end{aligned}

The steps telescope to ΔxV\Delta_x V for every order, but the individual columns depend on the order whenever the value has interactions, that is nonzero mixed derivatives between the factors. Other conventions average the sequential contributions over all orders, the Shapley allocation, which for two factors splits the interaction equally, or report the interaction in its own column. The value function determines the size of the interaction and the convention determines only its label, so contributions from different reports can be compared only under the same convention.

In plain words When two factors move together, part of the change exists only because both moved, and no single factor owns it. The convention decides where that part is shown, while the total stays the same.

Example In the constructed example the interaction is the cross term 2 ΔS Δv=0.122\,\Delta S\,\Delta v = 0.12. Moving SS first gives V(0,103,0.2)−142=149.29−142=7.29V(0, 103, 0.2) - 142 = 149.29 - 142 = 7.29 to price and then 153.83−149.29=4.54153.83 - 149.29 = 4.54 to volatility, because the volatility move is evaluated at the higher price. Moving vv first gives 146.42−142=4.42146.42 - 142 = 4.42 to volatility and 153.83−146.42=7.41153.83 - 146.42 = 7.41 to price. Both orders add to 11.8311.83, and the columns differ by exactly 0.120.12. The equal split reports 7.357.35 and 4.484.48, and a separate interaction column reports 7.297.29, 4.424.42 and 0.120.12. Time enters this function without interactions, so the carry of −0.03-0.03 is the same in every order.

Check yourself

  1. For the constructed function at t=0t = 0, S=100S = 100 and v=0.2v = 0.2, the price falls by 22 and volatility rises by one point, Δv=0.01\Delta v = 0.01, over 0.010.01 years. Compute the first-order, second-order and carry terms, compare them with revaluation, and find where the interaction goes under each sequential order.
Show the answer

The first-order terms are 2.4⋅(−2)=−4.82.4 \cdot (-2) = -4.8 and 220⋅0.01=2.2220 \cdot 0.01 = 2.2, together −2.6-2.6. The second-order terms are

12⋅0.02⋅4+2⋅(−2)⋅0.01+12⋅100⋅0.012=0.04−0.04+0.005=0.005,\begin{aligned} &\tfrac12 \cdot 0.02 \cdot 4 + 2 \cdot (-2) \cdot 0.01 \\[0.4em] &\quad + \tfrac12 \cdot 100 \cdot 0.01^2 \\[0.4em] &= 0.04 - 0.04 + 0.005 = 0.005, \end{aligned}

and the carry is −3⋅0.01=−0.03-3 \cdot 0.01 = -0.03, so the expansion gives −2.625-2.625. Revaluation gives V(0.01,98,0.21)=96.04+41.16+2.205−0.03=139.375V(0.01, 98, 0.21) = 96.04 + 41.16 + 2.205 - 0.03 = 139.375, a change of −2.625-2.625, exact again because the function is quadratic in the market factors and linear in time. The interaction is −0.04-0.04, negative because the factors moved in opposite directions while the mixed derivative is positive. Moving the price first gives −4.76-4.76 to price and 2.1652.165 to volatility, so volatility receives the interaction. Moving volatility first gives 2.2052.205 to volatility and −4.8-4.8 to price, so price receives it.

  1. For the same function a report says that volatility rose by 22 percent, and a colleague multiplies the sensitivity 220220 by 22. Give the first-order volatility term under the two readings of the report and explain the error. For a constructed zero-coupon bond worth 100e−5y100e^{-5y} at the continuously compounded yield y=0.04y = 0.04, give the first-order effect of a rise of 2525 basis points.
Show the answer

The sensitivity 220220 is per unit of decimal volatility, so the move must be a decimal change. Read as two volatility points, the move is Δv=0.02\Delta v = 0.02 and the term is 220⋅0.02=4.4220 \cdot 0.02 = 4.4, against 4.424.42 from revaluation in vv alone. Read as a relative rise of 22 percent, the move is Δv=0.2⋅0.02=0.004\Delta v = 0.2 \cdot 0.02 = 0.004 and the term is 0.880.88, against 0.88080.8808 from revaluation. The product 220⋅2=440220 \cdot 2 = 440 treats 22 as a decimal change, a move of 200200 volatility points. The report has to say which reading it means. For the bond, ∂V/∂y=−5⋅100e−0.2≈−409.37\partial V/\partial y = -5 \cdot 100e^{-0.2} \approx -409.37 per unit of decimal yield, which is about −0.0409-0.0409 per basis point. A rise of 2525 basis points is Δy=0.0025\Delta y = 0.0025, so the first-order effect is

−409.37⋅0.0025≈−1.0234,\begin{aligned} &-409.37 \cdot 0.0025 \\[0.4em] &\quad \approx -1.0234, \end{aligned}

close to the revalued −1.0170-1.0170, while multiplying by 2525 would give about −10234-10234.

  1. A constructed position has mark 10(S−100)+10(S - 100)^{+} over the period, with no time dependence, and the price is 9999. The risk system reports a delta of 00 and a gamma of 00, and the price rises by 33. What does the Taylor attribution explain, what is the residual, and which hypothesis fails? What changes for a rise of 0.50.5?
Show the answer

At S=99S = 99 the mark is 00 and its first two derivatives are 00, so the expansion explains 00. Revaluation at 102102 gives 10⋅2=2010 \cdot 2 = 20, so the residual is 2020, the whole change. The expansion needs the value to be twice continuously differentiable on an open set containing the segment from 9999 to 102102, and the mark has a kink at 100100, where it is not differentiable. For a rise of 0.50.5 the segment from 9999 to 99.599.5 stays where the mark is identically 00, so the expansion is exact and the residual is 00. Full revaluation handles the larger move, or the path can be split at the strike, with 00 from 9999 to 100100 and 10⋅2=2010 \cdot 2 = 20 from 100100 to 102102 using the right derivative 1010. An option shortly before expiry has a smooth value, but its gamma changes fast near the strike, so its residual for a move across the strike can be large for a related reason, since the curvature at the start says little about the curvature along the path.

How this lesson connects