sergei levendorski i december 09, 2015 - cass.city.ac.uk · pdf filerelative errors of simpson...

86
Quasi-parabolic deformations in applications to Fourier and Laplace inversion, evaluation of special functions, option pricing and risk management Sergei Levendorski ˘ i December 09, 2015 Sergei Levendorski ˘ i Quasi-parabolic deformations 12/09/15 1 / 85

Upload: vodat

Post on 08-Mar-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

Quasi-parabolic deformations in applications to Fourierand Laplace inversion, evaluation of special functions,

option pricing and risk management

Sergei Levendorskii

December 09, 2015

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 1 / 85

1 Typical problems and difficulties

2 Fourier/Laplace transform method

3 FT: complex-analytical viewpoint. Parabolic iFT

4 Monte Carlo simulations

5 Heston model: general formulas and examples

6 Parabolic iLT and calculation of PDF of a subordinator

7 Conformal quasi-asymptotics and special functions

8 The Heston model in counterparty risk modelling(work in progress with Marco de Innocentis)

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 1 / 85

Rough description of typical problems

1 Calculation of expectations of stochastic expressions (derivative prices,sensitivities or (c)pdf; cpdf’s can be used for efficient Monte-Carlosimulations)

2 Inverse problems: given a moderate number of observed prices of vanillas(=solutions of a Cauchy problem) calibrate the model=find a model and/or“a good set” of parameters of the chosen model

3 Using the calibrated model, calculate prices of OTC products (e.g., barrieroptions=solutions to boundary problems with boundaries in time and space)and sensitivities=derivatives w.r.t. observed prices and parameters of themodel.

4 In the case of CDS, calibration to prices of derivatives with barrier features.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 2 / 85

Potential difficulties and traps

1 A moderately accurate fitting may require calculation of prices for 10k-100kparameter sets, hence, speed is crucial

2 Inaccurate pricing may lead to seriously incorrect calibration

3 In particular, models with heavy tails will be automatically excluded

4 I would call it the sundial calibration: a sundial will never tell you that it ismidnight.

5 On the other hand, computational errors in the calibration procedure mayhelp to find a local minimum of the calibration error which is not a localminimum (ghost calibration)

6 Monte-Carlo simulations using cpdf: if calculations based on inverse Fouriertransform are insufficiently accurate, the algorithm may go into an infiniteloop

7 Computational difficulties can be especially serious in the case of pricingcontingent claims of long and short maturities.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 3 / 85

Citigroup, March 17, 2008: the results of fitting aspectrally negative KoBoL to survival probabilities usingthe flat iLT method of Madan-Schoutens (2007)

Maturity (years) 1 3 5 7 10Market surv. prob. 0.8831 0.7032 0.4955 0.3611 0.2509

Flat surv. prob. 0.8831 0.7036 0.4936 0.3638 0.2497Actual surv. prob. 0.9952 0.9620 0.9131 0.8630 0.7949

KoBoL parameters: ν = 0.983895482081, λ = 3.95570758166,c = 0.21382930631, µ = 12.8655868978.

Default event: the first time the KoBoL process with these parameters dropsbelow the barrier ln(0.4).

Second row: survival probabilities extracted from the market data

Third row: survival probabilities computed for the given KoBoL parameters usingthe method of Madan-Schoutens (2007)

Last row: survival probabilities for these parameters computed using the accurate

method M.Boyarchenko and Levendorskii, Quantitative Finance (2014).

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 4 / 85

Ghost calibration: a stylized example

One can find a minimum of the sum essentially always if a numericalscheme with prefixed parameters is used.

If the error oscillates (the standard Fourier transform artifact), thenone will see numerous close local minima.

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

Stylized ghost calibration: zmin

=0.297

exact cal.err.error of methodtotal error

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 5 / 85

Errors of adaptive procedures with prefixed parameters

Call option of maturity T = 1/52, on the riskless discount bond in the A2(2)model, of face value 100 matured at T1 = 2.Riskless rate rt = 0.5Y1t + Y2t ; y0 = [0.03 0.01]′.SDE:

dYj,t = (κ(θ − Yt))jdt +√

a1jY1t + a2jY2tdWj,t , j = 1, 2,

where

θ =

[0.02

0.015

], κ =

[0.02 −0.03−0.001 0.03

], a =

[0.06 0

0.006 0.02

]

In the picture on the next slide, it is seen that the errors of the Lewis-Liptonformula with the choice of ζ and N better (ζ is smaller, ζN is larger) than inthe popular Carr-Madan method (CM method) explode as z ′ → 0.

z ′: from the oscillating factor e iz′ξ in the Fourier image of option price.

The effect is especially strong if the integrand decays slowly, which is thecase for An(n) models (n factors, θ ∈ Rn

++, κ is the stable n × n matrix,matrix a satisfies certain conditions).

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 6 / 85

Relative errors of Simpson (solid) and trapezoid (dots-dashes) rule. The

logarithmic scale, results of the Lewis-Lipton formula with mesh ζ = 0.125 and

number of terms N = 8192 and 16384.Left plot: the relative errors of N = 8192-prices vs N = 16384-prices.Right plot: the relative errors of N = 16384-prices.On the left, the Simpson rule seems to be much better than the trapezoid rule, and both seem to work well.

On the right, it is clearly seen that the trapezoid rule is better, and both rules become very inaccurate as z′ approaches 0.

0.02 0.04 0.06 0.08 0.1

−12

−10

−8

−6

−4

−2

0

2

4

z′

log(

|ε|)

0.02 0.04 0.06 0.08 0.1

−12

−10

−8

−6

−4

−2

0

2

4

z′

log(

|ε|)

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 7 / 85

Fourier/Laplace transform method

In no-arbitrage pricing, option values are expectations; default probabilities,probabilities of ruin and many other probability distributions are alsoexpectations.

If the characteristic function of the underlying random variable can becalculated efficiently, the fastest way to compute these expectations is toapply the Fourier and Laplace transforms.

For many popular models in finance, the FT-LT technique leads to integralsof complicated structure; many special functions can be expressed as similarbut somewhat simpler integrals.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 8 / 85

Numerical realizations

The numerical evaluation of all these integrals is nontrivial.

Splines (see, e.g, Haislip and Kaishev (2014,2015)), Gauss andGlenshaw-Curtis quadratures can be used to construct very fast albeit ratherinvolved procedures but I know of no simple error control.

Typically, one uses adaptive quadratures, which can be too slow orinaccurate. Examples will be given.

The methodology that will be explained in the talk can be made veryaccurate at a small CPU time cost.

In complicated situations, simple Matlab implementations of the resultingalgorithms are competitive with (presumably polished) Mathematica’simplementations, more accurate than SciPy, and hundreds of times fasterthan Matlab implementations.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 9 / 85

Fourier/Laplace transform method: put and call options

Underlying St = e〈a,Xt〉 (exchange rate, index or non-dividend paying stock);maturity T , strike K , the spots are X0 = x ,S0 = e〈a,x〉.If the riskless rate rt was non-trivial, we assume that the change of measure hasbeen already made to reduce to the case rt ≡ 0.

Theorem 1

Assume that the exist λ−(T ) < −1 < 0 < λ+(T ) such that

Ex [eβ〈a,XT 〉] <∞, ∀ β ∈ [−λ+(T ),−λ−(T )]. (1)

Then (a) the characteristic function admits analytic continuation to the stripIm ξ ∈ [λ−(T ), λ+(T )], which is uniformly bounded on the strip, and(b) the price of the call and put option is given by

V (x ,T ) =1

∫Im ξ=ω

Ex [e iξ〈a,XT 〉]G (ξ)dξ, (2)

where G (ξ) = −Ke−iξ ln K

ξ(ξ+i) , and ω ∈ (λ−(T ),−1) in the case of call,

ω ∈ (0, λ+(T )) in the case of put is arbitrary.Sergei Levendorskii Quasi-parabolic deformations 12/09/15 10 / 85

Proof

Decompose G into the Fourier integral

G (S) =1

∫Im ξ=ω

e iξ ln S G (ξ)dξ,

write the price as an expectation

V (x ,T ) = Ex [G (ST )] = Ex

[1

∫Im ξ=ω

e iξ ln ST G (ξ)dξ

]= Ex

[1

∫Im ξ=ω

e iξ〈a,XT 〉G (ξ)dξ

]and apply Fubini’s theorem

=1

∫Im ξ=ω

Ex [e iξ〈a,XT 〉]G (ξ)dξ

Remarks. a. For Levy processes, the scheme was used by S.Boyarchenko andLevendorskii (1998). Carr and Madan (1999) suggested a mathematicallyequivalent form, the Fourier transform w.r.t. the log-strike.b. The expectations are under the risk-neutral measure chosen for pricing.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 11 / 85

Complex-analytical advantages I.

1 ω ∈ (λ−(T ),−1) in the case of call, ω ∈ (0, λ+(T )) in the case of put isarbitrary on the strength of the Cauchy integral theorem

2 One can use the Cauchy theorem and move the line of integration into anyof the strips Im ξ ∈ (λ−(T ),−1), Im ξ ∈ (−1, 0), Im ξ ∈ (0, λ+(T )). Oncrossing one or two poles at ξ = −i and ξ = 0, the residues must be takeninto account.

3 If both are crossed, the put-call parity results.

4 Formula (2) with ω ∈ (−1, 0) and no residue terms gives the price of thecovered call; the choice ω = −0.5 is the Lewis-Lipton formula.

5 The choice of a correct ω is crucial for numerical implementations.

6 If the characteristic function admits analytic continuation to a wider regionof the complex plane C, then more involved contours of integration can beused (the main idea of our approach)

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 12 / 85

Classes of examples, where the characteristic function canbe calculated explicitly

(1) Levy processes: Ex [e i〈ξ,Xt〉] = e i〈x,ξ〉−tψ(ξ)

(2) Heston model and more general stochastic volatility models (SV models)

(3) affine and quadratic terms structure models

(4) 3/2 model

(5) Wishart dynamics

(6) subordinated versions (models with random time)

In (1), ψ is the characteristic exponent, which, for many processes, can becalculated explicitly using the Levy-Khintchine formula.

In (2)-(5), the characteristic function can be calculated using the appropriate

solution of the generalized Riccati equations. A universal justification is unknown;

some serious difficulties for numerical solution are, typically, ignored in the

literature. For (6), a general formula is available.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 13 / 85

Levy models: basic examples

1 Brownian motion (BM) with drift; ψ(ξ) = σ2

2 ξ2 − iµξ;

2 Double-exponential jump-diffusion model (DEJD)

ψ(ξ) =σ2

2ξ2 − iµξ +

c+iξ

λ+ + iξ+

c−iξ

−λ− − iξ,

where c± > 0, λ− < 0 < λ+;

3 A subclass of the extended Koponen’s family (1999)

ψ(ξ) = c+[λν+

+ − (λ+ + iξ)ν+ ] + c−[(−λ−)ν− − (−λ− − iξ)ν− ],

where ν± ∈ (0, 2), ν± 6= 1, λ− < 0 < λ+, c± > 0; if c+ = c−, and ν− = ν+,we obtain a subclass of KoBoL (2002) (a.k.a. CGMY model (2002))

4 Normal Inverse Gaussian (NIG) model

ψ(ξ) = δ[(α2 − (β + iξ)2)1/2 − (α2 − β2)1/2],

where δ > 0, 0 ≤ |β| < α

5 Variance Gamma (VG) model

ψ(ξ) = c+[ln(λ+ + iξ)− lnλ+] + c−[ln(−λ− − iξ)− ln(−λ−)]

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 14 / 85

Fourier transform from the complex-analytical viewpoint

“. . . between two truths of the real domain, the easiest and shortestpath quite often passes through the complex domain.” (PaulPainleve)

The image of a function G defined on R (Fourier transform) or on R++ (Laplacetransform) is a function defined on a region U of the complex plane C or even onan appropriate Riemann surface

The inverse Fourier/Laplace transform is given by the integral over anysufficiently regular contour L ∈ U such that the integrand decays sufficiently fastat infinity not only along L but along all contours in the process of deformationof the line Im ξ = ω into L.

If a pole is crossed, the additional term (residue) appears.

In many important cases, analytic continuation to an appropriate Riemann surface

is possible, and it is advantageous to deform the contour of integration into this

surface.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 15 / 85

Complex-analytical advantages II. Discretization error ofthe infinite trapezoid rule

Denote by f (ξ) the integrand in the pricing formula, and letD(µ−, µ+) := {ξ | Im ξ ∈ (µ−, µ+)} be the strip of analyticity of f .For call options [µ−, µ+] ⊂ (λ−,−1), for puts [µ−, µ+] ⊂ (0, λ+)

Let H1(D(µ−, µ+)) denote the Hardy space of functions analytic in the strip(µ−, µ+) such that ∫ µ+

µ−

|f (η + iω)|dω → 0 as η → ±∞,

and the Hardy norm is finite:

||f ||D(µ−,µ+) := limω↑µ+

∫R|f (η + iω)|dη + lim

ω↓µ−

∫R|f (η + iω)|dη <∞.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 16 / 85

Discretization error, cont-d

Choose a uniformly spaced grid ξj = iω + ζj , j ∈ Z, denote by Edisc(ζ,∞) theerror of the approximation∫

Im ξ=ω

f (ξ)dξ ≈ ζ∑j∈Z

f (ξj),

and, for ω ∈ (µ−, µ+), set d(ω) = min{ω − µ−, µ+ − ω}.

Theorem 2

(Theorem 3.2.1 in Stenger (1993))

|Edisc(ζ,∞)| ≤ e−2πd(ω)/ζ

1− e−2πd(ω)/ζ

||f ||D(µ−,µ+)

Corollary 3

Let the error tolerance ε > 0 for the discretization error be small so thatεf := 2πε/||f ||D(µ−,µ+) < 1. If ζ ≤ 2πd(ω)/ ln((1 + εf )/εf ), then Edisc(ζ,∞) < ε.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 17 / 85

Why it is very important to choose correct parameters ofthe numerical scheme

ω is inadmissible (line of integration is outside the strip of analyticity) — theprogram produces an incorrect price

ω is too close to λ− or λ+ (line of integration is too close to the boundaryof the strip of analyticity) — the program produces an incorrect price or toomany terms are needed (CPU time is unnecessary large)

standard industry practice is to use prefixed ω, ζ,N. As a result, in theprocess of fitting, many models will be rejected because prices will becalculated incorrectly

important quantities calculated using the incorrectly calibrated model will befar from the correct ones

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 18 / 85

How to choose parameters of the infinite trapezoid rule

find the widest strip of analyticity; the worst case scenario is the stripIm ξ ∈ (−1, 0)

unless the strip is too wide, choose the line of integration Im ξ = ωapproximately in the middle of the strip; the choice ω = −0.5 is theLewis-Lipton formula, the choice ω = −1.75 is equivalent in to the choice of“dampening parameter” α = 0.75 in the CM method, as used by Albrecheret al. (2006) (“Heston Trap” paper) in a special case, and by othersindiscriminately since then.

choose a somewhat narrower closed substrip, and derive an approximateupper bound for the Hardy norm

since the norm is an integral one, simple approximate bounds are relativelyeasy to derive in many cases; in very complicated situations, one can use asimple quadrature to get a sufficiently accurate bound

use the theoretical bound for the error with the approximate bound for theHardy norm in place of the exact norm

since the error decays exponentially as a function of 1/ζ, it is easy to find ζto satisfy even very small error toleranceSergei Levendorskii Quasi-parabolic deformations 12/09/15 19 / 85

(Quasi-)parabolic iFT: Main idea

However, in many cases, especially for options of long and shortmaturities, very large N may be necessary. An accurate adaptiveprocedure can choose N sufficiently well but the N and CPUtime are too large in many cases. What to do?

1 deform the contour Im ξ = ω using a conformal map such that after theconformal parametrization of the contour the integrand decays much fasterthan in the initial formula

2 since the bound for the discretization error is via an integral and not in termsof derivatives, one may expect much better improvement than with similarchanges of variables in integrals of real-valued functions, over the real line

3 the exponent exp[ixξ− τ(r +ψ(ξ))], where x = ln(S/K ), should decay alongthe new contour - need to take the sign of x ′ = ln(S/K ) + µτ into account.

Here µ is the “drift” in the formula

ψ(ξ) =σ2

2ξ2 − iµξ + ψ0(ξ),

where ψ0(ξ) comes from the jump part.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 20 / 85

Parabolic iFT, OTM (out of the money) puts: x ′ > 0

For α ∈ [1, 2], consider the conformal map χ+α defined on the half-plane

Im η < λ+ by

χ+α(η) = iλ+ − i

(λ+ + iη)α

λα−1+

:= iλ+ − iλ1−α+ exp[α ln(λ+ + iη)]. (3)

If α ∈ (1, 2), the image is the following obtuse angle

{iλ+ + z | z 6= 0, arg z 6∈ [π/2− π(1− α/2), π/2 + π(1− α/2)]}.

For α = 2, the image is the complex plane with the cut i [λ+,+∞).Fix ω ∈ (0, λ+), and let L(ω;χ+

α) be the image of line Im ξ = ω under χ+α .

Consider the deformation of line Im ξ = ω in the pricing formula for the put intothe contour L(ω;χ+

α), the Cauchy theorem being used:

Vput(t, x) = −Ke−rτ

∫L(ω;χ+

α)

e ix′ξ−τψ0(ξ)

ξ(ξ + i)dξ, (4)

where τ = T − t is time to expiry.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 21 / 85

Parabolic deformations for OTM puts. For α > 2, contours live on the appropriate

Riemann surface.

−30 −20 −10 0 10 20 30−5

0

5

10

15

20

25

30

Graph of χ+α,ω(η)=i⋅ λ

+−i⋅λ

+1−α*exp(α⋅ log(λ

+−ω+i⋅ η)), λ

+=3, ω=1.5

α=1α=1.7

α=2.8α=3.8

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 22 / 85

Simplified trapezoid rule

In (4), change the variable ξ = χ+α(η), where η = iω + η′, η′ ∈ R:

Vput(t, x) = −Ke−rτ

∫Im η=ω

e ix′χ+α(η)−τψ0(χ+

α(η))

χ+α(η)(χ+

α(η) + i)α

(λ+ + iη

λ+

)α−1

dη.

Finally, using a grid ηj = iω + (j − 1)ζ,

Vput(t, x) ≈ −ζKe−rτ

πRe

N∑j=1

e ix′χ+α(ηj )−τψ0(χ+

α(ηj ))

χ+α(ηj)(χ+

α(ηj) + i)α

(λ+ + iηjλ+

)α−1

(1− δj12

)

.One can calculate positive constants C1,α and C2,α,ν such that, as η → ±∞,Re(iχ+

α(η)) ∼ −C1,α|η|α and ψQ,0(χ+α(η)) ∼ C2,α,ν |η|να

Discretization error decays as an exponential of −1/ζ, the truncation error (in

most cases) much faster than exponentially as function of the truncation

parameter Λ; efficient error bounds and recommendation for the choice of

parameters of the numerical scheme for a given error tolerance have been derived

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 23 / 85

Complex-analytical advantage III. Improvement of the rateof convergence of partial sums.

Example of OTM and ATM puts in the VG model.

(1) Before deformation: for all x , the remainder decays as C∫∞

Λy−2−2cτdy ,

where Λ = Nζ, and C , c > 0 are independent of ξ.

(2) After deformation, OTM puts (x ′ > 0): the remainder decays asCα∫∞

Λy−α−1e−cαx

′yαdy , where α ∈ (1, 3) is arbitrary, and Cα, cα > 0depend on α; cα → 0 as α ↑ 3.

(3) After deformation, ATM puts (x ′ = 0): the remainder decays asCα∫∞

Λy−α(1+2cτ)−1dy , where α ∈ (1, 4] is arbitrary, and Cα depends on α.

Remarks.

a. In (3), α > 4 are admissible; the upper bound for α depends on theparameters λ−, λ+ of the VG model.

b. Several classes of the special functions admit integral representations similar tothe ones for options in the VG model

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 24 / 85

Prices and errors (not relative) of various methods.European call close to maturity, under process of finitevariation.

x′ -0.30 -0.24 -0.18 -0.12 -0.06 -0.04 -0.02 -0.00Vcall 0.060767 0.13190 0.296534 0.705057 1.868929 2.720380 4.200686 8.383443

Parabolicα = 2.8 47 5.6E-7 6.1E-7 6.6E-7 7.1E-7 7.6E-7 7.8E-7 8.1E-7 6.7E − 5∗

α = 2.5 47 6.0E-7 6.4E-7 6.9E-7 7.4E-7 8.0E-7 8.1E-7 8.6E-7 6.7E − 5∗

Flat iFT 17778 2.7E-6 1.3E-6 -7.0E-6 2.2E-5 -4.0E-5 5.0E-5 -5.6E-5 0.1Corr iFT 17778 7.4E-7 7.7E-7 7.7E-7 1.0E-6 5.8E-7 1.5E-6 -4.4E-7 NA

COS4p 17778 -1.2E-4 -1.7E-4 3.9E-5 -2.5E-4 1.6E-4 -2.8E-4 1.8E-4 0.23COS4 17778 1.2E-3 9.7E-4 8.0E-4 6.4E-4 4.7E-4 4.2E-4 3.7E-4 0.11

COS6p 17778 1.5E-4 -6.9E-5 -1.5E-4 4.3E-4 -6.7E-4 -1.3E-3 -1.8E-3 0.35

Benchmark prices Vcall and errors are rounded; x′ = ln(S/K) + µτParameters of the European call option: strike K = 10, 000, riskless rate r = 0.04, time to maturity τ = 0.004KoBoL parameters: σ2 = 0.00, c = 1.1136, ν = 0.2, λ+ = 3, λ− = −10, µ = 0.3040.

Errors of benchmark prices: 10−14 − 10−15 for x′ ≤ 0.02 and < 10−8 at x′ = 0Second column: number of terms in the simplified trapezoid ruleCOS4p and COS6p mean that a, b are chosen using cumulants of order 4 and 6, respectively, the put prices are calculated, andthen put-call parity used.∗ calculated using α = 3.9, N = 293. Smaller N suffice if α > 4 is chosen.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 25 / 85

Deltas and relative errors of various methods. Europeancall close to maturity under process of finite variation.Results for cumulative PDF are similar

x′ -0.16 -0.14 -0.12 -0.10 -0.08 -0.06 -0.04 -0.02 0∆call 0.0656 0.0882 0.1203 0.1672 0.2387 0.3546 0.5638 1.0405 49.7038

Parabolicα = 2.8 40 1.5E-7 1.1E-7 8.2E-8 5.9E-8 4.1E-8 2.8E-8 1.8E-8 1.1E-5 6.5E-7∗

Flat iFT 19.8mln -3.2E-6 -9.7E-6 -1.3E-5 -1.2E-5 -7.3E-6 -1.5E-6 5.2E-6 1.2E-05 -2.5E-8Corr iFT 19.8mln 1.3E-7 4.7E-8 -2.0E-9 -1.8E-8 -7.2E-9 1.9E-8 5.2E-8 8.9E-8 NA

Benchmark deltas ∆call are shown in percent. Deltas and relative errors are rounded; x′ = ln(S/K) + µτParameters of the option: strike K = 1, riskless rate r = 0.04, time to maturity τ = 0.004KoBoL parameters: σ2 = 0.00, c = 1.1136, ν = 0.2, λ+ = 3, λ− = −10, µ = 0.3040.Second column: number of terms in the simplified trapezoid rule.CPU time for prices at 16 points: 0.0023-0.0025 sec for parabolic iFT; 195 sec for flat iFT;

Relative errors of benchmark deltas: 10−11 − 10−12 for x′ ≤ 0.02 and 10−10 at x′ = 0

Mesh ζ = 1.2275 and N are is chosen using the recommendations in the paper for the absolute error tolerance 10−8 atx′ = −0.01.

∗ obtained with α = 3.9, N = 9080. Much smaller N suffice if α > 4 is chosen.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 26 / 85

Gamma of European call close to maturity under processof finite variation. Relative errors of different methods.Results for PDF are similar

x′ -0.19 -0.185 ·· -0.025 -0.02 -0.015 -0.01 -0.005 0.00Gamma 0.0072 0.0077 ·· 0.2979 0.4038 0.5904 0.9915 2.3334 141165383

Parabolicα = 2.8 90 2.6E-9 2.3E-9 ·· 2.3E-11 1.7E-11 1.1E-11 6.4E-12 -1.5E-8 3.9E-8∗

Flat iFT 22.5 mln -13.3 -15.2 ·· -3.1 -2.3 -1.6 -0.97 -0.42 -0.97

Benchmark Gammas and relative errors are rounded; x′ = ln(S/K) + µτParameters of the option: strike K = 1, riskless rate r = 0.04, time to maturity τ = 0.004KoBoL parameters: σ2 = 0.00, c = 1.1136, ν = 0.2, λ+ = 3, λ− = −10, µ = 0.3040.Second column: number of terms in the simplified trapezoid rule.

Relative errors of benchmark Gammas: 10−14 − 10−15.Mesh ζ = 1.773 for flat iFT1, parabolic iFT and hyperbolic iFT is chosen using the weak recommendation in the paper for the

absolute error tolerance 10−8 at x′ = −0.0025.∗ obtained with α = 3.9,N = 19531. Much smaller N suffice if α > 4 is chosen.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 27 / 85

Monte Carlo simulations

The main idea (Glasserman and Liu 2007):

tabulate values of c.p.d.f. F at points on a sufficiently long and fine grid of pointsx0, x1, . . . , xK on the real line and approximate F−1 using linear interpolation.Attractive for practical applications: values F (xi ) only have to be calculated once,and afterward the computational cost of each simulation is low.

Inverse Fourier transformcan be used if explicit formula is known for the characteristic function; flat iFTmay face serious difficulties. Chen, Feng and Lin (2011) and Feng and Lin (2013)use a Hilbert transform representation for F (x). From the analytic standpoint, itis very closely related to the standard inverse Fourier transform technique; thestandard “flat” realization may lead to infinite loops (see M.Boyarchenko (2012),p.15 for examples). Ballotta and Kyriakou (2014) use the fractional Fouriertransform, together with error estimates for the case of KoBoL (a.k.a. CGMY).

Parabolic transformationsmake calculations sufficiently accurate and fast.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 28 / 85

An example: pricing Asians

Comparison of inverse transform method using parabolic iFT with an additional twistMitya Boyarchenko (2012) and Madan-Yor method (Tankov’s program) Underlying:KoBoL (a.k.a. CGMY). Table of parameters taken from several papers

Ex K T d r ν λ+ λ− c µ1 100 0.5 26 0.05 0.7 50 -60 4 0.2272 100 0.5 6 0.05 0.7 50 -60 4 0.2273 90 1 50 0.04 0.8 17.56 -54.82 0.2703 0.1784 100 1 50 0.04 0.8 17.56 -54.82 0.2703 0.1785 110 1 50 0.04 0.8 17.56 -54.82 0.2703 0.1786 90 1 50 0.04 0.8 5.853 -18.27 0.6509 0.4247 100 1 50 0.04 0.8 5.853 -18.27 0.6509 0.4248 110 1 50 0.04 0.8 5.853 -18.27 0.6509 0.4249 90 1 50 0.04 0.8 3.512 -10.96 0.9795 0.636

10 100 1 50 0.04 0.8 3.512 -10.96 0.9795 0.63611 110 1 50 0.04 0.8 3.512 -10.96 0.9795 0.63612 90 1 12 0.04 0.2 3 -10 1.1136 0.30413 100 1 12 0.04 0.2 3 -10 1.1136 0.30414 110 1 12 0.04 0.2 3 -10 1.1136 0.304

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 29 / 85

An example: pricing Asians, cont-d

SE: standard error. RE: relative error. CPU time in secondsM.B. Madan-Yor method

Ex Bench Price SE RE CPU Price SE RE CPU1 3.802 3.794 7e-3 0.19% 5.7 3.786 7e-3 0.41% 8282 3.719 3.710 7e-3 0.24% 2.2 3.692 7e-3 0.74% 8133 11.64 11.65 8e-3 0.12% 10.5 11.62 7e-3 0.17% 2054 3.325 3.328 5e-3 0.11% 10.6 3.316 5e-3 0.27% 2065 0.1579 0.1589 1e-3 0.63% 10.5 0.1577 1e-3 0.14% 2056 13.70 13.68 2e-2 0.14% 12.9 13.66 2e-2 0.27% 1987 7.347 7.350 1e-2 0.04% 13.2 7.319 1e-2 0.39% 1988 3.283 3.280 1e-2 0.10% 12.8 3.276 1e-2 0.22% 1979 16.77 16.79 3e-2 0.15% 15.2 16.74 3e-2 0.15% 271

10 11.24 11.28 3e-2 0.31% 15.1 11.22 3e-2 0.23% 27111 7.176 7.198 2e-2 0.31% 15.1 7.184 2e-2 0.11% 27212 14.80 14.81 2e-2 0.12% 3.6 14.77 2e-2 0.19% 8413 8.281 8.280 2e-2 0.02% 3.6 8.262 2e-2 0.23% 8514 3.718 3.702 1e-2 0.44% 3.6 3.720 1e-2 0.05% 85

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 30 / 85

Heston model

A two-factor model. Variance vt = σ2t in BM is a square root process.

Under an EMM Q chosen for pricing, St and stock volatility vt follow thesystem of SDEs

dStSt

= (r − δ)dt +√vtdW1,t , (5)

dvt = κ(m − vt)dt + σ0√vtdW2,t , (6)

where κ > 0,m > 0, σ0 > 0, r , δ ∈ R, W1,t ,W2,t are components of theBrownian motion in 2D, with unit variances and correlation coefficient ρ.

Let Vcall(t,St , vt) be the price of the call option on St with strike K andmaturity date T , at time t < T , under Q.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 31 / 85

Theorem: Pricing call in Heston model

Let τ = T − t be time to maturity, and let λ−(τ) < −1 < λ+(τ) be reals such

that EQ[Sλ±(τ)T | St , vt ] <∞. Then, for any ω ∈ (λ−(τ),−1),

Vcall(t,St , vt) = −Ke−rτ

πRe

∫ iω+∞

e iξzt+(vtB0(τ,ξ)+C0(τ,ξ))/σ20

ξ(ξ + i)dξ, (7)

where zt = log(St/K )− (ρ/σ0)vt + µ0τ , µ0 = r − δ − κmρ/σ0,

B0(τ, ξ) = (κ− R(ξ))1− D1(ξ)e−τR(ξ)

1− D(ξ)e−τR(ξ)(8)

C0(τ, ξ) = κm

((κ− R(ξ))τ − 2 ln

1− D(ξ)e−τR(ξ)

1− D(ξ)

), (9)

R(ξ) =√κ2 + (σ2

0 − 2ρκ)iξ + σ20(1− ρ2)ξ2 (10)

D(ξ) =ρσ0iξ − κ+ R(ξ)

ρσ0iξ − κ− R(ξ)(11)

D1(ξ) = D(ξ)κ+ R(ξ)

κ− R(ξ)(12)

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 32 / 85

ATM call option prices in Heston model (Eurostoxx 50,April 5, 2005): an example from “Heston trap” paper

Effect of a wrong choice of ω

τ 1 2 4 6 8 10 12 14z0 0.1047 0.1920 0.3667 0.5413 0.7160 0.8906 1.0652 1.2400

Vcall 7.2742670 11.737339 18.774227 24.497688 29.442886 33.841937 37.821570 41.460908

ε = 10−4

NCM 52 44 31 24 20 17 15 13errCM 2.1E-05 -9.9E-06 -1.0E-04 -2.4E-04 -3.6E-04 -6.2E-04 -8.0E-04 -0.0024Nα=1 31 26 19 15 12 10 9 8errα=1 1.63E-05 -4.0E-06 1.8E-07 8.7E-05 4.0E-04 0.0016 0.0035 0.0090Nα=1.7 12 11 9 8 7 7 6 6errα=1.7 -2.0E-05 -1.9E-05 -1.5E-05 -9.7E-06 -1.9E-06 1.3E-05 4.6E-05 1.6E-04

ε = 10−7

Nα=1.7 25 22 18 15 14 12 11 11errα=1.7 -2.6E-08 -2.7E-08 -1.2E-08 -4.6E-10 -4.3E-10 7.2E-09 -1.9E-09 3.7E-08

Strike K = 100, spot S0 = 100. Prices, errors and z0 = log(S0/K)− (ρ/σ0)v0 + µ0τ are rounded.Parameters of Heston model: r = 0.025, δ = 0.0, κ = 1.5768,m = 0.0398, σ0 = 0.5751, ρ = −0.5711; v0 = 0.0175.Parameters of the numerical scheme: ω, a, ζ,N are chosen using the recommendations in the paper, for ε and α’s shownCM: prices calculated with the choice ω = −2.25, ζ and N are chosen using the recommendations in the paper.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 33 / 85

ATM call option prices in Heston model, cont-d

For this set of parameters, “Heston trap” paper produces the table with 3digits, and stresses the fact that “only N=4096” terms suffice.

Calculations with N = 1 and N = 2 terms

τ 1 2 4 6 8 10 12 14z0 0.1047 0.1920 0.3667 0.5413 0.7160 0.8906 1.0652 1.2400

Vcall 7.2742670 11.737339 18.774227 24.497688 29.442886 33.841937 37.821570 41.460908

V ,N = 1 7.755 11.830 17.548 22.404 27.037 31.585 36.084 40.544abs.err 0.48 0.09 -1.23 -2.09 -2.41 -2.26 -1.74 -0.92

rel.err, % 6.6 0.79 -6.5 -8.5 -8.2 -6.7 -4.6 -2.2

V ,N = 2 7.512 11.953 18.766 24.374 29.300 33.727 37.758 41.465abs.err 0.238 0.216 -0.0087 -0.123 -0.143 -0.115 -0.063 0.0037

rel.err, % 3.27 1.84 -0.046 -0.503 -0.486 -0.341 -0.168 0.0089

Strike K = 100, spot S0 = 100. Prices, errors and z0 = log(S0/K)− (ρ/σ0)v0 + µ0τ are rounded.Parameters of Heston model: κ = 1.5768,m = 0.0398, σ0 = 0.5751, ρ = −.5711; v0 = 0.0175, with r = 0.025, δ = 0.0.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 34 / 85

Calculation of PDF. An example of CIR subordinator

Let yt be the CIR process with the dynamics

dyt = κ(θ − yt)dt + λ√ytdWt ,

where κ > 0, λ > 0, θ > 0 and dWt is the increment of the standard Wienerprocess. A popular subordinator Yt =

∫ t

0ysds conditioned on y0 has the

characteristic function

ΦCIR(t, y0; ξ) =exp(κ2θt/λ2) exp(2y0iξ/(κ+ γ coth(γt/2)))

[cosh(γt/2) + κ sinh(γt/2)/γ]2κθ/λ2 ,

where γ = γ(ξ) =√κ2 − 2λ2iξ. We want to calculate the pdf

pYt |y0(x) =

1

2πi

∫Re q=σ0

eqxΦCIR(t, y0; iq)dq

Parabolic iFT: change the variable q = σ(1 + iz)α, σ > 0, α ∈ [1, 2], z ∈ R

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 35 / 85

Curves q = σ(1 + iz)α, σ = 3, −∞ < z < +∞

−60 −40 −20 0 20−100

−50

0

50

100

α=1.5

α=2

−300 −200 −100 0 100−400

−200

0

200

400

α=2.95

−100 −50 0 50−500

0

500

α=3.5

−40 −20 0 20−400

−200

0

200

400

α=4

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 36 / 85

Calculation of PDF pt := pYt |y0using Parabolic LT

x 0.005 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08pt (x) 69.6612 62.9235 18.9530 3.64907 0.56458 0.07619 0.00934 0.001065 0.0001148

σ 8.4695 3.3033 1.3936 0.9225 0.7638 0.6525 0.5602 0.4812 0.4140N 55 66 74 75 71 69 68 68 68

rel.err. 3.1E-05 2.4E-06 -8.2E-08 -8.4E-08 -2.3E-07 -1.1E-06 -1.1E-05 -8.9E-05 1.4E-04

U -2.0E-03 6.3E-05 -2.6E-08 6.0E-11 -3.8E-13 -1.9E-12 3.0E-06 0.34 2339.22M14 -3.5E-03 -2.7E-04 3.1E-03 -1.1E-03 -0.15 -0.47 2.6 44.3 372.016 -2.9E-03 -4.3E-04 1.4E-03 -3.1E-03 -0.057 0.031 2.7 21.9 101.018 -2.8E-03 -2.5E-04 5.0E-04 -2.2E-03 -0.017 0.10 1.33 5.4 -16.520 -2.9E-03 -6.0E-05 1.1E-04 -9.8E-04 4.0E-03 0.067 0.47 -0.61 -12.722 -2.9 E-03 -2.4E-04 -2.7E-04 7.3E-04 -0.13 -0.20 -0.93 -4.8 -536.1

Values of pdf and relative errors are rounded.yt is given by SDE dyt = κ(θ − yt )dt + λ

√ytdWt , κ = 1.6, θ = 0.03, λ = 0.3, y0 = 0.02, t = 0.5

Parameters of Parabolic iLT: α = 1.7, σ,N, ζ are chosen using recommendations in the paper for the error tolerance

ε = 10−7, µ+ = 0.7; ζ (not shown) is in the range 0.2-0.3 in all cases.line U: relative errors of Parabolic iLT with the same grid for all x , defined by σ = 20, ζ = 0.22,N = 20, α = 1.7.2M: number of terms in Gaver-Stehfest method.

Gaver-Stehfest method can give much heavier upper tails ornegative tail probabilities.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 37 / 85

Conformal quasi-asymptotics and special functions

Typically, a deformation and a moderately small ζ satisfying the desirederror tolerance can be found relatively easily.

After that, the infinite trapezoid rule can be regarded as a quasi-exact seriesrepresentation, and the choice of the number of terms N treated as a similarchoice in asymptotic formulas. This explains the nomer quasi-asymptotics.

The other justification for the nomer is a very fast rate of decay of thetruncation error as Λ := Nζ → +∞, which an appropriate conformaldeformation guarantees.

In many cases, several dozen of terms (up to a couple of hundred) suffice tosatisfy an error tolerance of order 10−15; if high precision arithmetic is used,then, decreasing ζ and increasing N by a factor of 2 and 4, respectively, onecan satisfy an error tolerance of order 10−30, etc.

Thus, accurate studies of the optimal rate of decay “as N → +∞” are notvery useful for practical purposes; but sufficiently reliable recommendationsfor the choice of ζ and N given the error tolerance are necessary.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 38 / 85

Why “Conformal quasi-asymptotics”?

The adjective conformal indicates that we have a cloud of approximateformulas obtained in the result of different conformal deformations.

A couple of quasi-asymptotic formulas obtainable as the result of twodeformations with different pairs (α, σ) can be used to ensure the accuracyof the result.

If the absolute value of the difference is a small number ε, the probabilitythat the error of any of these two results is greater than 2ε is almost zero.

Hence, the same program can be used to check that the result is obtainedwith the desired precision, and it is unnecessary to use two fundamentallydifferent programs.

This test of accuracy is much more reliable than the standard test based onnested quadrature rules.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 39 / 85

0F1, the confluent hypergeometric function of the first kind

1F1, and the inverse Laplace transform

Some well-known formulas:

0F1(γ, z) =Γ(γ)

2πi

∫Re ξ=σ

eξ+z/ξξ−γdξ, (13)

where σ > 0 is arbitrary, and

1F1(β, γ, z) =Γ(γ)

2πi

∫Re ξ=σ

eξ(ξ − z)−βξβ−γdξ, (14)

where σ > Re z is arbitrary. The integral on the RHS is absolutely convergent if

Re γ > 1, and it admits analytic continuation w.r.t. (β, γ, z) into C3 provided σ

varies accordingly. This well-known fact is evident once an appropriate contour

deformation is made.

One recognizes special cases of the inverse Laplace transform. Onlyα < 3 are admissible. For 2F1, any α ∈ (1, α0) is admissible, whereα0 > 4 depends on the parameters of the function. Thecorresponding conformal deformations are shown on the next slide.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 40 / 85

Curves q = σ(1 + iz)α, σ = 3, −∞ < z < +∞

−100 0 100 200 300−100

0

100

α=7

−200 0 200 400−2000

0

2000

α=7

−600 −400 −200 0 200−200

0

200

α=12

−600 −400 −200 0 200−2000

0

2000

α=12

−100 0 100 200−100

0

100

α=24

−2000 −1000 0 1000−1000

0

1000

α=24

On the left and the right, the same curves, only the scales are different.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 41 / 85

Confluent hypergeometric function of the second kind Ψ

We start with the integral representation:

Ψ(β, γ, z) =1

Γ(β)

∫ ∞0

e−zttβ−1(1 + t)γ−β−1dt, (15)

where Reβ > 0 and Re z > 0, and apply “the reduction to a cut in reverse”:

Lemma 4

Let a > −1, and let f : R+ → R satisfy the following conditions:

(i) g(y) := f (y2) admits analytic continuation to a strip S(−d,0], where d > 0;

(ii) ∃ C > 0, b > 1 s.t. |g(y)| ≤ C (1 + |y |)−2a−1−b, ∀y ∈ S(−d,0].Then, for any ω ∈ (−d , 0),∫ +∞

0

taf (t)dt =2

1− e−2iπa

∫Im y=ω

y2a+1f (y2)dy , if a 6∈ Z∫ +∞

0

taf (t)dt =2

∫Im y=ω

ln y · y2a+1f (y2)dy , if a ∈ Z++.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 42 / 85

The parabolic Laplace transform and other popular specialfunctions

We can make the (quasi-)parabolic change of variables on the RHSs; if theexponential factor e−zt was present, the resulting formulas can be called theparabolic Laplace transform.

The same trick can be applied to the Gamma function, incomplete Gammafunction, and hypergeometric function 2F1 given by

2F1(δ, β, γ, z) =Γ(γ)

Γ(γ − β)Γ(β)

∫ ∞0

tγ−β−1(1 + t)δ−γ(1 + t − z)−δdt, (16)

where |z | < 1, Reβ > 0 and Re(γ − β) > 0. Evidently, the RHS admits analyticcontinuation w.r.t. u := 1− z to C \ R−−.

In the case of the Beta function and incomplete Beta function, preliminarychanges of variables are needed to reduce to the integral over R+, then applyLemma 4 and the quasi-parabolic change of variables.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 43 / 85

1F1(β, γ, z) results1

Confluent hypergeometric function of the first kind 1F1(β, γ, z) (rounded, realand imaginary parts), β = 2, γ = 0.8 are real, z = e2πi/3|z | varies. Parameters ofquasi-parabolic change of variables: α = 2.95.

|z| 2.0 2.5 3.0 3.5 4.0 4.5 5.0

σ 3.5 3.5 3.5 3.5 3.5 3.5 3.54ζ 0.0830 0.07587 0.07065 0.06636 0.06264 0.05932 0.05629N 46 51 58 67 77 90 105

Re 1F1 -0.8009150 -0.4698160 -0.0305082 0.3573637 0.5944727 0.6512615 0.5544849Im 1F1 -0.4042647 -0.756373 -0.8506607 -0.7085719 -0.4184046 -0.0874591 0.194119

Errors Para-SFT in units of 10−15

Re 1F1 -7.55 -0.389 -1.79 -2.83 -3.55 -2.44 -2.22Im 1F1 -0.278 0.888 -0.333 0.111 0.833 0.513 1.28

Errors SciPy-SFT, in units of 10−15

Re 1F1 7.99 0.999 1.801 1.998 3.997 2.998 1.998Im 1F1 -1.0 1.0 -0.20 -2.0 0 0 0.31

CPU time in millisec.SciPy 0.0062 0.0065 0.0061 0.0057 0.0058 0.006 0.0053

Mathematica 0.056 0.060 0.062 0.066 0.07 0.072 0.076ParaC++ 0.093 0.102 0.115 0.132 0.150 0.173 0.201ParaML 0.237 0.234 0.240 0.252 0.274 0.308 0.355

SFT 164.5 287.0 290.6 300.4 232.4 306.0 313.5

1ParaML: implementation in MATLAB. SFT: MATLAB’s Special Function Toolbox.ParaC++: C++ implementation by Marco de Innocentis.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 44 / 85

Hypergeometric function 2F1(β, γ, z) (rounded, real and imaginary parts),

δ = 1.75, β = 0.2, γ = 0.8, z = 1− u, u = e iπ/3|u|, |u| = 1.1, 1.2, . . . , 1.7.

Parameter of quasi-parabolic change of variables: α = 4.

|u| 1.1 1.2 1.3 1.4 1.5 1.6 1.7σ 0.2406 0.2513 0.2515 0.2516 0.2517 0.2518 0.2519ζ 0.054 0.054 0.054 0.055 0.055 0.055 0.055N 215 211 211 210 209 209 208

Re 2F1 0.7988113 0.7790603 0.7617119 0.7462995 0.7324746 0.7199714 0.7085825Im 2F1 -0.3605505 -0.3378847 -0.3187835 -0.3024626 -0.2883514 -0.2760253 -0.2651619

Errors Para-SFT, in units of 10−15

Re 2F1 0.666 -0.444 -0.00 -0.444 0.333 0.333 0.555Im 2F1 0.555 -0.444 -0.167 -0.167 -0.389 0.278 -0.666

Absolute errors of SciPy9.32E-10 6.76E-10 5.69E-10 4.14E-10 3.85E-10 3.18E-10 2.28E-10

CPU time in millisec.SciPy 0.290 0.150 0.020 0.018 0.015 0.015 0.014

SymPy 0.917 0.999 0.931 0.923 0.924 0.915 0.933Mathematica 0.473 0.487 0.504 0.534 0.421 0.441 0.369

ParaML 0.553 0.543 0.553 0.555 0.554 0.557 0.563SFT 31.33 30.42 29.9 29.51 29.77 29.38 29.51

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 45 / 85

Short characterization of the numerical experiments

(The paper with more tables will be made public soon.)

1 Typically, the method of the paper is faster (for 1F1, up to thousands timesfaster) than functions implemented in Matlab

2 Typically, faster than implementations in SymPy

3 For fairly complicated special functions such as 2F1, the suggested method isalmost as fast as 2F1 implemented in Mathematica, and it is accuratewhereas faster SciPy procedures are very inaccurate in some cases.

4 In practical applications, when hundreds of thousand of evaluations need tobe performed sufficiently accurately and fast, insufficiently accuratenumerical scheme or insufficiently accurate prescriptions for the choice ofthe parameters of a potentially very accurate scheme may lead to verywrong results, which the program will not notice.

5 The advantages of the (quasi-) parabolic deformations technique increasewith the complexity of the integrals, such as in the Heston model.

6 Implications for risk management (especially counterparty risk) aredemonstrated below.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 46 / 85

The Heston model in counterparty risk modelling

Work in progress with Marco de Innocentis, Credit Suisse. The views expressedherein are those of the authors only, no other representation should be attributed.

Counterparty credit risk (CCR) is the risk that a counterparty to an OTCtransaction will fail to meet its obligations.

Key ingredients in CCR modelling are

Loss given default (LGD)

Probability of default (PD)

Exposure at default (EAD).

Under the Basel III Internal Model Method (IMM) approach, EAD can becomputed using the output of the bank’s internal Monte Carlo model of futureexposure.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 47 / 85

Counterparty credit risk

Regulators require IMM exposure models to passbacktesting at both risk factor evolution (RFE) andportfolio level.

Backtesting attempts to assess the predictive power of the model by comparingits past predictions with realized outcomes.

Since a bank may need to simulate option portfolios with several hundreds ofdistinct underlying assets over thousands of scenarios, for maturities of up to 10years and beyond, a fast pricing method is needed for both the calibration and thesimulation.

In addition, the pricing method must be sufficiently accurate in order to copeboth with long and very short maturities, and options which are very far inand out of the money. Using pricing method in a CCR engine effectivelyinvolves “stress testing” it.

The advantages of (quasi-)parabolic deformations are especially significantin these cases.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 48 / 85

Heston vs empirical PDF

The figure below shows the calibrated Heston PDF, as of 30 Jan2015, compared with that estimated using a Gaussian kernel overmonthly returns between 31 Jan 2008 and 30 Jan 2015. The fat lefttail and the thin right tail is one reason why the Heston model ishistorically realistic and successful in risk factor backtesting.

Log return-0.15 -0.1 -0.05 0 0.05 0.1

PD

F

0

5

10

15

20

25

EmpiricalHeston

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 49 / 85

Pricing methodology

We use the (quasi-)parabolic iFT.

For very short or very long maturities, the approximate error bounds inLevendorskii (2012), on which the numerical prescriptions for ζ, ω, N rely,may fail to hold. In these cases, we use ω = −1/2 (which in the flat casecorresponds to the Lewis-Lipton formula) and α = 1.2, together with aniterative procedure for the choice of N and ζ.

Work in progress: derivation of a more accurate universal recommendationfor the choice of parameters to avoid the use of an iterative procedure, anduse larger αs

Alternative pricing schemes: adaptive quadrature

Alternative approach based on applying a high precision adaptive quadraturescheme to the “semi-analytical” pricing formula (Heston, 1993), togetherwith the change of variables in Kahl and Jackel (2005) in order to reducethe integral from (0,∞) to (0, 1).

We use the NAG function d01sjc, which implements the de Doncker (1978)algorithm, based on Gauss 10-point and Kronrod 21-point rules.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 50 / 85

Alternative pricing schemes, cont-d

Alternative pricing schemes: Carr-Madan method

As used, e.g., in Albrecher et al. (2006), equivalent to the choiceω = −1.75, ζ = 0.25 and N = 4096 points.

The price is calculated by using the FFT and interpolating over the results inlog-strike space.

Alternative pricing schemes: Lewis-Lipton formula

Reduce to the covered call, and use ω = −1/2 in the pricing formula.

The strip Im ξ ∈ (−1, 0) is particularly convenient for very large maturities,when typically λ+(τ) and −1− λ−(τ) are both very small.

We use an iterative procedure for the choice of mesh ζ and truncationparameter Λ = Nζ: first, starting with a small ζ, we double Λ until theresults of two successive evaluations have a relative difference under 10−3.Then, using this Λ, we decrease ζ by a factor of 1.5 until the results of twosuccessive evaluations have a relative difference under 10−3.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 51 / 85

Benchmarking test framework

We use a 5D Halton “cube” with 500 points to cover the regionρ ∈ (−0.99, 0.1), σ0 ∈ (0.001, 2), κ ∈ (0.001, 7), m ∈ (0.005, 4),v0 ∈ (0.005, 4), where market-implied calibration results typically lie.

Assuming zero interest and dividend rates, at each point, calculate the priceof an ITM option with moneyness K/St between2 1/5 and 5, andmaturities between 1W and 10Y, using the parabolic method (Par), theKahl-Jackel adaptive quadrature method (KJ), and the CM method. Forthis benchmarking exercise only, we apply CM separately at each strike, i.e.we do not interpolate in the strike grid.

Calculate benchmark using the Lewis-Lipton formula and the iterativeprocedure for ζ, Λ = Nζ, with initial values ζ0 = 0.02 and Λ0 = 500.

For each method, we look at: 1) the number of call option prices Vt whichbreach the no-arbitrage bound3, e.g. for a call optionmax{0,St − Ke−r(T−t)} ≤ Vt ≤ St , where T is the maturity of the option,2) the distribution of relative errors of the option prices w.r.t. thebenchmarks, and 3) the total calculation times.

2Specifically, we use 1W, 1M, 3M, 6M, 9M, 1Y, 2Y, 3.5Y, 5Y, 7.5Y, and 10Y maturities, and strikes 20, 30, . . . , 500, spot

price St = 100.3

Within an absolute tolerance of 0.0001.Sergei Levendorskii Quasi-parabolic deformations 12/09/15 52 / 85

Benchmarking test results

For each method we look at the number of option prices Vt whichbreach the no-arbitrage bound4 max{0, St − Ke−r(T−t)} ≤ Vt ≤ St .

Parabolic KJ Adaptive CMAverage time (ms) 0.287 4.72 15.01% of breaches 0.01 0.66 22.3

In the next three slides, we show the distribution of the maximumrelative errors w.r.t. the benchmark for each Heston parameter set,corresponding to a the first 1000 5D Halton numbers.

4Within an absolute tolerance of 0.0001.Sergei Levendorskii Quasi-parabolic deformations 12/09/15 53 / 85

Benchmarking test: error distribution (parabolic)

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 54 / 85

Benchmarking test: error distribution (adaptive)

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 55 / 85

Benchmarking test: error distribution (CM)

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 56 / 85

Benchmarking test: conclusions

CM is both slow and extremely inaccurate, even when usedseparately for each strike (i.e., without interpolation error).

The adaptive integration method of Kahl and Jackel improvesupon CM in terms of accuracy, but it still too slow for practicalapplication in a counterparty risk engine.

Parabolic improves upon CM and KJ in terms of both accuracyand speed.

Work in progress on extending the prescriptions of Levendorskii(2012) to include the cases of very short and long maturity.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 57 / 85

Calibration methodology

Need a set of Heston parameters which best reproduce theimplied volatility surface, for a given underlying. As the Hestonparameters a constant, a “perfect” fit cannot be achieved.

We minimize the sum of squared differences between the modeland market implied volatilities for a given set of times to maturityand moneyness (K/S) levels.

We calibrate using moneyness levels of 0.80, 0.90, 0.95, 1, 1.05,1.10, 1.20, and times to maturity 1M, 3M, 6M, 1Y and 7Y(extensive testing has shown that the out-of-sample performanceof the calibration is more robust w.r.t. moneyness than time tomaturity).

Unconstrained optimisation is used for transformed parameterslying in (−∞,∞), together with a set of initial guessesdetermined from a 5D quasi-random (Halton) sequence in anappropriate region of Heston parameter space.Sergei Levendorskii Quasi-parabolic deformations 12/09/15 58 / 85

Calibration methodology

To examine the robustness of the calibration with the parabolicmethod, we take the parameters calibrated to the S&P 500 volatilitysurface for 30 May 2008 and compare

1 The actual implied vols

2 The implied vols calculated using the parabolic method andparameters calibrated using parabolic.

3 The implied vols calculated using parabolic and parameterscalibrated using Carr-Madan (CM).

4 The implied vols calculated using CM and parameters calibratedusing Carr-Madan (CM).

The following slides show the volatility smiles corresponding tomaturities between 1M and 1Y. For (4), missing values correspond toCM prices which violate no-arbitrage bounds, and for which impliedvols cannot be calculated.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 59 / 85

Calibration test: S&P 500, 30 May 2008

Strike/Spot0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5

Impl

ied

vol

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

0.551M maturity

MarketPar from ParPar from CMCM from CM

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 60 / 85

Calibration test: S&P 500, 30 May 2008

Strike/Spot0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5

Impl

ied

vol

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

0.55

0.63M maturity

MarketPar from ParPar from CMCM from CM

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 61 / 85

Calibration test: S&P 500, 30 May 2008

Strike/Spot0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5

Impl

ied

vol

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.56M maturity

MarketPar from ParPar from CMCM from CM

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 62 / 85

Calibration test: S&P 500, 30 May 2008

Strike/Spot0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5

Impl

ied

vol

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.59M maturity

MarketPar from ParPar from CMCM from CM

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 63 / 85

Calibration test: S&P 500, 30 May 2008

Strike/Spot0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5

Impl

ied

vol

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.451Y maturity

MarketPar from ParPar from CMCM from CM

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 64 / 85

Calibration test: conclusions

The results shown, together with similar ones for othercalibration dates, demonstrate that the parabolic calibration givesa good fit to the market smile, even for maturities andmoneyness levels not included in the calibration (i.e., goodout-of-sample performance).

The smile calibrated using CM shows much larger deviationsfrom the market smile, especially at the wings.

Even worse, the CM pricing algorithm cannot reproduce itsown prices accurately (cf. differences between the green and thedashed black curves). Any calibration procedure should, at thevery minimum, be able to reproduce its own results.

CM is much slower than parabolic, taking 283.53 sec to calibrate,on average, vs parabolic’s 21.26 sec5 for the 2008-15 period.

5On a PC with Intel(R) Xeon(R) CPU, 2.27 GHz (2 processors), with 16 GB RAM and 64-bit, running Windows 7

Enterprise, using Visual Studio 2010.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 65 / 85

Backtesting results

For a range of historical dates (e.g. 1 Jan 2008 - 31 Dec 2014) theRFE model is calibrated, e.g. at monthly intervals.

For each calibration, we calculate the model CDF of the realizedvalues at different time horizon (e.g. 1 month, 3 months, 6 months, 1year).

Using various statistical hypothesis tests (left and right exceptioncounting (EXC) at different levels, Anderson-Darling and Cramer-vonMises), we calculate the p-value corresponding to a given timehorizon and assign a red/amber/green colour according to whether itlies in [0, 0.01), [0.01, 0.05), or [0.05, 1], respectively6.

See Anfuso et al. (2013) and Kenyon and Stamm (2012) for details.

6For the distributional tests, Brown aggregation (cf. Kost and McDermott, 2002)can be used for overlapping intervals.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 66 / 85

Backtesting results

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 67 / 85

Backtesting results

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 68 / 85

Backtesting results

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 69 / 85

S&P 500: quantile and CDF plots for monthly returns

In the next slides, we look at three cases in detail: S&P 500(which passes all tests), NASDAQ 100 (which fails someexception counting tests with long horizons), and and Sunpower(which fails some distributional tests at short horizons).

In each case, we include:

1 A plot of realized values of the stock at each month end between Jan08 and Jan 15, together with the 0.01, 0.05, 0.95 and 0.99 percentiles,using the corresponding Heston parameters calibrated at each monthend.

2 A plot of the Heston CDF of the realized values at each month end,corresponding Heston parameters calibrated at each month end.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 70 / 85

S&P 500: quantile and CDF plots for monthly returns

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 71 / 85

Nasdaq 100: quantile and CDF plots for monthly returns

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 72 / 85

Sunpower: quantile and CDF plots for monthly returns

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 73 / 85

Backtesting: summary I

For most stocks and indices shown, the Heston model backtestswell.

In the case of Nasdaq, the exception counting failures over longhorizons are due to the large positive drift of the realised process,especially between 2012 and 2015.

For Sunpower, the failure of the distributional tests at short timehorizon is likely caused by a period in 2011-12 in which thehistorical stock price moved within a very narrow range.

The Heston model, calibrated using the parabolic method,generally performs well in historical risk factor backtesting. TheHeston distribution is qualitatively similar to the historicaldistribution of returns.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 74 / 85

Backtesting: summary II

The parabolic method is both sufficiently fast to be used in acounterparty risk engine, and sufficiently accurate to producecorrect prices even in cases of very long and very short maturities(both of which typically arise in countearparty risk). Othermethods are either too slow or too inaccurate, or both.

In particular, the Carr-Madan method, which is especially popularin the academic literature, does not even manage to reproducethe results of its own calibration, which itself shows largedifferences w.r.t. parabolic calibration.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 75 / 85

Bibliography I

H. Albrecher, Ph. Mayer, W. Schoutens, and J. Tistaert.

The Little Heston Trap.

Wilmott Magazine, pages 83–92, January 2007.

F. Anfuso, D. Karyampas, and A. Nawroth.

A sound Basel III compliant framework for backtesting Credit ExposureModels.

Working paper, May 2013.

Available at SSRN: http://papers.ssrn.com/abstract=2264620.

L. Ballotta and I. Kyriakou.

Monte Carlo simulation of the CGMY process and option pricing.

Journal of Futures Markets, 34(12):1095–1121, December 2014.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 76 / 85

Bibliography II

M. Boyarchenko.

Fast simulation of Levy processes.

Working paper, August 2012.

Available at SSRN: http://ssrn.com/abstract=2138661 orhttp://dx.doi.org/10.2139/ssrn.2138661.

M. Boyarchenko and S. Levendorskii.

Ghost Calibration and Pricing Barrier Options and Credit Default Swaps inspectrally one-sided Levy models: The Parabolic Laplace Inversion Method.

Quantitative Finance, 15(3):421–441, 2015.

Available at SSRN: http://ssrn.com/abstract=2445318.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 77 / 85

Bibliography III

S. Boyarchenko and S. Levendorskii.

Efficient pricing barrier options and CDS in Levy models with stochasticinterest rate.

Mathematical Finance.

To appear. Available at SSRN: http://ssrn.com/abstract=2544271.

S. Boyarchenko and S. Levendorskii.

On rational pricing of derivative securities for a family of non-Gaussianprocesses.

Preprint 98/7, Institut fur Mathematik, Universitat Potsdam, January 1998.

Available at http://opus.kobv.de/ubp/volltexte/2008/2519/.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 78 / 85

Bibliography IV

S. Boyarchenko and S. Levendorskii.

Efficient Laplace inversion, Wiener-Hopf factorization and pricing lookbacks.

International Journal of Theoretical and Applied Finance, 16(3):1350011 (40pages), 2013.

Available at SSRN: http://ssrn.com/abstract=1979227.

S. Boyarchenko and S. Levendorskii.

Efficient variations of Fourier transform in applications to option pricing.

Journal of Computational Finance, 18(2):57–90, 2014.

S.I. Boyarchenko and S.Z. Levendorskii.

Option pricing for truncated Levy processes.

International Journal of Theoretical and Applied Finance, 3(3):549–552, July2000.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 79 / 85

Bibliography V

P. Carr, H. Geman, D.B. Madan, and M. Yor.

The fine structure of asset returns: an empirical investigation.

Journal of Business, 75:305–332, 2002.

P. Carr and D.B. Madan.

Option valuation using the Fast Fourier Transform.

Journal of Computational Finance, 2(4):61–73, 1999.

Z. Chen, L. Feng, and X. Lin.

Simulation of Levy processes from their characteristic functions and financialapplications.

ACM Transactions on Modeling and Computer Simulation, 22(3), 2011.

Available at: http://ssrn.com/abstract=1983134.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 80 / 85

Bibliography VI

E. de Doncker.

An adaptive extrapolation algorithm for automatic integration.

ACM SIGNUM Newsletter, pages 12–18, June 1978.

M. de Innocentis and S. Levendorskii.

Pricing discrete barrier options and credit default swaps under Levyprocesses.

Quantitative Finance, 14(8):1337–1365, 2014.

Available at: http://dx.doi.org/10.1080/14697688.2013.826814.

F. Fang and C.W. Oosterlee.

A novel pricing method for European options based on Fourier-Cosine seriesexpansions.

SIAM Journal on Scientific Computing, 31(2):826–848, 2008.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 81 / 85

Bibliography VII

L. Feng and V. Linetsky.

Pricing discretely monitored barrier options and defaultable bonds in Levyprocess models: a fast Hilbert transform approach.

Mathematical Finance, 18(3):337–384, July 2008.

P. Glasserman and Z. Liu.

Estimating Greeks in Simulating Levy-Driven Models.

Journal of Computational Finance, 14:3–56, 2010.

G.G. Haislip and V.K. Kaishev.

Lookback option pricing using the Fourier transform B-spline method.

Quantitative Finance, 14(5):789–803, 2014.

G.G. Haislip and V.K. Kaishev.

A novel Fourier Transform B-spline method for option pricing.

Journal of Computational Finance, 19(1):–, 2015.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 82 / 85

Bibliography VIII

S. L. Heston.

A closed-form solution for options with stochastic volatility with applicationsto bond and currency options.

The Review of Financial Studies, 6(2):327–343, 1993.

Michael J.T. Kost and P. McDermott.

Combining dependent p-values.

Statistics & Probability Letters, 60:183–190, November 2002.

C. Kahl and P. Jackel.

Not-so-complex logarithms in the Heston model.

Wilmott, pages 94–103, September 2005.

C. Kenyon and R. Stamm.

Discounting, LIBOR, CVA and Funding.

Palgrave Macmillan, 2012.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 83 / 85

Bibliography IX

S. Levendorskii.

Pitfalls of the fourier transform method in affine models, and remedies.

Working paper, 2014.

Available at SSRN: http://ssrn.com/abstract=2367547.

S.Z. Levendorskii.

Efficient Pricing and Reliable Calibration in the Heston Model.

International Journal of Theoretical and Applied Finance, 15(7):1–44, 2012.

Available at SSRN: http://ssrn.com/abstract=1979225.

S.Z. Levendorskii.

Method of paired contours and pricing barrier options and CDS of longmaturities.

International Journal of Theoretical and Applied Finance, 17(5), 2014.

1450033 (58 pages).

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 84 / 85

Bibliography X

A. Lewis.

A simple option formula for general jump-diffusion and other exponentialLevy processes, September 2001.

Available at: http://papers.ssrn.com/abstract=585451.

A. Lipton.

Assets with jumps.

Risk, pages 149–153, September 2002.

D.B. Madan and W. Schoutens.

Break on through the single side.

Technical report 07-07, July 2007.

Available at: SSRN: http://papers.ssrn.com/abstract=1003144.

Sergei Levendorskii Quasi-parabolic deformations 12/09/15 85 / 85