37
Integrated cross asset front to back trading solutions www.sungard.com/frontarena FRONT ARENA Jonas Persson, PhD ”A Finite Difference PDE solver in practise” 22 August 2007

Integrated cross asset front to back trading solutions FRONT ARENA Jonas Persson, PhD ”A Finite Difference PDE solver in practise”

Embed Size (px)

Citation preview

Integrated cross asset front to back trading solutions

www.sungard.com/frontarena

FRONT ARENA

Jonas Persson, PhD

”A Finite Difference PDE solver in practise”

22 August 2007

Agenda

The FRONT ARENA Finite Difference PDE solver

Introduction The framework American options – an example Local volatility implementation Barrier options – challenging problems Performance/Accuracy Summary

Introduction

When analytical formulas are not enough

... numerical methods are necessary!

Example of such cases are

Dividends Local volatility Complex derivatives

Producing smooth Greeks with a numericalmethod is sometimes problematic.

The framework

Background and assumptions

Flat (or time-dependent) volatility framework (B&S ’73)

Local volatility for exotic options (Dupire ’93)

Absolute/Proportional dividend types supported

Term structure of interest rates

Handling dividends

Dividends must be handled as discrete,

approximating as dividend yield is not enough.

Example: U&O/D&O window barrier, Div at Td.

Another dividend example

A practical problem

The user wants to treat an Absolute dividend as

proportional (denoted AbsAsProp).

Reasons:

1. No non-volatile part in the stock price. (implied volatility for different maturities comparable)

2. Flatter implied vol surface from the market. (empirical)

We are handling this in the PDE solver.

The numerical framework

The B&S PDE is solved numerically using a

Finite Difference method with

Crank-Nicolson (normally)

- Second order accurate

- Centered differences

Euler backward (in some cases)

- Near barriers

- Used to dampen oscillations

The numerical framework

Implicit time-stepping gives:

Tri-diagonal linear systems of equations for each time-step

Solved using ”Thomas algorithm” with only O(8n) arithmetic operations per step

Example: American Put

For the American Put option we use an

”Operator splitting technique”

Introduced by Ikonen & Toivanen to handle the early

exercise feature.

”S. Ikonen, J. Toivanen, Operator Splitting

Methods for Pricing American Options,

Applied Mathematical Letters 17, 2004”

This has been extended in a number of papers to

stochastic volatility e.t.c.

American Put example - high Gamma peak

American Put option

Interesting case:

Strike at 100, T = 1y r = g = 5%, Flat volatility 26% One Absolute dividend of size 4.5 at t = 0.9y

High gamma peak for American Put (Abs div)

Value, Delta and Gamma for American Put, Abs dividend

Also this particular case with a Gamma jump is handled.

Exercise region for the American Put

Schematic early exercise region:

Without dividend With dividend

Local volatility

Dupire (’93) local volatility given an implied vol surface

2

2 222

1 12

2 2( )( , )

1loc

t r D StT SS t

Sd t S t d tS S S

20

1

log 1 2S S r D td

t

0

Local volatility

Implied volatility

Time to expiry

Interest rate

Carry cost

Strike price

Underlying price at calculation date

loc

t

r

D

S

S

Local volatility transformations

Transforming the formula yields

where we use

2 2

0

( , )

1 ln 1 12 2 2 2

loc

w tww x t

F w w wt w tF w w

0

2

Local volatility squared

Forward price of underlying at time t

Spot price

ln

( )

Derivative with respect to time

' and '' Derivative with respect to x

locw

F

F

x F

w t

w

Local volatility continued

Global parametric volatility surface built of time-skews (2nd degree polynomials)

Volatility is a function of forward prices and time

Properties of the volatility surface

Smooth representation with skew and smile parametrized

Works well with the Dupiré formula due to variance interpolation (explained shortly)

Linear interpolation on the variance

2 21 1 0 0 0 12

1 0

( ) ( )( , )

F t t t F t t tF t t

t t

0 0

1 1

0 1

The interpolated volatility value

Volatility at start skew at time

Volatility at end skew at time

t

t

t t t

Linear interpolation of the variance between the skewsalong constant forward price.

01

0201

21

22

tt

ttt

t

wtwtt

22

Linear vs. linear on variance interpolation

Linear interpolation of Global Volatility

0

0.05

0.1

0.15

0.2

0.25

0 0.5 1 1.5 2

Local Vol

Global Vol

Linear interpolation between variance

0

0.05

0.1

0.15

0.2

0.25

0 0.5 1 1.5 2

Expiry

Local VolGlobal Vol

Linear interpolation between values gives a non-smooth

volatility

where we use

Linear interpolation between variances gives a piece-wise constant local volatility

Local volatility continued

Calculating the local volatility:

The time derivative need not be calculated due to the transformation

The strike derivatives are approximated using central finite differences on the skews

Summary:

The transformation of the PDE and local volatility formulas together with the variance interpolation increases the speed of the calculations!

The barrier challenge

Challenges with barrier option:

Smooth Greeks near barriers difficult (e.g. for tree models).

Dividends introduce problems

Solution: Non-symmetric FD approximation near the

boundary. + Special tricks

A non-symmetric approximation

Lets take a first derivative as an example:

With the coefficients given by

Note that if the step sizes are equal we retrieve the standard

central approximation. Second derivatives are approximated

in a similar way.

11

iiiiiis

vcvbvas

u

i

)(,,

)(

iii

ii

ii

iii

iii

ii

hhh

hc

hh

hhb

hhh

ha

A non-symmetric approximation

The approximation closest to the barrier is

non-symmetric.

Example: Barrier option

Example: Up&Out European Call

Strike: 25 Barrier: 45 Expiry: 5y Interest rate and carry-cost: 3% Local volatility surface

Dividend structure

Time of dividend Size of dividend Type

0.5 years 1.0 Absolute

1.5 years 1.0 AbsAsProp

2.5 years 1.0 AbsAsProp

3.5 years 1.0 AbsAsProp

4.5 years 5% Proportional

Note: 1. AbsAsProp dividends require several grids to get Greeks.2. Dividends handled as dicrete.

Option Value and Delta

Value of the option

for some underlying

prices

Delta

Zoom of Delta and Gamma

A closer look at Delta

near the barrier.

Gamma

The barrier option again: An extreme case

Up&Out call,

Barrier at 60, strike at 40.AbsAsProp dividend of 2 at t=1y, T=2y, r=g=3%,

volatility=3%

Euler or Crank-Nicolson?

Delta using Crank-Nicolson for all steps

Delta Zoom of Delta

Euler or Crank-Nicolson?

Delta using the Euler method for all steps

Delta Zoom of Delta

Euler or Crank-Nicolson?

The choice of numerical method depends on ...

Accuracy considerations Non-smooth Greeks ? Discontinuities ? Speed

In this particular case:Low volatility often causes numerical problemsbecause of less damping inherent in the PDE.

The methods must cover also extreme cases!

Performance/Accuracy

Getting the numbers right involves many things:

Mathematical modelling The choosen model setup (incl. B&S, Divs, Vol) Calculation/Estimation of relevant parameters

Numerical considerations, such as Technical aspects (num. method e.t.c) Barrier treatment American feature treatment Richardson extrapolation Smoothing

Performance/Accuracy

Fast calculations is really important!

Or as a customer put it:

”- If I get really accurate prices too late they are completely useless!”

Performance/Accuracy

Example: American Put, Absolute/AbsAsProp dividend

Calculation of Price, Delta and Gamma

Average call time

in milliseconds

Absolute dividend

AbsAsProp dividend

30 time-steps 0.9277 2.9347

Tricks for smooth Greeks

Some tricks used to get smooth Greeks

Non-symmetric approx. (barriers) Fixed grid Smoothing of initial data Cubical spline approximations ... or non-polynomial approximations E.t.c.

Changing the settings

Many numerical parameters in the PDE solver

can be manipulated through the GUI.

E.g.: Number of time-steps Ikonen algorithm for American Put - On/Off Richardson Extrapolation - On/Off Smoothing of pay-off - On/Off Calculate Greeks - On/Off E.t.c.

Adjusting the number of time-steps

The number of time-steps can be adjusted per e.g. contract type (custom).

Summary – challenges

What makes the ”real-life” complicated

1. Dividends

2. Discontinuities - Non-smooth Greeks

3. ”Special cases” (really low vola. e.t.c.)

4. Fast calculations necessary!

5. Other features: rebates, quanto, window ...

Please consider all these things in your work!

The end

From www.Sloganizer.net

«Finite Differences, it's a kind of magic.»

Thank you for listening!