Finite Difference Approach to Option Pricing



Similar documents
CS Software Engineering for Scientific Computing. Lecture 16: Particle Methods; Homework #4

Numerical Methods for Differential Equations

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 10

SIXTY STUDY QUESTIONS TO THE COURSE NUMERISK BEHANDLING AV DIFFERENTIALEKVATIONER I

440 Geophysics: Heat flow with finite differences

5.4 The Heat Equation and Convection-Diffusion

College of the Holy Cross, Spring 2009 Math 373, Partial Differential Equations Midterm 1 Practice Questions

The Heat Equation. Lectures INF2320 p. 1/88

BINOMIAL OPTIONS PRICING MODEL. Mark Ioffe. Abstract

MEL 807 Computational Heat Transfer (2-0-4) Dr. Prabal Talukdar Assistant Professor Department of Mechanical Engineering IIT Delhi

OPTION PRICING WITH PADÉ APPROXIMATIONS

N 1. (q k+1 q k ) 2 + α 3. k=0

On computer algebra-aided stability analysis of dierence schemes generated by means of Gr obner bases

Notes for AA214, Chapter 7. T. H. Pulliam Stanford University

Class Meeting # 1: Introduction to PDEs

Numerical Methods for Differential Equations

AN INTRODUCTION TO NUMERICAL METHODS AND ANALYSIS

Advanced CFD Methods 1

Numerical Methods for Engineers

ECG590I Asset Pricing. Lecture 2: Present Value 1

Does Black-Scholes framework for Option Pricing use Constant Volatilities and Interest Rates? New Solution for a New Problem

How To Price A Call Option

Second Order Linear Partial Differential Equations. Part I

Numerical methods for American options

MATH 423 Linear Algebra II Lecture 38: Generalized eigenvectors. Jordan canonical form (continued).

Advanced Computational Fluid Dynamics AA215A Lecture 5

Introduction to the Finite Element Method

Chapter 9 Partial Differential Equations

1 Finite difference example: 1D implicit heat equation

Vector Spaces; the Space R n

Finite Differences Schemes for Pricing of European and American Options

Feature Commercial codes In-house codes

Domain Decomposition Methods. Partial Differential Equations

The Black-Scholes-Merton Approach to Pricing Options

The integrating factor method (Sect. 2.1).

Chapter 5. Methods for ordinary differential equations. 5.1 Initial-value problems

Pricing Barrier Option Using Finite Difference Method and MonteCarlo Simulation

Figure 1 - Unsteady-State Heat Conduction in a One-dimensional Slab

5 Numerical Differentiation

Numerical Analysis An Introduction

Mean value theorem, Taylors Theorem, Maxima and Minima.

Numerical Analysis Lecture Notes

Diffusion: Diffusive initial value problems and how to solve them

How To Calculate Energy From Water

Numerical Methods for Ordinary Differential Equations

- momentum conservation equation ρ = ρf. These are equivalent to four scalar equations with four unknowns: - pressure p - velocity components

To define concepts such as distance, displacement, speed, velocity, and acceleration.

Valuation of American Options

Linear Equations and Inequalities

Numerical Solution of Differential Equations

Simulating Stochastic Differential Equations

Reaction diffusion systems and pattern formation

Valuation, Pricing of Options / Use of MATLAB

NUMERICAL ANALYSIS OF OPEN CHANNEL STEADY GRADUALLY VARIED FLOW USING THE SIMPLIFIED SAINT-VENANT EQUATIONS

Parametric Curves. (Com S 477/577 Notes) Yan-Bin Jia. Oct 8, 2015

SOLVING LINEAR SYSTEMS

Discrete mechanics, optimal control and formation flying spacecraft

Pricing European and American bond option under the Hull White extended Vasicek model

Interactive simulation of an ash cloud of the volcano Grímsvötn

Scalar Valued Functions of Several Variables; the Gradient Vector

INTEGRAL METHODS IN LOW-FREQUENCY ELECTROMAGNETICS

Høgskolen i Narvik Sivilingeniørutdanningen STE6237 ELEMENTMETODER. Oppgaver

Numerical Resolution Of The Schrödinger Equation

Fast solver for the three-factor Heston-Hull/White problem. F.H.C. Naber tw

Direct Methods for Solving Linear Systems. Matrix Factorization

1 The Collocation Method

Pricing Options with Discrete Dividends by High Order Finite Differences and Grid Stretching

Example SECTION X-AXIS - the horizontal number line. Y-AXIS - the vertical number line ORIGIN - the point where the x-axis and y-axis cross

3. Reaction Diffusion Equations Consider the following ODE model for population growth

Part II: Finite Difference/Volume Discretisation for CFD

Florida Math Correlation of the ALEKS course Florida Math 0018 to the Florida Mathematics Competencies - Lower

Lecture 3 Fluid Dynamics and Balance Equa6ons for Reac6ng Flows

Optimization of Supply Chain Networks

To give it a definition, an implicit function of x and y is simply any relationship that takes the form:

(a) We have x = 3 + 2t, y = 2 t, z = 6 so solving for t we get the symmetric equations. x 3 2. = 2 y, z = 6. t 2 2t + 1 = 0,

ORDINARY DIFFERENTIAL EQUATIONS

Numerical Methods for Option Pricing

Heavy Parallelization of Alternating Direction Schemes in Multi-Factor Option Valuation Models. Cris Doloc, Ph.D.

Differentiation of vectors

Fourth-Order Compact Schemes of a Heat Conduction Problem with Neumann Boundary Conditions

Numerical Methods for Differential Equations

MATH 425, PRACTICE FINAL EXAM SOLUTIONS.

Vectors. Objectives. Assessment. Assessment. Equations. Physics terms 5/15/14. State the definition and give examples of vector and scalar variables.

Time domain modeling

Black-Scholes Option Pricing Model

Iterative Solvers for Linear Systems

is in plane V. However, it may be more convenient to introduce a plane coordinate system in V.

α = u v. In other words, Orthogonal Projection

Lecture Notes on the Mathematics of Finance

ME6130 An introduction to CFD 1-1

Numerical Methods For Image Restoration

Fluid Dynamics and the Navier-Stokes Equation

Introduction to CFD Basics

JUST THE MATHS UNIT NUMBER 1.8. ALGEBRA 8 (Polynomials) A.J.Hobson

Transcription:

Finite Difference Approach to Option Pricing February 998 CS5 Lab Note. Ordinary differential equation An ordinary differential equation, or ODE, is an equation of the form du = fut ( (), t) (.) dt where t is the time variable, u is a real or complex scalar or vector function of t, and f is a function. Initial value problem is to find a differentiable function ut () such that u( ) = u (.) du () t = fut ( (), t) for all t [, T] dt For the solution of ordinary differential equations, one of the most powerful discretization strategies is linear multistep methods. Let k > be a real number, the time step, and let t, t, t,... be defined t n = nk. Our goal is to construct a sequence of values v, v,... such that Let f n be the abbreviation v n ut ( n ) n (.3) = fv ( n, t n ). (.4) A linear multistep method is a formula for calculating each new value v n + from some of the previous values v,..., v n and f,..., f n. The simplest linear multistep method is a one step method : the Euler formula defined by f n + = v n + kf n v n Euler method is an example of an explicit one-step formula. (.5) A related linear multistep formula is the backward Euler, also a one-step formula, defined by + = v n + kf n + v n (.6) v n + To implement an implicit formula, one must employ a scheme to solve for the unknown, and this involves extra work.

The advantage of an implicit method is that in some situations it may be stable when an explicit one is catastrophically unstable. Throughout the numerical solution of differential equations, there is a tradeoff between explicit methods, which tend to be easier to implement, and implicit ones, which tend ot be more stable. Example - du dt = uu, ( ) = + = v n + kv n, v = (Euler method) v n + = v n + kv n +, v = (Backward Euler method) v n (.7) (.8) Example - More formulas Trapezoid rule(implicit one-step formula) + = v n + k -- ( f n + f n + ) v n (.9) Midpoint rule(explicit two-step formula) v n + = v n + kf n (.). Partial Differential Equation Partial differential equations fall roughly into three great classes which can be loosely described as follows elliptic -- time-dependent parabolic -- time-dependent and diffusive hyperbolic -- time-dependent and wave like The simplest example of a hyperbolic equation is u t the one-dimensional first-order wave equation, which describes advection of a quantity at the constant velocity. = u x (.) ux (, t)

The simplest example of a parabolic equation is u t = (.) the one-dimensional heat equation, which describes diffusion of a quantity such as heat or salinity. Let h > and kbe > a fixed space step and time step, respectively and set x j = and jh t n = nk for any integers j and n. The points ( x j, t n ) define a regular grid or mesh in two dimensions. n The aim of finite difference is to approximate continuous functions ux (, t) by grid functions v j, u x ux ( j, t n ) v n n represents the spatial grid function { for v j, a j fixed Z} value. n v j n (.3) The simplest kind of finite procedure is an s-step finite difference formula, which is a fixed n + formula that prescribes v j as a function of a finite number of other grid values at time steps n + s through n(explicit case) or n+ (implicit case). To compute an approximation n { v j } to ux (, t), we shall begin with initial data v,..., v s, and compute values v s, v s +,... in succession by applying finite difference formula. This process is sometimes known as marching with respect to t. Example u u k Finite difference approximations for the heat equation =, with σ = ----. t x h n + n n n n Euler : v j = v j + σ( v j + v j + v j ) n + n n + n + n + Backward Euler : v j = v j + σ( v j + v j + v j ) n + n n n n n + n + n + Crank-Nicholson : v j = v j + -- σ ( v j + v j + v j ) + -- σ ( v j + v j + v j ) (The above two sections are from unpublished manuscript of Lloyd N. Trefethen)

3. Option Pricing via Finite Difference Method 3. Implicit method(see lecture note for derivation and notation) Let f i, j denote the value of option price at the ( i, j) point, i.e., when tand = i t S. = j S Implicit method for American put option is a j f i, j b j f i, j c j f i, j + = f i +, for i j =...N,,, and j =...M,,, where a j = -- rj t -- σ j t b j = + σ j t+ r t c j = -- rj t -- σ j t (3.) (3.) MATLAB Implementation function put = imfdamput(smax, ds, T, dt, X, R, SIG); % put = imfdamput(smax, ds, T, dt, X, R, SIG); % Smax : maximum stock price % ds : increment of stock price % T : maturity date % dt : time step % X : exercise price % R : risk free interest rate % % reference : John C. Hull, Options, Futures, and Other Derivatives % 3rd Ed., Chap 5 M = ceil(smax/ds); ds = Smax / M; N = ceil(t/dt); dt = T / N; J = :M-; a =.5*R*dt*J -.5*SIG^*dt*J.^; b = + SIG^*dt*J.^ + R*dt; c = -.5*R*dt*J -.5*SIG^*dt*J.^; A = diag(b) + diag(a(:m-), -) + diag(c(:m-), ); put = zeros(n+, M+); put(n+, :) = max(x - [:ds:smax], ); put(:, ) = X; put(:, M+) = ; for i = N:-:

end y = put(i+, :M) ; y() = y() - a()*x; put(i, :M) = [A \ y] ; put(i, :) = max(x - [:ds:smax], put(i,:)); The following figure shows the American put option price when Smax = 5; ds = ; T = ; dt =.; X = 5; R =.; and SIG =.5;. 5 4 3.8.6.4. 5 5 Time Stock Price 3. Explicit Method The difference equation is where f i j, = a j f i +, j + b j f i +, j + c j f i +, j + a j = ----------------- -- rj t + -- σ j t + r t b j = ----------------- ( σ j + r t t ) c j ----------------- = + r t -- rj t + -- σ j t (3.3) (3.4) For the explicit method to be stable, all be positive. --rj t + -- σ j t, σ j t, -- rj t + -- σ j t should

MATLAB Implementation function put = exfdamput(smax, ds, T, dt, X, R, SIG); M = ceil(smax/ds); ds = Smax / M; N = ceil(t/dt); dt = T / N; J = :M-; a = (-.5*R*dt*J +.5*SIG^*dt*J.^) / (+R*dt); b = ( - SIG^*dt*J.^) / (+R*dt); c = (.5*R*dt*J +.5*SIG^*dt*J.^) / ( + R*dt); A = diag(b) + diag(a(:m-), -) + diag(c(:m-), ); put = zeros(n+, M+); put(n+, :) = max(x - [:ds:smax], ); put(:, ) = X; put(:, M+) = ; for i = N:-: end y = zeros(, M-); y() = a()*put(i+, ); y(m-) = c(m-)*put(i+,m+); put(i, :M) = put(i+, :M) * A + y; put(i, :) = max(x - [:ds:smax], put(i,:)); The following figure shows the unstability of the explict method with the wrong choice of Smax = ; ds = 5; T = ; dt =.; R =.; SIG =.4; and X = 5. American Put : Explicit FD 35 3 5 5 5 5.8.6 Time.4. 4 Stock Price 6 8 It s stable when Smax = 5; ds = 5; T = ; dt =.; X = 5; R =.; and SIG =.5.

American Put : Explicit FD 5 5 5.8.6 Time.4. Stock Price 3 4 5 3.3 Crank-Nicholson Method The Crank-Nicholson scheme is an average of the explicit and implicit methods. It s given by and g i, j = f i j, a j f i, j b j f i, j c j f i, j + (3.5) g i j, = a j f i, j + b j f i, j + c j f i, j + f i, j The implementation of the Crank-Nicholson method is similar to that of the implicit method. (3.6) MATLAB Implementation function put = cnfdamput(smax, ds, T, dt, X, R, SIG); M = ceil(smax/ds); ds = Smax / M; N = ceil(t/dt); dt = T / N; J = :M-; a = (-.5*R*dt*J +.5*SIG^*dt*J.^) / (+R*dt); b = ( - SIG^*dt*J.^) / (+R*dt); c = (.5*R*dt*J +.5*SIG^*dt*J.^) / ( + R*dt); A = diag(-b) + diag(-a(:m-), -) + diag(-c(:m-), ); aa =.5*R*dt*J -.5*SIG^*dt*J.^; bb = + SIG^*dt*J.^ + R*dt; cc = -.5*R*dt*J -.5*SIG^*dt*J.^; B = diag(bb-) + diag(aa(:m-), -) + diag(cc(:m-), );

g = zeros(, M-); put = zeros(n+, M+); put(n+, :) = max(x - [:ds:smax], ); put(:, ) = X; put(:, M+) = ; for i = N:-: end g = put(i+, :M) * A ; g() = g() - a()*x - aa()*x; put(i, :M) = [B \ g ] ; put(i, :) = max(x - [:ds:smax], put(i,:)); Using finite difference methods, we can get the boundary between the regions where it s optimal to exercise an American option or not. The following figure shows different boundaries for SIG =.:.:.9. The first curve from the right is when SIG =.. Free boundary : American Put Option.9.8.7.6 Time.5.4.3.. 3 4 5 6 7 8 9 Stock Price