Math Option pricing using Quasi Monte Carlo simulation

Similar documents
Math Computational Finance Double barrier option pricing using Quasi Monte Carlo and Brownian Bridge methods

Math Computational Finance Option pricing using Brownian bridge and Stratified samlping

Math Computational Finance Barrier option pricing using Finite Difference Methods (FDM)

ELEMENTS OF MONTE CARLO SIMULATION

2.1 Mathematical Basis: Risk-Neutral Pricing

Computational Finance Improving Monte Carlo

EFFICIENT MONTE CARLO ALGORITHM FOR PRICING BARRIER OPTIONS

Chapter 2 Uncertainty Analysis and Sampling Techniques

Monte Carlo Methods in Financial Engineering

On the Scrambled Sobol sequences Lecture Notes in Computer Science 3516, , Springer 2005

Assignment - Exotic options

Definition Pricing Risk management Second generation barrier options. Barrier Options. Arfima Financial Solutions

MONTE CARLO EXTENSIONS

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

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

Monte Carlo Methods in Finance

Financial Risk Modeling on Low-power Accelerators: Experimental Performance Evaluation of TK1 with FPGA

Market Volatility and Risk Proxies

Optimal Search for Parameters in Monte Carlo Simulation for Derivative Pricing

10. Monte Carlo Methods

Computer Exercise 2 Simulation

Financial Risk Forecasting Chapter 7 Simulation methods for VaR for options and bonds

History of Monte Carlo Method

King s College London

Computer Exercise 2 Simulation

King s College London

Market interest-rate models

Handbook of Financial Risk Management

Optimized Least-squares Monte Carlo (OLSM) for Measuring Counterparty Credit Exposure of American-style Options

Monte Carlo Methods for Uncertainty Quantification

The Black-Scholes Model

Monte Carlo Methods for Uncertainty Quantification

Stochastic Differential Equations in Finance and Monte Carlo Simulations

The Pennsylvania State University. The Graduate School. Department of Industrial Engineering AMERICAN-ASIAN OPTION PRICING BASED ON MONTE CARLO

AMSTERDAM BOSTON HEIDELBERG LONDON NEW YORK OXFORD PARIS SAN DIEGO SAN FRANCISCO SINGAPORE SYDNEY TOKYO Academic Press is an Imprint of Elsevier

Quasi-Monte Carlo for Finance

Contents Critique 26. portfolio optimization 32

Computational Finance

Monte Carlo Simulations

Brooks, Introductory Econometrics for Finance, 3rd Edition

Implementing Models in Quantitative Finance: Methods and Cases

Option Pricing Using Bayesian Neural Networks

EFFICIENCY IMPROVEMENT BY LATTICE RULES FOR PRICING ASIAN OPTIONS. Christiane Lemieux Pierre L Ecuyer

Pricing Asian Options

The Black-Scholes Model

CPSC 540: Machine Learning

Monte Carlo Methods in Structuring and Derivatives Pricing

Monte Carlo and Empirical Methods for Stochastic Inference (MASM11/FMSN50)

CPSC 540: Machine Learning

The accuracy of the escrowed dividend model on the value of European options on a stock paying discrete dividend

Stochastic Modelling in Finance

Monte Carlo Simulation of a Two-Factor Stochastic Volatility Model

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

4. Black-Scholes Models and PDEs. Math6911 S08, HM Zhu

Importance Sampling for Option Pricing. Steven R. Dunbar. Put Options. Monte Carlo Method. Importance. Sampling. Examples.

Week 1 Quantitative Analysis of Financial Markets Distributions B

1 The continuous time limit

MFE/3F Questions Answer Key

Math 416/516: Stochastic Simulation

Math 623 (IOE 623), Winter 2008: Final exam

MFE/3F Questions Answer Key

CS 774 Project: Fall 2009 Version: November 27, 2009

Risk Neutral Valuation

Barrier Option. 2 of 33 3/13/2014

Lecture outline. Monte Carlo Methods for Uncertainty Quantification. Importance Sampling. Importance Sampling

CFE: Level 1 Exam Sample Questions

Asian Option Pricing: Monte Carlo Control Variate. A discrete arithmetic Asian call option has the payoff. S T i N N + 1

MSc in Financial Engineering

by Kian Guan Lim Professor of Finance Head, Quantitative Finance Unit Singapore Management University

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

Sensitivity of American Option Prices with Different Strikes, Maturities and Volatilities

ASC Topic 718 Accounting Valuation Report. Company ABC, Inc.

Risk-Neutral Valuation

Black-Scholes Option Pricing

CHAPTER 10 OPTION PRICING - II. Derivatives and Risk Management By Rajiv Srivastava. Copyright Oxford University Press

Quasi-Monte Carlo for finance applications

As we saw in Chapter 12, one of the many uses of Monte Carlo simulation by

Cash Accumulation Strategy based on Optimal Replication of Random Claims with Ordinary Integrals

The Use of Importance Sampling to Speed Up Stochastic Volatility Simulations

Distortion operator of uncertainty claim pricing using weibull distortion operator

Quasi-Monte Carlo for Finance Applications

Notes. Cases on Static Optimization. Chapter 6 Algorithms Comparison: The Swing Case

We discussed last time how the Girsanov theorem allows us to reweight probability measures to change the drift in an SDE.

M.S. in Quantitative Finance & Risk Analytics (QFRA) Fall 2017 & Spring 2018

Rapid computation of prices and deltas of nth to default swaps in the Li Model

Monte Carlo and Empirical Methods for Stochastic Inference (MASM11/FMS091)

A Moment Matching Approach To The Valuation Of A Volume Weighted Average Price Option

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

AN IMPROVED BINOMIAL METHOD FOR PRICING ASIAN OPTIONS

ANALYSIS OF THE BINOMIAL METHOD

Computational Finance Binomial Trees Analysis

Strategies for Improving the Efficiency of Monte-Carlo Methods

BROWNIAN MOTION Antonella Basso, Martina Nardon

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

PROBABILITY. Wiley. With Applications and R ROBERT P. DOBROW. Department of Mathematics. Carleton College Northfield, MN

Accelerated Option Pricing Multiple Scenarios

Institute of Actuaries of India. Subject. ST6 Finance and Investment B. For 2018 Examinationspecialist Technical B. Syllabus

Short-time-to-expiry expansion for a digital European put option under the CEV model. November 1, 2017

Mathematics of Finance Final Preparation December 19. To be thoroughly prepared for the final exam, you should

An Analysis of a Dynamic Application of Black-Scholes in Option Trading

Transcription:

. Math 623 - Option pricing using Quasi Monte Carlo simulation Pratik Mehta pbmehta@eden.rutgers.edu Masters of Science in Mathematical Finance Department of Mathematics, Rutgers University This paper describes the implementation of a C++ program to calculate the value of a european style call option on an underlying asset, given input parameters for stock price (s=100), strike price (k=110),volatility (v=30%), interest rate (r=5%), maturity (T=1 year) using Quasi Monte Carlo simulation with low discrepancy Sobol sequences. We compare the results of Quasi Monti Carol method to that of the closed form solution, Monti Carlo with Park Miller and MC with antithetic sampling. The underlying stock price is assumed to follow geometric brownian motion. The program calculates the option prices using the Monte Carlo/Quasi MC method with 10,000 simulations and uses the solution to the Stochastic differential equation of the stock process [3]. I. INTRODUCTION In this assignment we are pricing a European style vanilla call option using low discrepancy Sobol sequences to generate Uniform (0,1) and then use the inverse cumulative distribution function to convert uniformly distributed variables to gaussian distribution. We use Monte Carlo simulation and the solution to the stochastic differential equation to calculate the option price at expiry and then discounting it. ds(t) = (rs(t)dt + σs(t)dw (t) (1) the solution to the above Stochastic Differential Equation is, S(T ) = S(0)e (r 1 2 σ2 )T +σw (T ) the payoff for the call option is, (2) (S(T ) k) + (3) We have modified Joshi s code from chapter 6 (RandomMain3.cpp), as was required for this assignment. II. CLOSED FORM BLACK-SCHOLES-MERTON Here, K is the strike price and S(T ) is the terminal stock price at the payoff date. The price of the underlying at terminal time,t, is given by [4] S(T ) = S(0)e (r a 1 2 σ2 )T +σw (T ) (4) A closed form solution for the price of a European Call and Put is given by [4] c(t, x) = xe at N(d + (T, x)) e rt KN(d (τ, x)) (5) and p(t, x) = e rt KN( d (T, x)) xe at N( d + (τ, x)). (6) Here, N is the Normal Cumulative Distribution density and the parameters, d + and d are given by d + = d + σ T = 1 [log σ xk (r T + + 12 ) ] σ2 T.(7) The function bsm in the file Random- Main3.cpp describes the implementation of the above closed form Black Scholes Merton model. The output is as follows, III. Closed f orm option price = 10.021 (8) MONTE CARLO WITH PARK-MILLER Park-Miller is one of the many random number generators thats are used to produce random samples for Monte Carlo simulation. It is on of the Linear Congruential Generators (LCG). It has a period of, 2 31 1 (9) The general form of a LCG generator is, x = initial seed a = multiplier m = modulus c = shift x i+1 = (ax i + c) mod m 1 (10) u i+1 = x i+1 /m 1 (11) The following are the values for the variables m = 2 31 1, a = 16807 (12)

2 Park Miller s uniform random number generator is implemented by Mark Joshi. We then pass these uniform values to inverse cumulative distribution to get normally distributed variables. We directly use it as-is. The only modification we do is that we turn off Antithetic sampling. The files ParkMiller.h and ParkMiller.cpp implements the function for the above formula as a class. The output for out call option is, MC vanilla call with P ark Miller = 10.2803 (13) IV. MONTE CARLO WITH PARK-MILLER WITH ANTITHETICS This method uses the same algorithm to generate samples. But the way we sample (number of samples independently taken) is different here. We take one sample using Park Miller and the use the negative of the same value as second sample. In this was we get the following equation S(t i+1 ) = S(t i )(1 + rτ + σ T Z i+1 ) (14) S(t i+1 ) = S(t i )(1 + rτ σ T Z i+1 ) (15) Using the above formula, we can reduce the variance of the samples.the result of Monte Carlo simulation on using the above variance reduction technique. The result of this method is, Ŷ AV = 1 + Y i n (Σni=1(Ỹi )) (16) 2 MC with P ark Miller and antithetics = 9.977 (17) V. QUASI MONTE CARLO WITH SOBOL SEQUENCE A major drawback of Monte Carlo integration with pseudo-random numbers is given by the fact that the error term scales only as 1/ N.This is inherent to methods based on random numbers.this leads to the idea to choose the points deterministically such that to minimize the integration error.low-discrepancy sequence is a sequence with the property that for all values of N, its subsequence x1,..., xn has a low discrepancy. Roughly speaking, the discrepancy of a sequence is low if the number of points in the sequence falling into an arbitrary set B is close to proportional to the measure of B, as would happen on average (but not for particular samples) in the case of a uniform distribution[5]. We now have the main theorem of quasi-monte Carlo integration: If f has bounded variation on [0, 1] d then for any x 1,..., x N [0, 1] d we have 1 N N n=1 f(x n ) dxf(x) V (f)d (x 1,..., x N ). (18) Sobol sequences [6] are obtained by first choosing a primitive polynomial over Z of degree g: P = x g + a 1 x g 1 +... + a g 1 x + 1, (19) where each a i is either 0 or 1. The coefficients a i are used in the recurrence relation v i = a 1 v i 1 a 2 v i 2... a g 1 v i g+1 v i g [v i g /2 (20) g ], where denotes the bitwise exclusive-or operation and each v i is a number which can be written as v i = m i /(2 i ) with 0 < m i < 2 i. Consequetive quasi-random numbers are then obtained from the relation x n+1 = x n v c, (21) where the index c is equal to the place of the rightmost zero-bit in the binary representation of n. For example n = 11 has the binary representation 1011 and the rightmost zero-bit is the third one. Therefore c = 3 in this case. For a primitive polynomial of degree g we also have to choose the first g values for the m i. The only restriction is that the m i are all odd and m i < 2 i. There is an alternative way of computing x n : x n = g 1 v 1 g 2 v 2... (22) where...g 3 g 2 g 1 is the Gray code representation of n. The basic property of the Gray code is that the representations for n and n + 1 differ in only one position. The Gray code representation can be obtained from the binary representation according to...g 3 g 2 g 1 =...b 3 b 2 b 1...b 4 b 3 b 2. (23) The above description of the sobol sequence generation was taken from [2].We have used Sobol sequence generator by S.Joe and R.Y.Kuo. We pass a file with the primitive polynomial and values of all the coefficient. This Sobol generator is capable of producing vary high dimensional sequences from 0 to 1. In our application we need only 1 dimensional sequence since we are evaluating a vanilla call option at expiry. We have implemented a function MCSobol in Sobol.cpp which uses sobol sequences to implement Quasi Monte Carlo simulation. The function sobolpoints returns an array with sobol sequences which are used for option price calculation. The price with this method is, QM C vanilla call with Sobol sequences = 10.007 (24) As we can see that the option price using sobol sequences and quasi monti carlo method is the closest to the closed formed solution. VI. ANALYSIS OF THE RESULTS, ADDITIONAL QUESTIONS AND PLOTS The table on the next page show the results from all four methods described above. We notice that the results

3 of all the methods are fairly accurate but using Sobol sequences gave the most accurate result. The reason why we use inverse transform instead of Marsaglia-Bray-Box- Muller is because the latter uses sines and cosines to approximate the value for the normal variable. This is time consuming which reduces the efficiency of the algorithm. Also we generated 2-dimensional plots of 1024 pairs of samples from uniform distribution over a unit square using Park-Miller generator and sobol sequences. The plots can be found on the next pages. Look at the plot one can tell that the sobol points are more uniformly distributed over a unit square than the Park-Miller points. Below are the summary statistics for 1-dimension sobol and parkmiller numbers. N umerix option price = 10.08 (31) Haug Excel option price = 10.02 (32) We used many different random number generation methods to calculate the value of European Call options using the closed form solution, Monte Carlo and Quasi Monti Carlo with Sobol sequences.we benchmarked the obtained results with the Numerix option value calculator and Haug Excel VBA calculator and found our results to be in reasonably good agreement with the value given by Numerix and the closed form solutions. Uniform dist : Mean = 0.5000 S.dev = 0.2886 (25) Sobol : Mean = 0.4995 S.dev = 0.2888 (26) P ark Miller : Mean = 0.5113 S.dev = 0.2832 (27) We can clearly see that sobol sequences are much more closer to the true uniform distribution than the ones generated by Park-Miller. VII. FURTHER DISCUSSION AND ANALYSIS For testing and debugging purposes we also compared the output of our Sobol generator (Joe s and Kuo s) to that of a lower dimensional generator. In this case we used the MATLAB code provided by Brandimarte (Get- Sobol.m) and modified it to sample 1024 points. For comparison purposes we have plotted all three of them in 1-dimension below. We also provide the summary statistics for them. Brandimater Sobol : M ean = 0.500 S.dev = 0.288(28) Joe s Sobol : Mean = 0.499 S.dev = 0.288(29) P ark Miller : Mean = 0.511 S.dev = 0.283(30) From the above summary statistics and the plot it is clear that our sobol generator has the same statistical properties as the sequence from a lower dimensional sobol generator. VIII. BENCHMARKING Numerix and the Excel spreadsheets by Haug does not provide the user the ability to produce Sobol sequences. Hence we have benchmarked our results using the closed form and monte carlo simulations in Numerix and Haug VBA sheets. Below are the option prices by both the methods. They are also presented in a tabular form with all the other 4 methods described above and implemented in C++.

4 FIG. 1: 2-D Sobol sequence, over a unit square. FIG. 2: 1-D Sobol sequence.

FIG. 4: Haug s Excel calculator 5 EuropeanCall Trade Input Deal Number Trade abc Book Book A Counterparty Bank X Y Z Trader Trader A Comment Comment here Deal Definition DealID EuropeanCall Buy (+1) Sell (-1) 1 Equity IBM Number of Options 1 Currency USD Business Center NewYork Strike 110 Equity Settlement Lag 2BD EndDate 6-Feb-2013 Pricing Model Model Selection CONSTVOL Quality 0 Valuation Date 2/6/12 Numerical Method Backward Lattice Valuation and Risk Pricer:EuroOpt 10.08 EQ Greeks:EuroOpt.Vega 0.40 EQ Greeks:EuroOpt.Delta 0.50 EQ Greeks:EuroOpt.Rho 0.00 EQ Greeks:EuroOpt.Gamma 0.01 Hyperlinks Skip Risk Reports Deal Object Nx_D_EuropeanCall_Deal_Object EQ Greeks FALSE Data Nx_D_EuropeanCall_Data Events Nx_D_EuropeanCall_Events Indices Nx_D_EuropeanCall_Indices Prices Nx_D_EuropeanCall_Prices Reports Nx_D_EuropeanCall_Reports Script Nx_D_EuropeanCall_Script FIG. 3: Numerix calculator. 1.Generalized BSM The generalized Black-Scholes-Merton option pricing formula Implementation By Espen Gaarder Haug Copyright 2006 Time in : Years Long Call Asset price ( S ) 100.00 Strike price ( X ) 110.00 Time to maturity ( T ) 1.0000 Risk-free rate ( r ) 5.00% Continuous Cost of carry ( b ) 5.00% Continuous Volatility ( σ ) 30.00% Forward Price 105.1271 Option Value 10.0201 ON By Espen Gaarder Haug

6 TABLE I: European Call pricing using different uniform generators for S(0)=100 and K=110 Option Closed Form Park-Miller Park-Miller with Antithetics Sobol sequence Numerix Haug European Call 10.021 10.28 9.977 10.007 10.08 10.02 TABLE II: Summary Stastistics for all three methods Stats Low-dimension Sobol Joe and Kuo ss obol Park-Miller uniforms Mean 0.4995 0.4995 0.5113 Standard Deviation 0.2882 0.2882 0.2836

[1] wwwthep.physik.uni-mainz.de/ stefanw/download/lecture [2] M.S. Joshi, C++ design Patterns and Derivative Pricing, (Wiley 2008). [3] S.E. Shreve, Stochastic Calculus for Finance II Continuous Time Models, (Springer, 2004). [4] Wikipedia page for low discrepancy sequence [5] I M Sobol, USSR comp. Math 7