Numerical schemes for SDEs

Similar documents
Monte Carlo Simulations

AMH4 - ADVANCED OPTION PRICING. Contents

King s College London

Math 416/516: Stochastic Simulation

King s College London

Computer Exercise 2 Simulation

IEOR E4703: Monte-Carlo Simulation

Computational Finance. Computational Finance p. 1

- 1 - **** d(lns) = (µ (1/2)σ 2 )dt + σdw t

Computer Exercise 2 Simulation

Risk Neutral Valuation

Computational Finance

23 Stochastic Ordinary Differential Equations with Examples from Finance

Convergence Analysis of Monte Carlo Calibration of Financial Market Models

Lecture 17. The model is parametrized by the time period, δt, and three fixed constant parameters, v, σ and the riskless rate r.

Lecture Note 8 of Bus 41202, Spring 2017: Stochastic Diffusion Equation & Option Pricing

"Vibrato" Monte Carlo evaluation of Greeks

Simulating Stochastic Differential Equations

EFFICIENT MONTE CARLO ALGORITHM FOR PRICING BARRIER OPTIONS

Simulating more interesting stochastic processes

MASM006 UNIVERSITY OF EXETER SCHOOL OF ENGINEERING, COMPUTER SCIENCE AND MATHEMATICS MATHEMATICAL SCIENCES FINANCIAL MATHEMATICS.

1.1 Basic Financial Derivatives: Forward Contracts and Options

Module 10:Application of stochastic processes in areas like finance Lecture 36:Black-Scholes Model. Stochastic Differential Equation.

"Pricing Exotic Options using Strong Convergence Properties

STOCHASTIC CALCULUS AND BLACK-SCHOLES MODEL

Queens College, CUNY, Department of Computer Science Computational Finance CSCI 365 / 765 Fall 2017 Instructor: Dr. Sateesh Mane.

Lévy models in finance

2.1 Mathematical Basis: Risk-Neutral Pricing

Advanced Topics in Derivative Pricing Models. Topic 4 - Variance products and volatility derivatives

M5MF6. Advanced Methods in Derivatives Pricing

Sample Path Large Deviations and Optimal Importance Sampling for Stochastic Volatility Models

FINANCIAL OPTION ANALYSIS HANDOUTS

Stochastic Differential Equations in Finance and Monte Carlo Simulations

Lecture 11: Ito Calculus. Tuesday, October 23, 12

Option Pricing Models for European Options

The Black-Scholes Model

Multi-Asset Options. A Numerical Study VILHELM NIKLASSON FRIDA TIVEDAL. Master s thesis in Engineering Mathematics and Computational Science

Lecture 3. Sergei Fedotov Introduction to Financial Mathematics. Sergei Fedotov (University of Manchester) / 6

Barrier Option. 2 of 33 3/13/2014

1 Mathematics in a Pill 1.1 PROBABILITY SPACE AND RANDOM VARIABLES. A probability triple P consists of the following components:

The Black-Scholes Model

Monte Carlo Methods for Uncertainty Quantification

Lecture 4. Finite difference and finite element methods

NEWCASTLE UNIVERSITY SCHOOL OF MATHEMATICS, STATISTICS & PHYSICS SEMESTER 1 SPECIMEN 2 MAS3904. Stochastic Financial Modelling. Time allowed: 2 hours

The Use of Importance Sampling to Speed Up Stochastic Volatility Simulations

Numerical Methods for Stochastic Differential Equations with Applications to Finance

Stochastic Calculus, Application of Real Analysis in Finance

Stochastic Modelling in Finance

IEOR E4602: Quantitative Risk Management

TEST OF BOUNDED LOG-NORMAL PROCESS FOR OPTIONS PRICING

Monte Carlo Methods in Structuring and Derivatives Pricing

Monte Carlo Methods. Prof. Mike Giles. Oxford University Mathematical Institute. Lecture 1 p. 1.

Continuous Time Finance. Tomas Björk

Economathematics. Problem Sheet 1. Zbigniew Palmowski. Ws 2 dw s = 1 t

Valuation of performance-dependent options in a Black- Scholes framework

AD in Monte Carlo for finance

Probability in Options Pricing

Binomial model: numerical algorithm

Heston Model Version 1.0.9

1 The continuous time limit

Numerical Simulation of Stochastic Differential Equations: Lecture 1, Part 1. Overview of Lecture 1, Part 1: Background Mater.

Chapter 3: Black-Scholes Equation and Its Numerical Evaluation

The stochastic calculus

Multilevel quasi-monte Carlo path simulation

Reading: You should read Hull chapter 12 and perhaps the very first part of chapter 13.

Valuation of derivative assets Lecture 6

Lecture 7: Computation of Greeks

The Black-Scholes PDE from Scratch

Valuation of derivative assets Lecture 8

IEOR E4703: Monte-Carlo Simulation

Monte Carlo Methods for Uncertainty Quantification

Theory and practice of option pricing

An Efficient Numerical Scheme for Simulation of Mean-reverting Square-root Diffusions

Monte Carlo Methods in Option Pricing. UiO-STK4510 Autumn 2015

Quasi-Monte Carlo for Finance

Computing Greeks with Multilevel Monte Carlo Methods using Importance Sampling

1 Dynamics, initial values, final values

1. 2 marks each True/False: briefly explain (no formal proofs/derivations are required for full mark).

Optimal Search for Parameters in Monte Carlo Simulation for Derivative Pricing

Lecture 8: The Black-Scholes theory

STOCHASTIC VOLATILITY AND OPTION PRICING

Pricing Variance Swaps under Stochastic Volatility Model with Regime Switching - Discrete Observations Case

FINITE DIFFERENCE METHODS

2 f. f t S 2. Delta measures the sensitivityof the portfolio value to changes in the price of the underlying

Parameter estimation in SDE:s

Estimating the Greeks

BROWNIAN MOTION Antonella Basso, Martina Nardon

Stochastic Runge Kutta Methods with the Constant Elasticity of Variance (CEV) Diffusion Model for Pricing Option

Change of Measure (Cameron-Martin-Girsanov Theorem)

Module 4: Monte Carlo path simulation

Credit Risk : Firm Value Model

Introduction to Probability Theory and Stochastic Processes for Finance Lecture Notes

Variance Reduction for Monte Carlo Simulation in a Stochastic Volatility Environment

A new approach for scenario generation in risk management

Analytical formulas for local volatility model with stochastic. Mohammed Miri

5. Itô Calculus. Partial derivative are abstractions. Usually they are called multipliers or marginal effects (cf. the Greeks in option theory).

Basic Concepts in Mathematical Finance

Computational Finance Improving Monte Carlo

Continous time models and realized variance: Simulations

Interest Rate Curves Calibration with Monte-Carlo Simulatio

Transcription:

Lecture 5 Numerical schemes for SDEs Lecture Notes by Jan Palczewski Computational Finance p. 1

A Stochastic Differential Equation (SDE) is an object of the following type dx t = a(t,x t )dt + b(t,x t )dw t, X 0 = x. A solution is a stochastic process X(t), satisfying X t = X 0 + t 0 a(s,x s )ds + t 0 b(s,x s )dw s. Today we will study algorithms that can be used to solve SDEs. SDE s play a prominent role in a range of applications, including biology, chemistry, epidemiology, mechanics, microelectronics and, of course, finance. Computational Finance p. 2

An important SDE is the one for the stock price in the Black-Scholes model ds t = S t µdt + S t σdw t. This equation has an analytical solution and we can apply Monte Carlo techniques without further studies. However, for most SDE s occurring in practical applications, this is not the case. Take dx t = a(b X t )dt + c X t dw t. This SDE plays an important role in stochastic volatility models and in interest rate theory. It does not, in general, have an explicit solution. Computational Finance p. 3

Brownian motion For computational purposes is useful to consider discretized Brownian motion. We thus divide a time interval [0,T] into N subintervals by setting δt = T/N and t n = n δt = n T N, n = 0,...,N. Further, due to properties of Brownian motion we can simulate its values at the selected points by W tn+1 = W tn + W n, W t0 = W 0 = 0, where W n are independent random variables with distribution N(0, δt). Computational Finance p. 4

The stochastic integral T 0 σ s dw s is the limit of the approximating sum N n=0 σ tn (W tn+1 W tn ), as the mesh of the partition P = (t 0,t 1,...,t N ) of the interval [0,T] approaches zero, i.e. when δt goes to zero. Therefore, if δs small enough, the above formula is a good approximation for the stochastic integral. Computational Finance p. 5

Whas the algorithm to simulate the stochastic integral? How to measure the error of the approximation? Let us use the definition from the previous slide. one simulation - one omega (ω) Computational Finance p. 6

Euler-Maruyama scheme dx t = a(t,x t )dt + b(t,x t )dw t. The simplest numerical method for solving of SDEs is the stochastic Euler scheme (also called Euler-Maruyama scheme). For the above stochastic differential equation the scheme has the form X n+1 = X n + a(t n,x n )δt + b(t n,x n ) W n, where W n = W tn+1 W tn. Computational Finance p. 7

In order to obtain this scheme the following approximation is used tn+1 t n b(s,x s )dw s b(t n,x n ) W n, tn+1 t n a(s,x s )ds a(t n,x n )δt. Computational Finance p. 8

Testing the Euler scheme Let us reconsider the following SDE ds t = S t µdt + S t σdw t. We know that the exact solution is given by S t = S 0 e σw t+(µ 1 2 σ2 )t. Computational Finance p. 9

Inputs: T, N, mu, sigma, S0 delta_t = T/N Let N[0..N-1] be an array of N independent draws from N(0,1) W[0] = 0 For n = 0, 1,..., N-1 W[n+1] = W[n] + sqrt (delta_t) * N[n] S[0] = S0 For n = 0, 1,..., N-1 S[n+1] = S[n] + S[n] * mu * delta_t + S[n] * sigma * (W[n+1] - W[n]) Output: S[N] Computational Finance p. 10

We can now vary the step size in order to get some idea about the approximation error. We will measure the performance in two ways. We make M independent runs of the algorithm and compute 1 M M m=1 S 0 e σw m [N]+(µ σ2 )T 2 S m [N] E S T S[N] E (S 0 e σw T+(µ σ2 )T) 2 1 M M m=1 S m [N] ES T ES[N] Computational Finance p. 11

Convergence of schemes for SDEs When writing algorithms we use the following notation: t n = n δt, X n is the computed value at t n. To study convergence of numerical schemes we have to introduce a new notation: denotes a process that results from connecting of the points obtained by a numerical scheme with straight lines, i.e. Xt δt X δt t = X n + t t n t n+1 t n (X n+1 X n ), if t [t n,t n+1 ). δs the step size used in the algorithm. X s the exact solution. Computational Finance p. 12

Denote by (Xt δt ) the result of a simulation with the step δt. The numerical scheme is strongly convergenf ( ) lim E X T XT δt = 0. δt 0 The numerical scheme is weakly convergenf for every polynomial g. lim Eg(XT ) Eg(XT δt ) = 0 δt 0 Computational Finance p. 13

The Euler-Maruyama scheme is strongly and weakly convergent. Unfortunately, is not unconditional. For example the following conditions are sufficient: 1) functions a( ) and b( ) are four times continuously differentiable and their first derivatives are bounded, and 2) they do not grow too fast with parameters. Since the Euler-Maruyama scheme proved to be an approximation of the solution to the SDE, we may ask how good this approximation is. This gives rise to the notion of convergence order. Computational Finance p. 14

Convergence orders The numerical scheme is strongly convergent with order γ if ( ) E X T XT δt K T (δt) γ. The constant K T depends on T and the considered SDE. The numerical scheme is weakly convergent with order γ if Eg(XT ) Eg(X δt T ) K g T (δt)γ for every polynomial g. The constant K g T the considered SDE. depends on T, g, and Computational Finance p. 15

Convergence order explained If a numerical scheme is convergent with order γ, and we make the step k times smaller then the approximation error will decrease by a factor of k γ. Therefore, the order equal 1 means thaf we want to decrease error 100 times, we have to make the step 100 times smaller. The order equal to 1/2 means thaf we want to decrease error 100 times, we have to make the step 100 2 = 10 000 times smaller. And the computation time grows by the same factor. Computational Finance p. 16

Euler-Maruyama scheme is weakly convergent with order 1, strongly convergent with order 0.5. Milstein scheme, which we shall study in a moment, is weakly convergent with order 1, strongly convergent with order 1. Weak convergence: distribution at moment T only, useful for pricing of European path-independent options. Strong convergence: pathwise property, should be used if whole paths play a role! good for path-dependent options. Computational Finance p. 17

Consequently, Euler-Maruyama scheme can be successfully applied to pricing of path-independent options (options with payoffs depending only the stock price at the moment of exercise) i.e. of the form h(s T ). This is caused by its poor strong convergence order. If you make the step 100 times smaller, the approximation improves only by a factor of 10. Remember that the step cannot be too small because of: 1. (computational errors) errors caused by computations in a computer with the use of finite precision numbers (with finite number of digits), 2. computation time. Computational Finance p. 18

Milstein scheme We will limit ourselves to the following type of SDEs dx t = a(x t )dt + b(x t )dw t, X 0 = x. X 0 = x, X n+1 = X n + a(x n )δt + b(x n ) W n + 1 2 b (X n )b(x n ) ( ( W n ) 2 δt ) Here b is the first derivative of b. Computational Finance p. 19

Derivation of Milstein scheme Milstein scheme is obtained as a result of application of stochastic Taylor expansion, or more easily, by Ito formula. Consider the homogeneous scalar stochastic differential equation dx t = a(x t )dt + b(x t )dw t and let, +1 be two consecutive points in our time discretization. Computational Finance p. 20

The Ito formula says, that for a given function f which is two times continuously differentiable, we can write s f(x s ) = f(x ti )+ (f (X u )a(x u ) + 12 ) s f (X u )b(x u ) 2 du+ f (X u )b(x u )dw u We can apply the Ito formula on the expressions a(x s ) and b(x s ), which are the coefficients in our SDE. We then obtain X ti+1 = X ti + + + + s ti+1 ( a(x ti ) + a (X u )b(x u )dw u ( s b(x ti ) + ti+1 s b (X u )b(x u )dw u ) ds s ( a (X u )a(x u ) + 1 ) 2 a (X u )b 2 (X u ) du ( b (X u )a(x u ) + 1 ) 2 b (X u )b 2 (X u ) du ) dw s. Computational Finance p. 21

We want to achieve a method which converges strongly of order 1. By using a time discretization, the differentials dw and dt are replaced by the corresponding discrete versions W and δt. We have δt δt = O((δt) 2 ), W δt = O((δt) 3/2 ), W W = O(δt). Therefore: If we are up for a method which converges strongly of order 1, we can neglect the double integrals from the previous slide, which are of type dw s ds and ds ds. Computational Finance p. 22

We then obtain X ti+1 X ti + + ti+1 ti+1 ( b(x ti ) + a(x ti )ds s X ti + a(x ti )δt + b(x ti ) W i + ) b (X u )b(x u )dw u dw s ti+1 s b (X u )b(x u )dw u dw s The first two summands in the equation above are well known from the Euler-Maruyama scheme. The third one is new. We approximate the third term above by ti+1 s b (X u )b(x u )dw u dw s b (X ti )b(x ti ) ti+1 s dw u dw s. Computational Finance p. 23

The integral on the right hand side of the last equality is well known from Continuous Time Finance. We obtain b (X ti )b(x ti ) ti+1 s dw u dw s = 1 2 b (X ti )b(x ti ) ( ( W i ) 2 δt ) Substituting this in our previous approximation we finally obtain the Milstein scheme X 0 = x, X n+1 = X n + a(x n )δt + b(x n ) W n + 1 2 b (X n )b(x n ) ( ( W n ) 2 δt ) One can prove that the Milstein scheme converges strongly with order 1 to the solution of the SDE. Computational Finance p. 24

Multidimensional Stochastic Differential Equations Sometimes an SDE is multidimensional. In this case a(t, x) is a vector valued function, b(t,x) is a matrix valued function and W is a multidimensional Brownian motion. The solution X is then a vector valued stochastic process. A multidimensional Brownian motion is a vector process with the following properties: a) every coordinate is a Brownian motion b) coordinates are pairwise independent Computational Finance p. 25

How to simulate multi-dimensional Brownian motion? W t = (W 1 t,w 2 t,...,w d t ). How to solve a multidimensional SDE? dx t = a(t,x t )dt + b(t,x t )dw t, X t = (X 1 t,x 2 t,...,x d t ). Computational Finance p. 26

Stochastic Volatility Models Stochastic volatility models are asset dynamics models in which volatility is itself a random object. The following system of two SDE s represents a basic version of Heston s stochastic volatility model, but there are many other SV models used in practice. ds t = S t µdt + S t Vt dw 1 t, dv t = (σ 0 V t )dt + V t dw 2 t. S t represents the price of a stock, V t the volatility is the solution of an SDE. Computational Finance p. 27

To compute the price of a European option with payoff h(s T ) in the stochastic volatility model we combine the results of last two lectures: numerical solution of SDEs and Monte Carlo. We assume, of course, that the SDE we simulate is given with respect to a risk neutral measure, so that the price is computed as an expectation. For m=1, 2,..., M S[m] = price at T simulated with the Euler-Maruyama algorithm C[m] = exp(-rt) * h(s[m]) C = C[1] +... + C[M] price = C/M B = ( (C[1] - price)ˆ2 +... + (C[M] - price)ˆ2 ) / (M-1) Result: the price, the confidence interval Computational Finance p. 28