## Robust FDM for Heston and SABR models (Roelof Sheppard)

### Robust FDM for Heston and SABR models (Roelof Sheppard)

///

1. Brief Description of the Dissertation

This thesis is devoted to finding robust and accurate finite difference schemes for an important problem in finance, namely the Heston and SABR models. The author produces a scheme which satisfies the above two requirements.

The dissertation consists of 9 chapters. They are logically organized in general.

Chapter 1 Introduction and Scope of Work

Chapter 2 Motivation for the PDEs for Heston and SABR models

Chapter 3 One-dimensional convection-diffusion equation and the convection equation. Stability and convergence of well-known FD schemes

Chapter 4 An analysis of some standard FD schemes and stability issues. This is an important chapter because of the use of extrapolation techniques and a sharper form of stability

Chapter 5 FDM for two-factor models, for example splitting methods and the Yanenko scheme for mixed derivatives

Chapter 6 A good analysis of FD schemes. This is based on the Lawson-Morris method.

Chapter 7 Non-uniform grids and non-smooth payoff functions. Nice to have but not the main theme of the thesis.

Chapter 8 A summary of the various PDEs and boundary conditions in the thesis.

Chapter 9 A short chapter on the results of numerical experiments. The author concludes (section 9.5) that fitting in combination with splitting and Yanenko methods is a robust scheme.

2. Analysis of Dissertation

This thesis uses some of the most robust methods for solving Heston PDEs. The author starts with one-factor models to motivate the work and then progresses to more advanced two-factor models which he analyses using techniques that he has found in the literature.
Attachments Roelof.pdf Cuchulainn

Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

### Well done.

Well done.
Elsabe

Posts: 1
Joined: Wed Aug 22, 2007 3:21 pm

here are some benchmark results (thanks to Roelof)

Am I correct to assume that the NACC rates are

r = 0.053868842 (domestic)

q = 0 (div yield)

I am not getting the same analytical solution, but here are my results:

uOut =

480.2860

exactSolution =

481.1052

Relative error: -0.17027%

Error ratio FD/Heston: 0.9983

Error ratio Heston/FD: 1.0017

Abs diffs: 0.8192 Cuchulainn

Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

Thanks to Andrey Itkin

Type the following data

T = 1

K = 1050

domestic rate = 1.055155

foreign rate = 1

S = 1268.21

init vol = 0.1732

longterm aver 0.8799

k = 3.2489

volvol = 0.1136

corr = -0.3372

(this is SPX data)

you will get

analytical solution - 481.2795631

fdm - 536.7160602790

My fdm method gives 484. So could Roelof try his code to get the result. Cuchulainn

Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

here is an online calculator for the Heston model

http://kluge.in-chemnitz.de/tools/price ... =50&n_t=30 Cuchulainn

Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

Have you guys figured out yet why you two are not

getting the same results? Different methods should

give similiar results.
Yoda

Posts: 4
Joined: Wed Aug 22, 2007 10:39 pm

Yoda,

It is a slightly different problem and in general FD schemes need to be customised. Hope this helps.

Second we use different coordinate transformations as well as different boundary conditions at high S. Third I gave kind of extreme parameters values in the test, so any method have to be sensitive to the above changes.

It's an art as well as a science; much experimenation and modifications for extreme parameters. The universal FD DOES NOT EXIST. Cuchulainn

Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

### Why the results are different

Hi all,

Fortunately, I have found some time to look at the problem more closely.

So let's consider a pure heston.

I changed a bit the boundary condition at S -> \infty. Before I used \partial^2 C / \partial S^2 = 0.

Now I use what Roelof uses as well: \partial C / \partial S = \exp{q T}. But I use the following trick. As we have

\partial C / \partial S = \exp{q T} (1)

this is equivalent to

\partial^2 C / \partial S^2 = 0 (2)

Then we introduce an extra (artificial) node N+1 and write a FD approximation of (2) of the second order

(C_{N+1} - 2 C_N + C_{N-1})/h^2 = 0 (3)

From (3)

C_{N+1} = 2 C_N - C_{N-1} (4)

Now approximate (1) with the second order

(C_{N+1} - C_{N-1})/(2h) = \exp{q T}

and substitute C_{N+1} from (4). It gives

(C_{N+1} - C_{N-1})/h = \exp{q T} (5)

So I used this boundary condition together with my previous method described in our paper with Peter Carr that you have. Results:

analytical solution (Heston) - 481.2795631

My solution - 481.3222383

Roelof - 480.2860

The method includes:

1. A coordinate transformation (different from what Roelof uses)

2. Euler + BDF2 scheme

3. Modification to get European vanilla option prices for all strikes at once.

Hope this helps.
aitkin

Posts: 2
Joined: Wed Aug 22, 2007 2:56 pm

### Heston Price

Hi,

I have calculated the analytical price for the example using the methods described in the forthcoming book on Monte Carlo Methods using C++ where Daniel and myself use analytical formulas to compare to our MC results.

The option price is 481,2819654

(using the representation of Lord et. al together with the methods from Kahl / Jaeckel paper (letting all the integration take place on interval [0,1] to use adaptive Gauss Lobatto which is state of the art for such problems!)

I do not know what is going on by applying FD methods.

Cheers, Lapsilago
Lapsilago

Posts: 5
Joined: Wed Jan 31, 2007 5:30 pm
Location: Germany, Bonn

Lapsilago, what is the point? I can drop the temporal and spatial steps and get closer approximation to the exact solution using FD as well. To me it makes sense to compare accuracy versus performance.
aitkin

Posts: 2
Joined: Wed Aug 22, 2007 2:56 pm

Hi

I am doing an MC on Heston using C++ classes etc. I have a few questions on the notation you are usieng; see ???? in the source code. Are my values the same as yours?

thanks

Daniel
Attachments TestHestonSDE.cpp HestonSDE.hpp Cuchulainn

Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

The SDE in my notation is:

//

// dX = (r - q)Xdt + sqrt(V) * X * dW1

// dV = kappa(theta - V)dt + epsilon * dW2

//

// dW1.dW2 = rho * dt

//

/* Type the following data

T = 1

K = 1050

domestic rate = 1.055155

foreign rate = 1

S = 1268.21

init vol = 0.1732

longterm aver 0.8799

k = 3.2489

volvol = 0.1136

corr = -0.3372

(this is SPX data) */

T = 1.0;

K = 1050.0;

r = 1.055155;// ?? low interest??

q = 1.0; // ??

kappa = 3.2489;

theta = 0.8799;

epsilon = 0.1136; // ??

rho = - 0.3372;

IC_X = 1268.1;

IC_V = 0.1732 * 0.1732; // ??????? Cuchulainn

Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

One thing I notice with examples is that there are a number of ways to define the input parameters: this is caused by choosing between the volatility or the variance.

The main differences are caused by:

. theta (long term)

do we use theta or sqrt(theta)

. initial vol

is this vol V or sqrt(V)? Cuchulainn

Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

Compare different schemes with completely different grid size and grid shape on only one spot point does not make sense:

As a matter of fact the case studied here is very bad for the grid generation as it was done by Kluge, which explain why its solution is

so bad in this case (in a full range of parameter it give very good results).

In order to compare different schemes it would be good to use similar grid and to compare computation time on the same computer .

I have done an implementation of the yanenko scheme for Heston very similar and based on to the sheppard work. It uses some grid generation like in Kluge's work, and only uses a second order time interpolation (most order can not easilly handle barriers) and linearity boundary condition at upper spot boundary.

The point is even without the grid generation I got better results than the one reported by Cuchulainn:

using second order interpolation with 200 points in spot, 100 points in

volatility and 100 points in time I got 481.2134. Second order is important here. Without interpolation (e.g. Yanenko schemes) I got 478.944. The third order does not bring very much accuracy here (481.234 which anyway it does not worth the cost).

The CPU time is around 1 second on my PC ( 3Ghz and 2Go RAM) at work and 8 seconds at home (interfaced with very slow EXCEL).

Mars.
mars

Posts: 1
Joined: Tue Dec 04, 2007 2:40 pm
Location: France

Thanks for the feedback.

. This was a benchmark example that 4-5 people worked on (using different FDM schemes). Other examples were tried, of course. Actually, the example was from Kluge's home page

. My own calculation was using the MC method (NOT FDM), so we should leave it out for moment; first, I used rand() which is really BAD and the QE schems is much better.

. How did you examine mixed derivatives?

. (the Kluge notation is very confusing, e.g. taking exponentials and sqrt of input parameters) Cuchulainn

Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

Next 