• Aucun résultat trouvé

Practical Work #4

N/A
N/A
Protected

Academic year: 2022

Partager "Practical Work #4"

Copied!
2
0
0

Texte intégral

(1)

EFREI – M1 IFM Numerical analysis applied to financial issues

Practical Work #4

The Finite Difference Method (FDM) has been presented in the course. We aim at applying this method to the well-known Black & Scholes equation with constant volatilityσand constant interest rater for the modelling of a European vanilla put option:





∂P˜

∂t (t,S)+σ2S2 2

2P˜

∂S2(t,S)+r S∂P˜

∂S(t,S)rP˜(t,S)=0, P˜(T,S)=max(0,KS),

or equivalently (by means of the change of variablesP(t,S)=P˜(T −t,S))





∂P

∂t(t,S)σ2S2 2

2P

∂S2(t,S)−r S∂P

∂S(t,S)+r P(t,S)=0, (1a)

P(0,S)=max(0,KS). (1b)

We set for the present study

K=100,T =1,σ=0.2 and r=0.04 . IfPis a solution to (1), then the following function

ϕ(θ,x)=P(θ,ex)e−αθ−βx with β=1 2− r

σ2,α= −r−σ2β2 2 , is a solution to





∂ϕ

∂θσ2 2

2ϕ

∂x2 =0, (2a)

ϕ(0,x)=e−βx·max(0,Kex). (2b)

We recall that the exact solution is given by

P˜(t,S)=K e−r(T−t)Φ(−d2)−SΦ(−d1), withΦ(d)= 1

p2π Z d

−∞

exp µ

z2 2

dzand:

d1=ln(S/K)+(r+σ2/2)(T −t) σp

T −t ,d2=d1σp T −t.

We thus aim at simulating equivalent formulations (1) and (2) and then at comparing corresponding solu- tions.

08/04/2013 1 M. Girardin – B. Meltz

(2)

EFREI – M1 IFM Numerical analysis applied to financial issues

Exercise 1 (Heat equation on a uniform grid) Let x and x be two real numbers such that x¿lnK ¿x.

We consider a space discretization given by xj =x+(j−1)∆x,x= xx

Nx−1 for some Nx >1and a time discretization tn=(n−1)∆t ,∆t= T

Nt−1for a suitable Nt>1.

Implement and compare performance of the explicit Euler scheme, the implicit Euler scheme and the Crank- Nicholson scheme for the resolution of (2). Comparisons will be made on the primitive functionP .˜

Note that the stability condition readst≤∆x2 σ2 .

Exercise 2 (Heat equation on a nonuniform grid) Let S and S be two real numbers such that S¿K ¿S.

We consider an asset discretization given by Sj =S+(j−1)∆S,S= SS

NS−1 for some NS >1and a time discretization tn=(n−1)∆t ,t= T

Nt−1for some Nt>1. The corresponding space discretization is imposed by the change of variable:

xj=lnSj. We setxj=xj+1xj.

1. Derive a formula approaching the second order spatial derivative on nonuniform grids.

2. Then implement the resolution of (2)by means of the Crank-Nicholson scheme.

Exercise 3 (Resolution of the Black & Scholes model in primitive variables)

1. Given a uniform discretization of the time-asset space [0,T]×[S,S], propose a numerical scheme based on the explicit Euler scheme for the time derivative to solve(1).

2. Find out by means of numerical simulations a suitable value for∆t . 3. Implement the Crank-Nicholson scheme applied to(1).

4. Comment numerical results.

08/04/2013 2 M. Girardin – B. Meltz

Références

Documents relatifs

So, master class "Modern ICT tools and services for teachers of Mathematical and Technology disciplines" was first performed by the teachers of the department of

Function field, Drinfeld period domain, Bruhat-Tits building, Kronecker limit formula, Drinfeld-Siegel unit, Mirabolic Eisenstein series, CM Drinfeld module, Taguchi height,

2. A crucial tool, in this approach, is the notion of storage operator, to be defined later. As is well known, in call-by-name λ-calculus, a function must compute its argument

• Monolingual English runs: both runs applied for the validation process the coarse grained expected answer type matching (because with the NE recognizer used in English we can

Intuitively, two mappings are CQ-equivalent, if conjunctive queries posed against the target database yield the same result for both mappings (for details, see Section 2). For

Influence of the pinhole size on the resolution of the 4Pi’ microscope studied by means of the optical transfer function.. Nuclear Instruments and Methods in Physics Research Section

This result is accom- plished by the use of a nonlocal version of the notion of viscosity solution with generalized boundary conditions, see [21, 2, 8] for an introduction of

The same test can be used for other weak acids with more than two titratible acid groups and bases.. You must test K values