Derivation of Local by Fabrice Douglas Rouah www.FRouah.com www.Volopta.com

The derivation of local volatility is outlined in many papers and textbooks (such as the one by Jim Gatheral [1]), but in the derivations many steps are left out. In this Note we provide two derivations of local volatility. 1. The derivation by Dupire [2] that uses the Fokker-Planck equation. 2. The derivation by Derman et al. [3] of local volatility as a conditional expectation. We also present the derivation of local volatility from Black-Scholes , outlined in [1]. We will derive the following three equations that 2 involve local volatility  = (St; t) or local variance vL =  : 1. The Dupire equation in its most general form (appears in [1] on page 9)

2 @C 1 2 2 @ C @C =  K + (rT qT ) C K rT C: (1) @T 2 @K2 @K   2. The equation by Derman et al. [3] for local volatility as a conditional expected value (appears with qT = 0 in [3])

2 @C @C 1 2 2 @ C = K(rT qT ) qT C + K E  ST = K : (2) @T @K 2 T j @K2   3. Local volatility as a function of Black-Scholes implied volatility,  = (K;T ) (appears in [1]) expressed here as the local variance vL

@w @T vL = : (3) 2 2 1 y @w + 1 @2w + 1 1 1 + y @w w @y 2 @y2 4 4 w w @y       where w = (K;T )2T is the Black-Scholes total implied variance and y = K T ln where FT = exp tdt is the with t = rt qt (risk free FT 0 rate minus dividend yield).R Alternatively, local volatility can also be expressed in terms of  as 2 @ @  + 2T @T + (rT qT ) K @K 2 : 2 2 1 + Ky @ + KT @ 1 KT @  + K @   @K @K 4 @K @K2   h i Solving for the local variance in Equation (1), we obtain

@C @C (rT qT ) C K 2 =  (K;T )2 = @T @K : (4) 1 2 @2C 2 K @K 2 

1 If we set the risk-free rate rT and the dividend yield qT each equal to zero, Equations (1) and (2) can each be solved to yield the same equation involving local volatility, namely

@C 2 =  (K;T )2 = @T : (5) 1 2 @2C 2 K @K2

2 The local volatility is then vL =  (K;T ): In this Note the derivation of these equations are all explained in detail. p 1 Local Volatility Model for the Underlying

The underlying St follows the process

dSt = tStdt + (St; t)StdWt (6)

= (rt qt) Stdt + (St; t)StdWt: We sometimes drop the subscript and write dS = Sdt + SdW where  = (St; t). We need the following preliminaries:

T Discount factor P (t; T ) = exp rsds :  t  R  Fokker-Planck equation. Denote by f(St; t) the probability density func-  tion of the underlying price St at time t. Then f satis…es the equation @f @ 1 @2 = [Sf(S; t)] + 2S2f(S; t) : (7) @t @S 2 @S2   Time-t price of European call with strike K, denoted C = C(St;K)  + C = P (t; T )E (ST K) (8) = P (t; T )E (ST K)1  (ST >K) 1 = P (t; T )  (ST K)f(S; T )dS: ZK

where 1(ST >K) is the Heaviside function and where E [ ] = E [ t]. In the all the integrals in this Note, since the expectations are taken for thejF underlying price at t = T it is understood that S = ST ; f(S; T ) = f(ST ;T ) and dS = dST : We sometimes omit the subscript for notational convenience.

2 Derivation of the General Dupire Equation (1) 2.1 Required Derivatives

We need the following derivatives of the call C(St; t).

2 First with respect to strike  @C 1 @ = P (t; T ) (ST K)f(S; T )dS (9) @K @K ZK 1 = P (t; T ) f(S; T )dS: ZK Second derivative with respect to strike  2 @ C S= = P (t; T )[f(S; T )] 1 (10) @K2 S=K = P (t; T )f(K;T ):

We have assumed that lim f(S; T ) = 0: S !1 First derivative with respect to maturity–use the chain rule  @C @C 1 = P (t; T ) (ST K)f(S; T )dS + (11) @T @T  ZK 1 @ P (t; T ) (ST K) [f(S; T )] dS:  @T ZK @P Note that = rT P (t; T ) so we can write (11) @T

@C 1 @ = rT C + P (t; T ) (ST K) [f(S; T )] dS: (12) @T @T ZK 2.2 Main Equation @f In Equation (12) substitute the Fokker-Planck equation (7) for @t at t = T

@C 1 + rT C = P (t; T ) (ST K) (13) @T  ZK @ 1 @2 [ Sf(S; T )] + 2S2f(S; T ) dS: @S T 2 @S2     This is the main equation we need because it is from this equation that the Dupire local volatility is derived. In Equation (13) have two integrals to evaluate

1 @ I1 = T (ST K) [Sf(S; T )] dS; (14) K @S Z 2 1 @ 2 2 I2 = (ST K)  S f(S; T ) dS: @S2 ZK   Before evaluating these two integrals we need the following two identities.

3 2.3 Two Useful Identities 2.3.1 First Identity From the call price Equation (8), we obtain

C 1 = (ST K)f(S; T )dS (15) P (t; T ) ZK 1 1 = ST f(S; T )dS K f(S; T )dS: ZK ZK @C From the expression for @K in Equation (9) we obtain

1 1 @C f(S; T )dS = : P (t; T ) @K ZK Substitute back into Equation (15) and re-arrange terms to obtain the …rst identity 1 C K @C ST f(S; T )dS = : (16) P (t; T ) P (t; T ) @K ZK 2.3.2 Second Identity

@2C We use the expression for @K2 in Equation (10) to obtain the second identity 1 @2C f(K;T ) = : (17) P (t; T ) @K2

2.4 Evaluating the Integrals

We can now evaluate the integrals I1 and I2 de…ned in Equation (14).

2.4.1 First integral @ Use integration by parts with u = ST K; u0 = 1; v0 = @S [Sf(S; T )] ; v = Sf(S; T )

S= 1 I1 = [ (ST K)ST f(S; T )] 1  Sf(S; T )dS T S=K T ZK 1 = [0 0]  Sf(S; T )dS: T ZK We have assumed lim (S K)Sf(S; T ) = 0. Substitute the …rst identity (16) S !1 to obtain the …rst integral I1  C  K @C I = T + T : (18) 1 P (t; T ) P (t; T ) @K

4 2.4.2 Second integral

@2 2 2 Use integration by parts with u = ST K; u0 = 1; v0 = 2  S f(S; T ) ; v = @S @ 2S2f(S; T ) @S     S= @ 2 2 1 1 @ 2 2 I2 = (ST K)  S f(S; T )  S f(S; T ) dS @S @S  S=K ZK  S=   = [0 0] 2S2f(S; T ) 1 S=K 2 2 =  K f(K;T )  where 2 = (K;T )2. We have assumed that lim @ 2S2f(S; T ) = 0. S @S !1 Substitute the second identity (17) for f(K;T ) to obtain the second integral I2 2K2 @2C I = : (19) 2 P (t; T ) @K2

2.5 Obtaining the Dupire Equation We can now evaluate the main Equation (13) which we write as

@C 1 + rT C = P (t; T ) I1 + I2 : @T 2  

Substitute for I1 from Equation (18) and for I2 from Equation (19)

2 @C @C 1 2 2 @ C + rT C =  C  K +  K @T T T @K 2 @K2

Substitute for T = rT qT (risk free rate minus dividend yield) to obtain the Dupire equation (1)

2 @C 1 2 2 @ C @C =  K + (rT qT ) C K rT C: @T 2 @K2 @K   Solve for 2 = (K;T )2 to obtain the Dupire local variance in its general form

@C @C + qT C + (rT qK )K (K;T )2 = @T @K 1 2 @2C 2 K @K2

Dupire [2] assumes zero interest rates and zero dividend yield. Hence rT = qT = 0 so that the underlying process is dSt = (St; t)StdWt: We obtain

@C (K;T )2 = @T : 1 2 @2C 2 K @K2 which is Equation (5).

5 3 Derivation of Local Volatility as an Expected Value, Equation (2)

We need the following preliminaries, all of which are easy to show

@ (S K)+ = 1 @ 1 = (S K) @S (S>K) @S (S>K) @ (S K)+ = 1 @ 1 = (S K) @K (S>K) @K (S>K)

2 @C = P (t; T )E 1 @ C = P (t; T )E [(S K)] @K (S>K) @K2   In the table, ( ) denotes the Dirac delta function. Now de…ne the function  f(ST ;T ) as + f(ST ;T ) = P (t; T )(ST K) : Recall the process for St is given by Equation (6). By It¯o’s Lemma, f follows the process @f @f 1 @2f @f df = +  S + 2 S dT +  S dW : (20) @T T T @S 2 T T @S2 T T @S T  T T   T  Now the partial derivatives are

@f + = rT P (t; T )(ST K) ; @T @f = P (t; T )1(ST >K); @ST @2f 2 = P (t; T ) (ST K) : @ST Substitute them into Equation (20) df = P (t; T ) (21)  + 1 2 2 rT (ST K) +  ST 1 +  S (ST K) dT T (ST >K) 2 T T  

+P (t; T ) T ST 1(ST >K) dWT Consider the …rst two terms of (21), which can be written as + rT (ST K) +  ST 1 = rT (ST K)1 +  ST 1 T (ST >K) (ST >K) T (ST >K) = rT K1 qT ST 1 : (ST >K) (ST >K) When we take the expected value of Equation (21), the stochastic term drops out since E [dWT ] = 0. Hence we can write the expected value of (21) as dC = E [df] (22)

1 2 2 = P (t; T )E rT K1 qT ST 1 +  S (ST K) dT (ST >K) (ST >K) 2 T T  

6 so that

dC 1 2 2 = P (t; T )E rT K1 qT ST 1 +  S (ST K) . (23) dT (ST >K) (ST >K) 2 T T   Using the second line in Equation (8), we can write

P (t; T )E ST 1(ST >K) = C + KP (t; T )E 1(ST >K) so Equation (23) becomes    dC = KP (t; T )rT E[1 ] qT C + KP (t; T )E 1 (24) dT (ST >K) (ST >K) 1 2 2   + P (t; T )E  S (ST K) 2 T T @C 1  2 2 = K(rT qT ) qT C + P (t; T )E  S (ST K) @K 2 T T @C   where we have substituted @K for P (t; T )E[1(ST >K)]. The last term in the last line of Equation (24) can be written

1 2 2 1 2 2 P (t; T )E  S (ST K) = P (t; T )E  S ST = K E[(ST K)] 2 T T 2 T T j   1  2 2 = P (t; T )E  ST = K K E[(ST K)] 2 T j 2 1 2  2 @ C = E  ST = K K 2 T j @K2

@2C   where we have substituted @K2 for P (t; T )E[(ST K)]. We obtain the …nal result, Equation (2)

2 @C @C 1 2 2 @ C = K(rT qT ) qT C + K E  ST = K : @T @K 2 T j @K2   When rT = qT = 0 we can re-arrange the result to obtain

@C 2 @T E  ST = K = T 1 2 @2C j 2 K @K2   which, again, is Equation (5). Hence when the dividend and interest rate are both zero, the derivation of local volatility using Dupire’s approach and the derivation using conditional expectation produce the same result.

4 Derivation of Local Volatility From Implied Volatility, Equation (3)

To express local volatility in terms of implied volatility, we need the three deriv- @C @C @2C atives @T , @K ; and @K2 that appear in Equation (1), but expressed in terms of

7 implied volatility. Following Gatheral [1] we de…ne the log- K y = ln FT

T where FT = S0 exp  dt is the forward price ( = rt qt, risk free rate 0 t t minus dividend yield)R and Kis the , and the "total" Black-Scholes implied variance w = (K;T )2T where (K;T ) is the implied volatility. The Black-Scholes call price can then be written as

y CBS (S0;K;  (K;T ) ;T ) = CBS (S0;FT e ; w; T ) (25) y = FT N(d1) e N(d2) f g where S0 T w ln K + 0 (rt qt) dt + 2 1 1 1 d = = yw 2 + w 2 (26) 1 w 2 R p 1 1 1 and d2 = d1 pw = yw 2 w 2 . 2 4.1 The Reparameterized Local Volatility Function To express the local volatility Equation (1) in terms of y, we note that the market call price is y C(S0;K;T ) = C(S0;FT e ;T ) and we take derivatives. The …rst derivative we need is, by the chain rule @C @C @K @C = = K: (27) @y @K @y @K The second derivative we need is @2C @ @C @C @K = K + (28) @y2 @y @K @K @y   @2C @C = K2 + ; @K2 @y

@A @A @K @ @C @2C @K @2C since by the chain rule @y = @K @y , so that @y @K = @K2 @y = @K2 K. The third derivative we need is  @C @C @C @K = + (29) @T @T @K @T @C @C = + K @T @K T @C @C = +  @T @y T

8 T @K since K = S0 exp 0 tdt + y so that @T = KT . Equation (28) implies that   R @2C @2C @C K2 = : @K2 @y2 @y Now we substitute into Equation (1), reproduced here for convenience

@C 1 @2C @C = 2K2 +  C K @T 2 @K2 T @K   @C @C 1 @2C @C @C  = 2 +  C @T @y T 2 @y2 @y T @y     which simpli…es to @C v @2C @C = L +  C (30) @T 2 @y2 @y T   2 where vL =  (K;T ) is the local variance. This is Equation (1.8) of Gatheral [1].

4.2 Three Useful Identities Before expression the local volatility Equation (1) in terms of implied volatility, we …rst derive three identities used by Gatheral [1] that help in this regard. We use the fact that the derivatives of the standard normal cdf and pdf are, using the chain rule, N 0(x) = n(x)x0 and n0(x) = xn(x)x0. We also use the relation 1 1 2 (d2+pw) n(d1) = e 2 p2 1 1 2 (d +2d2pw+w) = e 2 2 p2 1 d2pw w = n(d2)e 2 y = n(d2)e :

From Equation (25) the …rst derivative with respect to w is

@CBS y = FT [n(d1)d1w e n(d2)d2w] @w y 1 1 y = FT n(d2)e d2w + w 2 e n(d2)d2w 2     1 y 1 = F e n(d )w 2 2 T 2 h i

9 where d1w is the …rst derivative of d1 with respect to w and similarly for d2. The second derivative is 2 @ CBS 1 y 1 1 3 = FT e n(d2)d2d2ww 2 n(d2)w 2 (31) @w2 2 2   1 y 1 1 1 = FT e n(d2)w 2 d2d2w w 2 2   @CBS 1 1 1 1 3 1 1 1 1 = yw 2 + w 2 yw 2 w 2 w @w 2 2 4 2      @C 1 1 y2 = BS + : @w 8 2w 2w2   This is the …rst identity we need. The second identity we need is

2 @ CBS 1 1 @ y = F w 2 [e n(d )] (32) @w@y 2 T @y 2

1 1 y y = FT w 2 [e n(d2) e n(d2)d2d2y] 2 @CBS = [1 d2d2y] @w @C 1 y = BS @w 2 w   1 where d2y = w 2 is the …rst derivative of d2 with respect to y. To obtain the third identity, consider the derivative

@CBS y y = FT [n(d1)d1y e N(d2) e n(d2)d2y] @y y = FT e [n(d2)d1y N(d2) n(d2)d2y] y = FT e N(d2): The third identity we need is

2 @ CBS y y = FT [e N(d2) + e n(d2)d2y] (33) @y2 y y 1 = FT e N(d2) + FT e n(d2)w 2 @C @C = BS + 2 BS : @y @w We are now ready for the main derivation of this section.

4.3 Local Volatility in Terms of Implied Volatility

We note that when the market price C(S0;K;T ) is equal to the Black-Scholes price with the implied volatility (K;T ) as the input to volatility

C(S0;K;T ) = CBS(S0;K; (K;T );T ): (34)

10 We can also reparameterize the Black-Scholes price in terms of the total implied 2 y volatility w = (K;T ) T and K = FT e . Since w depends on K and K depends on y, we have that w = w(y) and we can write

y C(S0;K;T ) = CBS(S0;FT e ; w(y);T ): (35)

We need derivatives of the market call price C(S0;K;T ) in terms of the Black- y Scholes call price CBS(S0;FT e ; w(y);T ). From Equation (35), the …rst deriv- ative we need is @C @C @C @w = BS + BS (36) @y @y @w @y = a(w; y) + b(w; y)c(y):

@2C It is easier to visualize the second derivative we need, @y2 , when we express the @C partials in @y as a; b; and c:

@2C @a @a @w @c @b @b @w = + + b(w; y) + + c(y) (37) @y2 @y @w @y @y @y @w @y   @2C @2C @w @C @2w @2C @2C @w @w = BS + BS + BS + BS + BS @y2 @y@w @y @w @y2 @w@y @w2 @y @y   @2C @2C @w @C @2w @2C @w 2 = BS + 2 BS + BS + BS : @y2 @y@w @y @w @y2 @w2 @y   The third derivative we need is @C @C @C @w = BS + BS (38) @T @T @w @T @C @w =  C + BS : T @w @T Gatheral explains that the second equality follows because the only explicit dependence of CBS on T is through the forward price FT , even though CBS depends implicitly on T through y and w. The reparameterized Dupire equation (30) is reproduced here for convenience

@C v @2C @C = L +  C: @T 2 @y2 @y T   @C @2C @C We substitute for @T ; @y2 ; and @y from Equations (38), (37), and (36) respec- tively and cancel T C from both sides to obtain

@C @w v @2C @2C @w @C @2w @2C @w 2 BS = L BS + 2 BS + BS + BS @w @T 2 @y2 @y@w @y @w @y2 @w2 @y "   @C @C @w BS + BS : (39) @y @w @y 

11 2 2 2 @ CBS @ CBS @ CBS Now substitute for @w2 ; @w@y ; and @y2 from the identities in Equations (31), (32), and (33) respectively, the idea being to end up with terms involving @CBS @w on the right hand side of Equation (39) that can be factored out.

@C @w v @C 1 y @w 1 1 y2 @w 2 BS = L BS 2 + 2 + + @w @T 2 @w 2 w @y 8 2w 2w @y "       @2w @w + : @y2 @y 

@CBS Remove the factor @w from both sides and simplify to obtain

@w y @w 1 @2w 1 1 1 y2 @w 2 = vL 1 + + + : @T w @y 2 @y2 4 4 w w @y "     #

Solve for vL to obtain the …nal expression for the local volatility expressed in terms of implied volatility w =  (K;T )2 T and the log-moneyness y = ln K FT

@w @T vL = : 2 2 1 y @w + 1 @2w + 1 1 1 + y @w w @y 2 @y2 4 4 w w @y       4.4 Alternate Derivation @C @2C @C In this derivation we express the derivatives @K ; @K2 ; and @T in the Dupire equation (1) in terms of y and w = w(y), but we substitute these derivatives directly in Equation (1) rather than in (30). This means that we take derivatives with respect to K and T , rather than with y and T: Recall that from Equation (35), the market call price is equal to the Black-Scholes call price with implied volatility as input

y C(S0;K;T ) = CBS(S0;FT e ; w(y);T ):

Recall also that from Equation (25) the Black-Scholes call price reparameterized in terms of y and w is

y y CBS (S0;FT e ; w(y);T ) = FT N(d1) e N(d2) f g where d1 is given in Equation (26), and where d2 = d1 pw. The …rst derivative we need is @C @C @y @C @w = BS + BS (40) @K @y @K @w @K 1 @C @C @w = BS + BS : K @y @w @K

12 The second derivative is @2C 1 @C 1 @ @C = BS + BS : (41) @K2 K2 @y K @K @y   @ @C @w @C @2w + BS + BS @K @w @K @w @K2   @C @ @C @A Let A = @y for notational convenience. Then @K @y = @K and   @ @C @A BS = (42) @K @y @K   @A @y @A @w = + @y @K @w @K @2C 1 @2C @w = BS + BS : @y2 K @y@w @K Similarly @ @C @2C 1 @2C @w BS = BS + BS : (43) @K @w @y@w K @w2 @K   Substituting Equations (42) and (43) into Equation (41) produces

@2C 1 @C 1 @2C 1 @2C @w = BS + BS + BS (44) @K2 K2 @y K @y2 K @y@w @K   @2C 1 @2C @w @w @C @2w + BS + BS + BS @y@w K @w2 @K @K @w @K2   1 @2C @C 2 @2C @w = BS BS + BS K2 @y2 @y K @y@w @K   @2C @w 2 @C @2w + BS + BS : @w2 @K @w @K2   The third derivative we need is @C @C @C @y @C @w = BS + BS + BS (45) @T @T @y @T @w @T @C @C @w =  C + BS  + BS ; T BS @y T @w @T

@CBS again using the fact that @T depends explicitly on T only through FT : Now @C @2C @C substitute for @K ; @K2 ; and @T from Equations (40), (44), and (45) respectively into Equation (4) for Dupire local variance, reproduced here for convenience.

@C @C  CBS K 2 = @T T @K : 1 2 @2C 2 K @K2 

13 We obtain, after applying the three useful identities in Section 4.2,

@CBS @CBS @w 1 @CBS @CBS @w T CBS + @y T + @w @T T CBS K K @y + @w @K 2 = : 2 2 2 2 2 1 K2 1 @ CBS @CBS + 2 @ CBSh @w + @ CBS @w + @CBS @ iw 2 K2 @y2 @y K @y@w @K @w2 @K @w @K2 h   i  @CBS Applying the three useful identities in Section 4.2 allows the term @w to be factored out of the numerator and denominator. The last equation becomes @w +  K @w 2 = @T T @K : (46) 1 2 2 2 1 y @w 1 1 y2 @w 2 @2w K 2 +  +  + 2 + 2 2 K K 2 w @K 8 2w 2w @K @K h   i Equation (46) can be simpli…ed  by considering deriving the partial derivatives 2 @w of the Black-Scholes total implied variance, w = (K;T ) T . We have @T = @ 2 @w @ @2w @ 2 @2 2T @T +  , @K = 2T @K , and @K2 = 2T @K +  @K2 : Substitute into Equation (46). The numerator in Equationh (46) becomes i @ @ 2 + 2T +  K (47) @T T @K   and the denominator becomes 1 y @ 1 1 y2 @ 2 1 + 2KT + 2K22T 2 + 2 w @K 8 2w 2w2 @K       @ 2 @2 +K2T +  : @K @K2 "  # Replacing w with 2T everywhere in the denominator produces 1 y @ 1 1 y2 @ 2 1 + 2KT + 2K22T 2 + 2 2T @K 8 22T 24T 2 @K       @ 2 @2 +K2T +  @K @K2 "  # @ 2Ky @ K22T 2 @ 2 K2y2 @ 2 = 1 + KT + @K  @K 4 @K 2 @K     @2 +K2T @K2 Ky @ 2 Ky @ Ky @ 2 = 1 + 1 2 + : (48)  @K  @K  @K   "   # Substituting the numerator in (47) and the denominator in (48) back to Equa- tion (46), we obtain

2 @ @  + 2T @T + T K @K 2 2 2 1 + Ky @ + KT @ 1 KT @ + K @   @K @K 4 @K @K2   h  i 14 See also the dissertation by van der Kamp [4] for additional details of this alternate derivation.

References

[1] Gatheral, J. (2006). The Volatility Surface: A Practitioner’s Guide. New York, NY: John Wiley & Sons. [2] Dupire, B. (1994). "Pricing With a Smile." Risk 7, pp. 18-20. [3] Derman, E., Kani, I., and M. Kamal (1996). "Trading and Hedging Local Volatility." Goldman Sachs Quantitative Strategies Research Notes. [4] van der Kamp, Roel (2009). "Local Volatility Modelling." M.Sc. disserta- tion, University of Twente, The Netherlands.

15