CONSERVATIVE SCHEMES FOR SOLVING 1D ...

2 downloads 0 Views 180KB Size Report
We then apply this to the arbitrage free SABR model. 1. Set-up. 1.1. Problem. Let ˜F(T) be a Martingale governed by the effective 1-d process d ˜F = D( ˜F)E1/2(T, ...
CONSERVATIVE SCHEMES FOR SOLVING 1D PDES PATRICK S. HAGAN [email protected] Abstract. E¤ective forward equations of the form QT =

1 2

D2 (F )E 2 (T; F )Q

FF

for F

;

< F < F +;

arise whenever the underlying variable F (T ) is a Martingale. It is often necessary to solve these equations over regions which extend 4-5 standard deviations above the forward. For a long dated interest rate deal, this means the upper boundary can easily be over 200%, whereas the current forward f may only be around 2%. Even if hundreds of grid points are used, an equally spaced grid may only have 3 to 4 grid points below the forward f . This is an unacceptable degradation of accuracy. To rectify this, here we change variables to Z F dF 0 z= 0 f D(F ) to elimintate the D2 (F ) in the di¤usion term. We then develop a numerical scheme which exactly preserves the zero-eth and …rst moment of F (not z). Then the numerical solutions conserves probability exactly and also exactly maintains the Martingale property of F . Thus the numerical solution itself is an arbitrage free model. We then apply this to the arbitrage free SABR model

1. Set-up. 1.1. Problem. Let F~ (T ) be a Martingale governed by the e¤ective 1-d process (1.1a) (1.1b)

dF~ = D(F~ )E 1=2 (T; F~ )dW F~ (t) ! f as T ! 0;

for T > 0;

and de…ne the transition density Q(T; F ; f ) via n o (1.2) Q(T; F ; f )dF = prob F < F~ (T ) < F + dF j F~ (0) = f : This density satis…es the forward Kolmogorov equation,

(1.3a) (1.3b)

QT =

1 2

D2 (F )E(T; F )Q

Q ! (F

f)

FF

for T > 0;

as T ! 0:

Here we develop a method for solving this equation numerically over a …nite domain, F < F < F + , with an eye towards calculating values of European options by integrating the payo¤ against the terminal density:

(1.4a) (1.4b)

Vcall (f ; K; Texp ) = Vput (f; K; Texp ) =

Z

1

K Z K

(F

K)Q(Texp ; F ; f )dF;

(F

K)Q(Texp ; F ; f )dF:

1

Accuracy often requires solving the forward equation over domains which extend 4-5 standard deviations above the forward. For long dated interest rate deals, this can mean an upper boundary F + of over 200%, even though the current forward f may only be around 2%. Even if hundreds of grid points are used, an equally spaced grid may have only 3 to 4 grid points below the forward f . This is an unacceptable degradation of accuracy and/or performance. 1

To rectify this, we shall change variables to (1.5)

z=

Z

F

f

dF 0 D(F 0 )

and develop a …nite di¤erence scheme in z. This eliminates the D2 (F ) in the di¤usion term. We require our scheme to exactly preserve the zero-eth and …rst moment of F (not z!). The numerical solutions then conserve probability exactly, and also exactly maintain the Martingale property of F . Thus, the numerical solution itself is an exactly arbitrage free model. By splitting the di¤usion coe¢ cient into a static factor D(F~ ) and a time-dependent factor E 1=2 (T; F~ ), we have avoided the complexity of a time-dependent changes of variable, without requiring the di¤usion coe¢ cient to be completely static. Of course time dependent factor E 1=2 (T; F~ ) is varies too strongly, the change of variables may be ine¤ective in reducing the number of grid points required to attain the desired level of accuracy.. 1.2. Boundary conditions and conservation. To preserve the Martingale property of F , we need to use absorbing boundary conditions, (1.6)

Q(T; F ; f ) = 0

at F = F ;

as will be seen below. Since some probability may reach the boundaries at at F = F , to conserve probability we allow delta functions at the left and right boundaries. Thus, the probability density is 8 L at F = F < P (T ) (F F ) Q(T; F ) for F < F < F + (1.7) P (T; F ) = : R P (T ) (F F + ) at F = F + and the probability density satis…es (1.8a)

QT =

1 2

D2 (F )E(T; F )Q

FF

for F

< F < F +:

with the boundary conditions (1.8b)

Q(T; F ) = 0

(1.8c)

Q(T; F ) = 0

as F ! F ; as F ! F + :

and the initial condition (1.8d)

Q(T; F ) ! (F

f)

as T ! 0:

The probability in the left and right delta functions increases according to (1.8e) (1.8f)

PTL = PTR =

1 2

D2 (F )E(T; F )Q 1 2

F =F F

D2 (F )E(T; F )Q

;

F =F + F

:

As shown below, this just states that the increase in probability in the delta functions is given by the ‡ux of probability across the left and right boundaries. It may be that the boundaries at F and F + are inaccessible, or are so far from the forward f that there is no signi…cant probability of reaching the boundaries. In that case the probabilities P L (T ) and P R (T ) are essentially zero, so including the delta functions into the the problem is super‡uous. Nevertheless, we always incorporate the delta functions into the problem, even when they are super‡uous, since the probablity in P L (T ) and P R (T ) measures the numerical dispersion and other errors in our solution. 2

1.3. Conservation and the boundary conditions. Since Z

(1.9)

F+ 1 2

F

D2 (F )E(T; F )Q

FF

dF =

1 2

D2 (F )E(T; F )Q

F =F + F F =F

;

it is easily seen that the total probability is conserved: ( ) Z F+ d L R P (T ) + Q(T; F )dF + P (T ) (1.10) dT F = PTL

1 2

F =F

D2 (F )E(T; F )Q

+

F

1 2

D2 (F )E(T; F )Q

F =F + F

+ PTR

With PTL (T ) and PTR (T ) given by 1.8e, 1.8f the right hand side cancels out, ( ) Z F+ d L R (1.11) P (T ) + Q(T; F )dF + P (T ) = 0; dT F so the total probability is constant. From the initial condition, then, P L (T ) +

(1.12)

Z

F+

Q(T; F )dF + P R (T ) = 1:

F

Similarly, integration by parts yields (1.13)

Z

F+

F

1 2F

D2 (F )E(T; F )Q

FF

dF 0 =

1 2

F D2 (F )E(T; F )Q

so the …rst moment is goverened by: ( ) Z F+ d F P L (T ) + F Q(T; F )dF + F + P R (T ) = (1.14) dT F

F

F =F +

D2 (F )E(T; F )Q

F =F + 1 2 D (F )E(T; F )Q 2 F =F

F =F

;

:

The absorbing boundary conditions yield (1.15)

1 2 2 D (F )E(T; F )Q

!0

as F ! F

and as F ! F + :

Thus, with (and only with!) absorbing boundary conditions, the right hand side of eq. 1.14i is zero, ( ) Z F+ d L 0 0 0 + R (1.16) F P (T ) + F Q(T; F )dF + F P (T ) = 0: dT F and the expected value of F~ (T ) is constant, so F~ (T ) is a Martingale. From the initial conditions, then, (1.17)

L

F P (T ) +

Z

F+

F Q(T; F )dF + F + P R (T ) = f

F

2. Numerical discretization in F. Following the spirit of the method of lines, we …rst discretize our equations in the F variable. This reduces the PDE to a set of coupled ODE’s. We then use di¤erent sti¤ solvers to integrate the equations in time. 3

2.1. Change of variable. De…ne z(F ) by (2.1a)

z=

Z

F

dF 0 ; D(F 0 )

f

and let F (z) be the inverse function. For clarity, let (2.1b)

C(z) = D(F (z)):

Then dz 1 1 = = ; dF D(F ) C(z)

(2.2a)

dF = D(F ) = C(z); dz

and (2.2b)

F (z) =

Z

z

C(z 0 )dz 0 :

0

We also have @ 1 @ 1 @ = = : @F D(F ) @z C(z) @z

(2.2c)

Upon solving for the density Q(T; F ), we will need to evaluate integrals of the form (2.3)

I 0 (A; B) =

Z

Z

B

Q(T; F 0 )dF 0 ;

I 1 (A; B) =

A

B

F Q(T; F )dF;

A

to evaluate various European options. In terms of z, the integrals are of the form, (2.4)

I 0 (A; B) =

Z

z(B)

I 1 (A; B) =

Q(T; z)C(z)dz; ;

z(A)

Z

z(B)

F (z)Q(T; z)C(z)dz;

z(A)

so we need to solve for (2.5)

(T; z) = Q(T; F (z))D(F (z)) = Q(T; z)

dF : dz

(T; z) is just the probability density in the z coordinates. In terms of , the PDE becomes (2.6)

T

= 12 D(F ) [D(F )E(T; F ) ]F F

for F

< F < F +:

Switching variables from F to z yields (2.7a)

T

=

1 2

@ @z

1 [C(z)E(T; z) ]z C(z)

for z < F < z + ; z

with absorbing boundary conditions, (2.7b)

(T; z) = 0

(2.7c)

(T; z) = 0

as F ! z = z(F );

as F ! z + = z F + ; 4

and with initial condition (2.7d)

(T; z) ! (z)

as T ! t:

The probability in the left and right delta functions accumulates according to (2.7e)

PTL =

(2.7f)

PTR =

1 [C(z)E(T; z) ]z C(z)

1 2

1 2

z=z

1 [C(z)E(T; z) ]z C(z)

; z=z +

Our objective is to discretize these equations in a way that preserves the moments of F: 2.2. Discretization. The forward p F is roughly N standard deviations above/below its mean (the current forward f ) when z(F ) = N T . Our preference is to chose the number of standard deviations, and set the minimum and maximum value of z as p p z + = N Texp : (2.8) z = N Texp ; Commonly the di¤usion coe¢ cient D(F ) is zero at, or just below F = 0. A zero, where C(z0 ) = D(F (z0 )) = 0 forms a barrier to di¤usion. Even though di¤usion through the barrier makes sense mathemetically in some cases, we choose not to extend our solution below the barrier. So if a barrier occurs at a point z0 , we pick the edge of the grid to be at or above z0 . So the boundaries we use are n o p p (2.9a) z = max z0 ; N Texp ; z + = N Texp :

In terms of F , let the boundaries be

F

F + = F (z + ):

= F (z );

Once the boundaries have been selected, we discretize evenly in z, (2.10a)

zj = z + jh;

j = 0; 1; :::; J

where zJ = z + Jh = z +

(2.10b) We de…ne

j

to be the density in the cell zj

(2.11a)

Z

h j (T ) =

1

< z < zj in the sense that

zj

(T; z) dz =

zj

z(F + ):

Z

F (zj )

Q(T; F )dF

F (zj

1

1)

holds exactly, so h j (T ) is the total probability in cell j. We also require (2.11b)

Fj

1 2

j (T ) =

Z

zj

zj

F (z) (T; z) dz =

Z

F (zj )

F (zj

1

F Q (T; F ) dF; 1)

to hold exactly, where (2.11c)

Fj

1 2

F (zj

1 2

)

F (z + [j 5

1 2 ]h);

is the value of F (z) at the mid-point. To simplify notation, let Sj

(2.12)

Cj

1 2

Ej

j (T )

1 2

= C(zj

1 2

= D(Fj

)E(T; zj )E(T; Fj

1 2

1 2

) (T; zj ) 1 2

) (T; zj ):

We discretize the PDE as (2.13a)

1 @ j = @T 2h

Sj Sj hC~j 1

Sj+1 Sj hC~j

1

!

for j = 1; 2; :::; J

where we de…ne C~j by hC~j = Fj+ 21

(2.13b)

Fj

1 2

:

As we shall see, this choice is necessary to preserve the expected value of F ; since Z zj Fj+ 12 Fj 21 = C(z)dz zj

1

it represents the average value of hC(z) in cell j. To apply the absorbing boundary conditions, we use (2.13c)

S0 =

S1 ;

SJ+1 =

SJ :

Here, S0 covers z h < z < z , the …rst cell beyond the domain; this “shadow point” is not part of the solution; it is being used to enforce the absorbing boundary conditions accurately. Similarly, SJ+1 is also a shadow point used to enforce the boundary condition at z + . Finally, the probability in the boundaries accumulates according to S1 S0 S1 = ; 2hC~0 hC~0 SJ+1 SJ SJ = = ; ~ 2hCJ hC~J

(2.14a)

PTL =

(2.14b)

PTR

where hC~0 = 2 F 12

(2.14c)

hC~J = 2 FJ

F0 ;

2.3. Numerical conservation. Observe that 8 9 J J = S d < L X j S0 X 1 (2.15) P + h + PR = + ; dT : 2hC~0 j=1

j=1

Sj+1 Sj 2hC~j

= 0;

so the total probability is exactly conserved, (2.16)

PL +

J X

h

j

j=1

6

+ P R = 1:

FJ

1 2

Sj Sj 1 2hC~j 1

!

SJ+1 SJ 2hC~J

Similarly, F0 PTL +

(2.17)

J X

hFj

j T

1 2

+ FJ PTR

j=1

=

F 12

F0

2hC~0

(S1

(2.18)

+

J X

Fj 2hC~j

Fj+ 12

j=1

With the choice hC~j = Fj+ 21 F0 PTL

J X1

S0 )

hFj

Fj 1 2

j T

1 2

+

1 2

(Sj+1

Sj )

FJ

FJ 2hC~J

1 2

(SJ+1

SJ )

(Sm+1

Sm )

, this reduces to

FJ PTR

1 4

=

(S1

1 2

S0 )

j=1

m X1

(Sj+1

Sj )

1 4

j=1

=

1 4

1 4

(S1 + S0 )

(Sm+1 + Sm ) = 0:

So the …rst moment is conserved exactly, and F0 P L +

(2.19)

m X

hFj

j

1 2

+ Fm P R = f:

j=1

This is enough to conclude that the numerical solution itself is an arbitrage free model, provided that all the probability densities j are positive. In turn, the parabolic maximum pricinciple guarantees that the densities are positive provided the discretization in space is …ne enough. 2.4. European option values & sub-gridscale models. Consider a European call option with strike K. (2.20)

Vcall (Texp ; K) =

Z

1

(F

K) P (Texp ; F )dF;

K

Let (2.21a)

z (K) =

Z

K

f

dF 0 ; D(F 0 )

with the strike falling in cell k: zk

1

< z(K)

zk :

After obtaining the probability density (Texp ; z) at the expiry date, the option value is given by Z zJ (2.22) Vcall (Texp ; K) = (F (z) K) (Texp ; z) dz + F + K P R (Texp ): z(K)

Recall that integrating over an entire cell yields Z zj (2.23) (F (z) K) (T; z) dz = [Fj zj

K] j (T )

1 2

1

exactly, so (2.24)

Vcall (Texp ; K) =

Z

zk

(F (z)

K) (T; z) dz +

z(K)

J X

[Fj

1 2

K]h j (Texp ) + F +

j=k+1

exactly. Thus we only need to integrate over the partial cell k to evaluate the option. 7

K P R (Texp )

2.4.1. Sub-gridscale model. To integrate the payo¤ as accurately as possible, we need to model the distribution of Q(T; F ) within a grid cell. Here we choose the simplest sub-gridscale model, where Q(T; F ) is taken to be linear in F within the j th cell. Recall that if we integrate across the entire cell, then both Z zj Z Fj (2.25a) h j (T ) = (T; z) dz = Q (T; F ) dF; zj

(2.25b)

hFj

1 2

j (T )

=

Z

Fj

1

1

zj

F (z) (T; z) dz =

zj

Z

Fj

F Q (T; F ) dF;

Fj

1

1

hold exactly. Using a linear model then requires Q to be (2.26a)

Q(T; F ) =

h Fj

j

1 + 3b

Fj

2F

Fj Fj

1

Fj

1

Fj

for Fj

1

< F < Fj ;

1

within cell j, with (2.26b)

b=

2Fj

Fj

1 2

Fj

Fj

Fj

1

:

1

Note that b = 0 if the expected value of F in cell j, namely Fj

= F (zj

1 2

1 2

), is equal to

1 2

(Fj

1

+ Fj ).

2.4.2. Option values using the sub-gridscale model. Using this sub-gridscale model yields Z zk Z Fk (F (z) K) (T; z) dz = (2.27) (F K) Q(T; F )dF z(K)

F

2

= 12 h

k

(Fk K) Fk Fk 1

1 + bk

Fk + 2K 3Fk Fk Fk 1

1

Consequently, the value of European call is 2

(2.28a)

Vcall (Texp ; K) = 21 h +

k

(Fk K) Fk Fk 1

J X

[Fj

Fk + 2K 3Fk Fk Fk 1

1 + bk

K]h j (Texp ) + F +

1 2

1

K P R (Texp ):

j=k+1

Similarly, the value of a European put option is (2.28b)

Vput (Texp ; K) = K

F

L

P (Texp ) +

k X1

[K

Fj

1 2

]h j (Texp )

j=1

2

+ 12 h

(K Fk 1 ) k Fk Fk 1

1

bk

3Fk

Fk Fk

Fk

For both cases, (2.28c)

bk =

2Fk

Fk

1 2

Fk

Fk

1

Fk

:

1

The value of a straddle can be obtained from (2.28d)

Vstr (Texp ; K) = Vcall (Texp ; K) + Vput (Texp ; K) 8

2K

1 1

:

In a similar manner, the values of digital European calls and puts are dig Vcall (Texp ; K) = h

(2.29a)

k

Fk K Fk Fk 1

J X

+

1 + 3bk

K Fk

Fk Fk

1 1

h j (Texp ) + P R (Texp ):

j=k+1

Similarly, the value of a European put option is k X1

dig Vput (Texp ; K) = P L (Texp ) +

(2.29b)

h j (Texp )

j=1

+h

k

K Fk

Fk Fk

1

1

3bk

1

Fk K Fk Fk 1

:

2.5. Values of general European options. 2.5.1. Payo¤ determined by a function. Suppose we are given a general payo¤ function V pay (F ), and suppose that the function is C 1 . Then we …rst …nd the function values at all the AFSABR grid points, Vjpay = V pay (Fj )

(2.30a)

for j = 0; 1; :::; J:

We approximate the function as linear within each cell, V pay (F ) = Vjpay1

(2.30b)

Fj F Fj Fj

+ 1

F Fj

Fj Fj

1

Vjpay

1

for Fj

1

< F < Fj :

Then with no further approximations, the option value is (2.30c)

V =

V0pay P L (T )

+

J X

Vjpay1

j=1

Fj

Fj

Fj

Fj

1 2

+

Fj Fj

1

Fj

1 2

Fj

1 1

Vjpay h j (T ) + VJpay P R (T ):

2.5.2. Payo¤ determined by a table. Suppose that we are only given the payo¤ at a set of points Vkpay = V pay (Ek )

(2.31)

for k = 0; 1; :::; K:

We approximate the payo¤ as linear within each interval, (2.32a)

V pay (F ) = Vkpay1

Ek F Ek Ek

+ 1

F Ek

Ek Ek

1 1

Vkpay

for Ek

1

< F < Ek :

For F < E0 and F > EK ; either ‡at or linear approximation can be used (2.32b)

(2.32c)

V pay (F ) =

V pay (F ) =

V0pay V0pay

‡at extrapolation (V1pay V0pay )

E0 F E1 E0

VKpay ‡at extrapolation pay VK + EKF EEKK 1 VKpay VKpay1 9

linear extrapolation

linear extrapolation

for F < E0 :

for EK < F:

We …rst use the interpolation to deterimine the value of the payo¤ at every AF SABR gridpoint F0 ; F1 ; : : : ; FJ . We then augment the payo¤ points Ek to include all the SABR gridpoints Fj . Thus we can assume that consecutive payo¤ points fall into the same SABR interval, so that for each k; Fj

Ek

1

< Ek

1

Fj :

Consider the value Vk which comes from the k th payo¤ interval, 8 for F < Ek 1 < 0 pay Ek F + EFk EEkk 11 Vkpay V Vk (Texp ) = : k 1 Ek Ek 1 0 for Ek < F

for Ek

1

< F < Ek :

Note that we are approximating V pay as linear within this interval. This yields the value Vk = h

(2.33a)

j

Ek Fj

Ek Fj

1

1 2

1

Vkpay + Vkpay1

1 + 3bj

Ek + Ek Fj

1

+ 12 bj Vkpay where j is the interval for which Fj

Ek

1

(2.33b)

< Ek

Fj , and

2Fj

Fj

1

bj =

1 2

Fj

Fj

1

Fj

Fj Fj 1 Fj 1 Ek Ek Vkpay1 Fj Fj

:

1

Summing Vk over all k then gives the total option value. This formula simpli…es if either Ek ,or Ek 1 ,or both are grid points. If Ek (2.34a)

Vk = h

j

Ek Fj

Fj Fj

1 1

1 2

Vkpay + Vkpay1

1

3bj

1 1

1

= Fj

Fj Ek + 12 bj Vkpay Fj Fj 1

1

Vkpay1

then Ek Fj

Fj Fj

1

:

1

If Ek = Fj , then (2.34b) Vk = h If both Ek (2.34c)

1

j

= Fj

Fj Fj 1

Ek Fj

1 1

1 2

Vkpay + Vkpay1

1 + 3bj

Ek 1 Fj 1 + 12 bj Vkpay Fj Fj 1

Vkpay1

Fj Fj

Ek Fj

1 1

and Ek = Fj , then Vk = h

j

Vkpay

Fj Fj

1 2

Fj Fj

1 1

+ Vkpay1

Fj

Fj

1 2

Fj

Fj

1

2.6. Initial condition. We need to pose an initial condition Q0 (F ) which simulates the delta function f ). The initial condition must satisfy Z Z (2.35) Q0 (F )dF = 1; F Q0 (F )dF = f; (F

so that the numerical solution is an arbitrage free solution. Any initial condition Q0 (F ) we pose will have a non-zero variance, Z 2 (2.36) Var = (F f ) Q0 (F )dF: 10

To adjust for this, note that multiplying (2.37) by (F

D2 (F )E(T; F )Q

1 2

QT =

for T > 0;

FF

2

f ) and integrating over all F yields Z

dv = dT

(2.38) As T ! 0, and thus Q(T ; F ) ! (F

D2 (F )E(T; F )Q(T ; F )dF:

f ), this implies that

v(T ) = D2 (f )E(0; f )T +

(2.39)

as T ! 0:

Thus, after posing the initial condition, we calculate the variance Var, and start the solution o¤ at (2.40)

T0 =

Var D2 (f )E(0; f )

:

By using (2.41)

Q = Q0 (F )

at T = T0 ;

we have an initial condition which has the correct zero-eth, …rst, and second moments. 2.6.1. Sub-gridscale modeling. To calculate the variance of the initial condition, we need to calculate the variance within a grid cell. Recall that we are modeling (2.42a)

Q(T; F ) =

h Fj

j

1 + 3b

Fj

2F

1

Fj Fj

Fj

1

Fj

1

Fj

1

for Fj

1

< F < Fj ;

1

3b2j :

within cell j, with (2.42b)

bj =

2Fj

1 2

Fj

Fj

Fj

:

1

Then

(2.43a) Z

(2.43b)

Z

Fj

Q (T; F ) dF = h j (T );

Fj

1

Fj

Fj

F Q (T; F ) dF = Fj

1 2

h j (T );

1

hold exactly. Here we note that variance vj within cell j is

vj

R Fj Fj

2 1

F Fj 12 Q (T; F ) dF = R Fj Q (T; F ) dF Fj 1 11

1 12

(Fj

Fj

2 1)

2.6.2. Two cell initial condition. Suppose that Fk

3

< f < Fk

1 2

Then we create the initial condition with probability a in cell k

1 and probability 1

(2.44a)

a;

h

= a;

k 1

h

=1

k

a in cell k;

and probability zero in all the other cells in the grid. We must choose (2.44b)

a=

Fk Fk

f

1 2

;

Fk

3 2

+h

k

1 2

1

a=

f

Fk

Fk

1 2

= aFk

3 2

3 2

Fk

; 3 2

so that (2.45a) Z

(2.45b)

Z

Q0 (F )dF = h

k 1

F Q0 (F )dF = Fk

3 2

h

= 1;

+ Fk

k 1

1 2

h

k

+ (1

a) Fk

1 2

= f;

The variance is (2.46)

Var =

Z

Fk

Fk

1

F 2 Q0 (F )dF +

Fk

Fk

2

= afFk2

Z

3 2

+ vk

1g

F 2 Q0 (F )dF 1

a)fFk2

+ (1

2 1 2

+ vk g

aFk

3 2

+ (1

a)Fk

1 2

This works out to 2

(2.47a)

Var = a(1

a) Fk

1 2

Fk

3 2

+ avk

1

+ (1

a) vk

where, for future reference, we note that (2.47b)

vj

1 12

(Fj

Fj

2 1)

1

3b2j ;

with (2.47c)

bj =

2Fj

Fj

1 2

Fj

Fj

1

Fj

:

1

2.6.3. Three cell initial condition. As the forward f moves across the cell, the initial condition’s 2 variance (Var) changes substantially. When a is 0 or 1, the variance is vk or vk 1 , about ( F ) =12: When 2 a is 12 , the variance picks up an extra 14 (Fk 21 Fk 32 )2 , and is around ( F ) =3, about four times higher. Since the T0 correction isn’t perfect, this can cause the solution to exhibit slightly non-smooth behaviour (“ripples”) as the forward f changes, which can lead to some …ctitious gamma behavior. To prevent this, we propose using three cells for our initial condition. Besides requiring Z (2.48a) Q0 (F )dF = 1; Z (2.48b) F Q0 (F )dF = f; 12

here we use the extra freedom of the third cell to make Z 2 (2.48c) Var = (F f ) Q0 (F )dF: as constant as possible as f varies. Suppose that the forward f falls in cell k in the sense that 1 2 (Fk

(2.49)

+ Fk

3 2

1 2

)

1 2 (Fk

f

Our initial condition consists of probability a in cell k

1, 1

(2.50)

a

h

k 1

= a;

h

k

=1

1 2

+ Fk+ 21 );

a

b in cell k, and b in cell k + 1

b;

h

= b:

k+1

where we have to pick a and b to satisfy the above conditions. De…ne (2.51a)

x=

2f

Fk

Fk

1 2

Fk+ 12

Fk

Fk

)x + Fk

3 2

;

3 2

so (2.51b)

f=

1 2

n (Fk+ 12

3 2

1 2

+ Fk

o

3 2

Requiring the initial condition to have the correct mean implies that (2.52)

aFk

+ (1

3 2

a

b) Fk

+ bFk+ 21 = f;

1 2

which gives us b in terms of a: (2.53)

1 2

b=

(Fk+ 12

Fk

3 2

)x + (Fk Fk+ 21

1 2

Fk

+ Fk

3 2

) (2a

1)

3 2

The variance is Var = afFk2

(2.54)

3 2

aFk

+ vk 3 2

1g

+ (1

+ (1

b)fFk2

a

1 2

2 + vk g + bfFk+ 1 + vk+1 g 2

2

a

b)Fk

1 2

+ bFk+ 21

;

which becomes (2.55)

Var = a(Fk +avk

1 2

1

Fk + (1

3 2

)2 + b(Fk+ 12

a

Fk

2

)2

a[Fk

1 2

1 2

Fk

3 2

Var = 41 (Fk+ 12

Fk

1 2

1 2

Fk

3 2

]

b[Fk+ 21

b)vk + bvk+1

We note that at x = 0, surely b = 0, so (2.56a)

a = 12 ;

b = 0;

Var = 14 (Fk

)2 +

1 2

(vk

)2 +

1 2

(vk + vk+1 ) :

1

+ vk ) :

Similarly, at x = 1; surely a = 0, so (2.56b)

a = 0;

b = 21 ;

13

Fk

1 2

]

Based on this, we choose (2.57a)

a=

1 2

2

(1

b = 21 x2 +

(2.57b)

1 4

x)

1 4

Fk+ 21

2Fk

Fk

Fk+ 12

1 2

Fk

1 2

2Fk

1 2

3 2

x (1

x) ;

3 2

+ Fk

Fk

Fk+ 12

+ Fk

3 2

x (1

x) :

1 2

Direct calculation shows that this satis…es 2.53, so the initial condition has the correct mean. In addition, the variance now works out to be (2.58a)

2

Var = 14 x Fk+ 21

Fk

+

1 2

1 4

2

(1

x) Fk

+vk + b (vk+1

1 2

vk )

Fk

3 2

a (vk

vk

1)

This variance is reasonably constant in x, being exactly constant when the grid points are equally spaced. For future reference, we note that (2.58b)

1 12

vj

(Fj

Fj

2 1)

3b2j ;

1

with (2.58c)

bj =

2Fj

Fj

1 2

Fj

Fj

1

Fj

;

1

and that T0 for our initial condition is (2.58d)

T0 =

Var : D2 (f )E(0; f )

3. Integration in time. Discretizaton of the PDE in space leads to the coupled system of J +2 ODEs, ! 1 Sj+1 Sj @ j Sj Sj 1 = (3.1a) for j = 1; 2; :::; J @T 2h Fj+ 21 Fj 21 Fj 21 Fj 32 (3.1b)

(3.1c)

PTL = PTR =

S1 2 F 21

F0 SJ

2 FJ

FJ

1 2

where (3.1d)

Sj

C(zj

1 2

)E(T; zj

1 2

) j (T ) = D(Fj

1 2

)E(T; Fj

and where the boundary conditions are (3.1e)

S0 =

S1 ;

SJ+1 =

SJ :

The two- or three-cell initial conditions are given in the preceding section 14

1 2

) j (T ):

Let us write this system of ODEs abstractly as X @ j = Mjk @T

(3.2a)

k

k

A time step of size dt can generally be either explicit, sem-implicit, or fully implicit: X t+dt (3.2b) = tj + dt Mjk tk explicit j (3.2c)

t+dt j

1 2 dt

X

k

Mjk kt+dt

=

t j

X

1 2 dt

+

k

(3.2d)

t+dt j

dt

X

Mjk

t k

semi-implicit

k

Mjk

t+dt k

=

t j

fully implicit

k

The explicit scheme and fully implicit schemes are only …rst order accurate in dt; the semi-implicit method (Crank-Nicolson) is second order accurate in dt. To examine the stability of these schemes, suppose we consider a perturbation t k

(3.3a)

!

t k

t ikz

+

e

:

added to the solution at timestep t. For high wavenumbers k, this perturbation grows by (3.3b)

t+dt

(3.3c)

t+dt

(3.3d)

t+dt

!

2E

dt sin2 kh=2 h2

1

Edt sin2 kh=2 h2 Edt sin2 kh=2 + h2 h2 t ! 2 2Edt sin kh=2 + h2 !

t

explicit

t

semi-implicit fully implicit

per time step dt. For the highest wavenumber perturbations, where kh = . For these the growth rates are

(3.4a)

t+dt

(3.4b)

t+dt

(3.4c)

t+dt

dt 1 h2 Edt h2 ! Edt + h2 h2 t ! 2Edt + h2 !

2E

t

explicit

t

semi-implicit fully implicit

3.1. Crank-Nicholson. The explicit scheme is unstable whenever the timestep dt > h2 =2E: re…ning the space step by a factor of two means the timestep dt needs to be cut by a factor of four to stay within the stability limit. We reject this scheme, especially as it is only …rst order accurate. The fully implicit scheme is also inappropriate, at least as stated, because it too is only …rst order accurate in time. This leaves the semi-implicit method, which is also called Crank-Nicholson. This scheme is absolutely stable in the sense that (3.5)

t+dt

= 15

t

0;

FF

as T ! 0:

with (A.1c)

p

D(F ) =

2

+2

2 y 2 (F ) (F

y(F ) +

(F )(T

E(T; F ) = e

+ a) ;

t)

where (A.1d)

y(F ) =

Z

F

f

(A.1e)

(F ) =

dF 0

=

(F + a)

(F + a) F

(F + a)

1

1

(f + a)

;

1

(f + a) : f

Therefore, z(F ) = Z(y(F )), where

(A.2a)

Z(y) =

(A.2b)

=

1

log 1

q

log

2

1

q

2

+ ( + y= ) + + y= 1+ 2

1

2

+ ( + y= )

y=

1

The inverse functions are (A.3a)

Y (z) =

fsinh z + (cosh z

(A.3b)

F (y) = [f + a]

1

1)g ; 1=(1

+ (1

)

)y

a:

A.1. Grid construction. The arbitrage free SABR model has a barrier at F = barrier occurs at a …nite y and thus …nite z: q 2 2+( + y 1 ybar = bar = ) 1 (A.4a) zbar = log 1 (A.4b)

ybar =

[f + a]

1

= (1

a. When

< 1, this

):

Whenever possible, we select the grid to extend n+ sd and nsd standard deviations above and below the forward, so the grid boundaries are (A.5a)

zj = z + jh

for j = 0; 1; : : : ; J + 1;

where (A.5b)

n o p z = max zbar ; nsd Texp ; 17

z + = n+ sd

p

Texp :

Here n+ sd and nsd are the user-speci…ed. Once the grid as been de…ned, we can create the array of grid points yj = Y (zj );

Fj = F (yj )

for j = 0; 1; :::; J;

and midpoints, (A.6a) where zj

yj 1 2

= z + (j

1 2

= y(zj

1 2

);

Fj

= F (yj

1 2

1 2

)

for j = 1; : : : ; J

1 2 )h.

A.2. Discretization. With the grid created, (A.7a)

Sj

Cj

1 2

Ej

j (T );

1 2

where (A.7b)

Cj

1 2

= D(Fj

1 2

(A.7c)

(A.7d)

)= Ej

j

=

1 2

q 1 2

2

+2

yj

Fj

1 2

1 2

j

=e +a

(T

2 y2 j

+

1 2

t)

Fj

1 2

1 2

+a

for j = 1; : : : ; J

for j = 1; : : : ; J;

(f + a)

Fj

for j = 1; : : : ; J:

f

1 2

We also need Cj 12 ; Ej 12 ; and Fj 21 at j = 0 and j = J + 1 to handle the boundary conditions. For this we can re-de…ne the problem as being symmetric across the boundaries. Thus (A.8a) (A.8b)

C

1 2

= C 12 ;

CJ+ 21 = CJ

1 2

E

;

1 2

= E 12 ;

EJ+ 21 = EJ

F ;

1 2

= 2F0

1 2

F 12 ;

FJ+ 21 = 2FJ

FJ

1 2

:

Consequently, (A.9a)

hC~0 = 2 F 21

F0 = F 21

(A.9b)

hC~J = 2 FJ

FJ

so C~0 and C~J can be treated like the other C~j : The discretized PDE is now ( Cj+ 12 Ej+ 21 1 (A.10a) j;T = j+1 2h Fj+ 12 Fj 12

F

1 2

;

= FJ+ 12

1 2

Cj

1 2

Ej

Fj+ 21 +

1 2

3 2

3 2

Fj

1 2

Fj

1 2

Ej

1 2

Cj

+

Fj

Cj Fj

FJ

j 1 3 2

1 2

Ej Fj

1 2

)

for j = 1; 2; :::; J, with the boundary conditions C 12

(A.10b) (A.10c)

F 21 CJ FJ+ 21

F

1 2

FJ

1 2

EJ

1 2

E 12 1 2

0

J+1

= = 18

C 12 F 12

F CJ

FJ+ 12

1 2

E 12

1 2

FJ

1 2

1;

EJ

1 2

J:

1 2 3 2

!

j

Finally, the probability in the boundaries accumulates according to C 12

PTL =

(A.10d)

F 12

E 12

1 2

CJ

PTR =

(A.10e)

F

FJ+ 12

1 (T );

1 2

FJ

1 2

EJ

1 2

J (T ):

We coding purposes, we can summarize the numerical discretization as (A.11a) (A.11b) (A.11c) (A.11d) (A.11e)

j;T

C0 (T ) AJ+1 (T )

0

J+1 PTL PTR

= Cj (T )

+ Bj (T )

j+1

=

C0 (T ) 1 ;

=

AJ+1 (T )

j

+ Aj (T )

for j = 1; 2; :::; J;

j 1

J;

= 2hC0 1 (T ); = 2hAJ+1

J (T );

with (A.12a) (A.12b)

Cj = Bj =

Cj+ 21 Ej+ 12 Fj

2h(Fj+ 12 Cj

1 2

2h(Fj+ 21

Ej

1 2

)

;

Aj =

1 2

Fj

1 2

)

for j = 1; 2; :::; J.

19

Cj

3 2

2h(Fj

1 2

Cj

1 2

2h(Fj

1 2

Ej

Ej

Fj

1 2

Fj

3 2

3 2

)

3 2

)

;