Monte-Carlo Option Pricing. Victor Podlozhnyuk vpodlozhnyuk@nvidia.com



Similar documents
Black-Scholes option pricing. Victor Podlozhnyuk

Binomial option pricing model. Victor Podlozhnyuk

OpenCL Programming for the CUDA Architecture. Version 2.3

Parallel Prefix Sum (Scan) with CUDA. Mark Harris

Monte Carlo Method for Stock Options Pricing Sample

On Black-Scholes Equation, Black- Scholes Formula and Binary Option Price

NVIDIA VIDEO ENCODER 5.0

Numerical Methods for Option Pricing

Pricing Barrier Option Using Finite Difference Method and MonteCarlo Simulation

Binomial lattice model for stock prices

Application Note. nforce 220/420 Platform Installing nforce Core Drivers Under Windows 98

Technical Brief. NVIDIA nview Display Management Software. May 2009 TB _v02

A Comparison of Option Pricing Models

MONTE-CARLO SIMULATION OF AMERICAN OPTIONS WITH GPUS. Julien Demouth, NVIDIA

第 9 讲 : 股 票 期 权 定 价 : B-S 模 型 Valuing Stock Options: The Black-Scholes Model

American and European. Put Option

Moreover, under the risk neutral measure, it must be the case that (5) r t = µ t.

STCE. Fast Delta-Estimates for American Options by Adjoint Algorithmic Differentiation

2. Exercising the option - buying or selling asset by using option. 3. Strike (or exercise) price - price at which asset may be bought or sold


Call Price as a Function of the Stock Price

Two-State Option Pricing

Betting on Volatility: A Delta Hedging Approach. Liang Zhong

One Period Binomial Model

OPTIONS and FUTURES Lecture 2: Binomial Option Pricing and Call Options

Monte Carlo simulations and option pricing

LogNormal stock-price models in Exams MFE/3 and C/4

CS 522 Computational Tools and Methods in Finance Robert Jarrow Lecture 1: Equity Options

NVIDIA Tesla Compute Cluster Driver for Windows

The Intuition Behind Option Valuation: A Teaching Note

GPU Accelerated Monte Carlo Simulations and Time Series Analysis

NVIDIA GeForce GTX 580 GPU Datasheet

American Options. An Undergraduate Introduction to Financial Mathematics. J. Robert Buchanan. J. Robert Buchanan American Options

Option Premium = Intrinsic. Speculative Value. Value

Technical Brief. DualNet with Teaming Advanced Networking. October 2006 TB _v02

Caput Derivatives: October 30, 2003

NVIDIA CUDA GETTING STARTED GUIDE FOR MAC OS X

Monte Carlo Methods in Finance

Tegra Android Accelerometer Whitepaper

Assignment 2: Option Pricing and the Black-Scholes formula The University of British Columbia Science One CS Instructor: Michael Gelbart

The Black-Scholes Formula

Black-Scholes Option Pricing Model

Chapter 8 Financial Options and Applications in Corporate Finance ANSWERS TO END-OF-CHAPTER QUESTIONS

BINOMIAL OPTIONS PRICING MODEL. Mark Ioffe. Abstract

Optimizing Parallel Reduction in CUDA. Mark Harris NVIDIA Developer Technology

Option pricing. Vinod Kothari

Mathematical Finance

Overview. Lecture 1: an introduction to CUDA. Hardware view. Hardware view. hardware view software view CUDA programming

Atlas Creation Tool Using the Command-line Tool

Options (1) Class 19 Financial Management,

Lecture 12: The Black-Scholes Model Steven Skiena. skiena

The Valuation of Currency Options

NVIDIA NVIEW DESKTOP MANAGEMENT SOFTWARE

Exam MFE Spring 2007 FINAL ANSWER KEY 1 B 2 A 3 C 4 E 5 D 6 C 7 E 8 C 9 A 10 B 11 D 12 A 13 E 14 E 15 C 16 D 17 B 18 A 19 D

QUADRO POWER GUIDELINES

Finite Differences Schemes for Pricing of European and American Options

Application of options in hedging of crude oil price risk

NVIDIA GeForce Experience

1 The Black-Scholes Formula

GPU Christmas Tree Rendering. Evan Hart

How To Price A Call Option

Understanding Options and Their Role in Hedging via the Greeks

CUDA Basics. Murphy Stein New York University

Valuing equity-based payments

On Market-Making and Delta-Hedging

Valuation of Lease Contracts In Continuous Time With Stochastic Asset Values

Valuing Stock Options: The Black-Scholes-Merton Model. Chapter 13

Learn CUDA in an Afternoon: Hands-on Practical Exercises

Options Markets: Introduction

PERPETUITIES NARRATIVE SCRIPT 2004 SOUTH-WESTERN, A THOMSON BUSINESS

From CFD to computational finance (and back again?)

GPU Computing with CUDA Lecture 4 - Optimizations. Christopher Cooper Boston University August, 2011 UTFSM, Valparaíso, Chile

NVIDIA CUDA GETTING STARTED GUIDE FOR MICROSOFT WINDOWS

Management of Asian and Cliquet Option Exposures for Insurance Companies: SPVA applications (I)

Merton-Black-Scholes model for option pricing. Peter Denteneer. 22 oktober 2009

NVIDIA CUDA GETTING STARTED GUIDE FOR MAC OS X

Parallel Computing for Option Pricing Based on the Backward Stochastic Differential Equation

A Genetic Algorithm to Price an European Put Option Using the Geometric Mean Reverting Model

How To Write A Cg Toolkit Program

DERIVATIVE SECURITIES Lecture 2: Binomial Option Pricing and Call Options

Jorge Cruz Lopez - Bus 316: Derivative Securities. Week 11. The Black-Scholes Model: Hull, Ch. 13.

CUDA programming on NVIDIA GPUs

The interest volatility surface

QAD Enterprise Applications Standard Edition. Training Guide List/Discount Table Pricing

GTC 2014 San Jose, California

TABLE OF CONTENTS. A. Put-Call Parity 1 B. Comparing Options with Respect to Style, Maturity, and Strike 13

Assessing Credit Risk for a Ghanaian Bank Using the Black- Scholes Model

Example 1. Consider the following two portfolios: 2. Buy one c(s(t), 20, τ, r) and sell one c(s(t), 10, τ, r).

Hedging Variable Annuity Guarantees

Review of Basic Options Concepts and Terminology

Part A: The put call parity relation is: call + present value of exercise price = put + stock price.

XID ERRORS. vr352 May XID Errors

NVIDIA Tesla K20-K20X GPU Accelerators Benchmarks Application Performance Technical Brief

GRID VGPU FOR VMWARE VSPHERE

Lecture 5: Put - Call Parity

Chapter 13 The Black-Scholes-Merton Model

3. Monte Carlo Simulations. Math6911 S08, HM Zhu

EXP Capital Markets Option Pricing. Options: Definitions. Arbitrage Restrictions on Call Prices. Arbitrage Restrictions on Call Prices 1) C > 0

Whitepaper. NVIDIA Miracast Wireless Display Architecture

Transcription:

Monte-Carlo Option Pricing Victor Podlozhnyuk vpodlozhnyuk@nvidia.com

Document Change History Version Date Responsible Reason for Change 1. 3//7 vpodlozhnyuk Initial release

Abstract The pricing of options is a very important problem encountered in financial engineering since the creation of organized option trading in 1973. As more computation has been applied to finance-related problems, finding efficient ways to implement option pricing models on modern architectures has become more important. This sample shows an implementation of the Monte-Carlo approach to the problem of option pricing in CUDA. NVIDIA Corporation 71 San Tomas Expressway Santa Clara, CA 955 www.nvidia.com

Introduction The most common definition of an option is an agreement between two parties, the option seller and the option buyer, whereby the option buyer is granted a right (but not an obligation), secured by the option seller, to carry out some operation (or exercise the option) at some moment in the future. [1] Options come in several varieties: A call option grants its holder the right to buy some underlying asset (stock, real estate, or any other good with inherent value) at a fixed predetermined price at some moment in the future. The predetermined price is referred to as strike price, and future date is called expiration date. Similarly, a put option gives its holder the right to sell the underlying asset at a strike price on the expiration date. For a call option, the profit made at expiration date assuming a same-day sale transaction is the difference between the price of the asset at expiration date and the strike price, minus the option price. For a put option, the profit made at expiration date is the difference between the strike price and the price of the asset at expiration date, minus the option price. The price of the asset at expiration date and the strike price therefore strongly influence how much one would be willing to pay for an option. Other factors are: The time to the expiration date, T: Longer periods imply wider range of possible values for the underlying asset on the expiration date, and thus more uncertainty about the value of the option. The riskless rate of return, R, which is the annual interest rate of bonds or other riskfree investment: any amount P of dollars is guaranteed to be worth P e dollars T years rt from now if placed today in one of theses investments or in other words, if an asset is worth rt P dollars T years from now, it is worth P e today, which must be taken in account when evaluating the value of the option today. Exercise restrictions: So far only so-called European options, which can be exercised only on the expiration date, have been discussed. But options with different types of exercise restriction also exist. For example, American-style options are more flexible as they may be exercised at any time up to and including expiration date and as such, they are generally priced at least as high as corresponding European options.

The Monte-Carlo Method in Finance The price of the underlying asset S t follows a geometric Brownian motion with constant drift µ and volatility v : ds t = µ Stdt+ vs tdwt (where W t is Wiener random process: X = W W ~ N(, ) ). T T The solution of this equation is: ds S S t t = µ dt+ vdw S exp( µ T + N(, v The expected future value is: t T )) = S T = S exp( µ T + v( W exp( µ T + v E( S T ) = S exp( µ T ) E(exp( N(, v = S exp(( µ +.5v ) T ) T T )) = S W )) = S T N(,1)) exp( µ T + vn(, T )) = exp( µ T ) exp(.5v T ) = By definition, E( S T ) v = S exp( rt ) µ = r. 5, so S T = S exp(( r.5v ) T + v T N(,1)) - the possible stock end price, depending on the random sample N(, 1), describing how exactly the stock price was moving. The possible prices of derivatives at the period end are derived from the possible underlying asset s price: Vcall T ) = max( ST X,) (If the market stock price at the exercise date is greater than the strike price, a call option makes its holder a profit of S T X dollars, zero otherwise.) V put T ) = max( X ST,) (If the strike price at the exercise date is greater than the market stock price, a put option makes its holder profit of X ST, zero otherwise). One of the possible solutions to estimate the mathematical expectations of T ) and V put T ) is to take some amount of N(, 1) random samples, calculate the derivative endperiod prices corresponding to each of the samples, and average the generated prices: N Vi T ) i= Vmean T ) = 1 N This is the core of the Monte-Carlo approach to option pricing. r T e Discounting the approximation of future price by discount factor of we get an approximation of the present-day fair derivative price: V ) = V T ) e fair mean V call r T

Though in our particular problem closed-form expressions for E( V call T )) and E( V put T )) are known from the Black-Scholes formula, (which is used to compute reference analytical values for comparison against Monte-Carlo simulation results), in most applications of the Monte-Carlo approach closed-form expressions are unknown. Implementation Details The first stage of the computation is the generation of a normally distributed pseudorandom number sequence. For this sample we use a parallel version of the Mersenne Twister random number generator to generate a uniformly distributed [, 1] sequence, and the Cartesian form of the Box-Muller transformation to transform the distribution into a normal one. For more details on the efficient CUDA implementation of the Mersenne Twister and Box-Muller transformation please refer to the MersenneTwister SDK sample. Once we ve generated the desired amount of N(, 1) samples, the rest of the process of Monte-Carlo simulation maps very well onto the CUDA programming model: const int tid = blockdim.x * blockidx.x + threadidx.x; const int threadn = blockdim.x * griddim.x; //... for(int iaccum = tid; iaccum < accumn; iaccum += threadn){ float sum =, sum = ; for(int ipath = iaccum; ipath < pathn; ipath += accumn){ float r = d_random[ipath]; //... sum += endoptionprice; sum += endoptionprice * endoptionprice; } } d_sum[iaccum] = sum; d_sum[iaccum] = sum; Listing 1. Main pass of Monte-Carlo simulation.

Figure 1. The structure of the reduction loop. Each CUDA thread is responsible for the computation of several simulation paths and accumulation into several accumulators. Let s briefly describe the structure of the kernel: In this sample the computation grid can be simply treated as an implicit for loop, encapsulating the code of the CUDA kernel: for(tid = ; tid < threadn; tid++) MonteCarloKernelGPU(tid, ); The first level of nesting within the kernel is the accumulation loop; after the completion of iaccum iterations, ds_sum[iaccum] and ds_sum[iaccum] contain partial sums and partial sums of squares. The innermost loop performs the actual problem-related computations for dedicated indices in the random samples array d_random[] and accumulates the produced results into iaccum-th position of the accumulation arrays. After the kernel execution is complete, all the accumn accumulators and all the pathn simulation paths are covered. d_sum and d_sum now contain exactly accumn partial sums and partial sums of squares, which can be processed further. As long as accumn and the number of threads in the computation grid are multiples of the warp size (3), memory accesses are perfectly coalesced. The situation where the thread block sizes are not multiples of the warp size is very rare though, since normally there is no sense in having under-populated warps and thus hardware resources idling. The last stage of computation is the completion of the reduction and the computation of the present day fair option price value and the confidence width. Although this stage is carried out on the CPU and involves memory readback from the GPU, as long as accumn is small enough (we ve chosen 16384), this stage takes only a fraction of the total processing time.

Performance The time for processing a single option on an 8M sample domain is less than 11 ms on the GeForce88 GTX Conclusion This sample demonstrates that CUDA-enabled GPUs are capable of efficient Monte-Carlo simulation, significantly outperforming the best available CPU implementations in the field of option pricing.

Bibliography 1. Simon Leger : Monte Carlo techniques applied to finance,. http://homepages.nyu.edu/~sl1544/articles.html. Black, Fischer; Myron Scholes (1973). "The Pricing of Options and Corporate Liabilities". Journal of Political Economy 81 (3): 637-654. 3. Craig Kolb, Matt Pharr (5). Option pricing on the GPU. GPU Gems. Chapter 45.

Notice ALL NVIDIA DESIGN SPECIFICATIONS, REFERENCE BOARDS, FILES, DRAWINGS, DIAGNOSTICS, LISTS, AND OTHER DOCUMENTS (TOGETHER AND SEPARATELY, MATERIALS ) ARE BEING PROVIDED AS IS. NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. Information furnished is believed to be accurate and reliable. However, NVIDIA Corporation assumes no responsibility for the consequences of use of such information or for any infringement of patents or other rights of third parties that may result from its use. No license is granted by implication or otherwise under any patent or patent rights of NVIDIA Corporation. Specifications mentioned in this publication are subject to change without notice. This publication supersedes and replaces all information previously supplied. NVIDIA Corporation products are not authorized for use as critical components in life support devices or systems without express written approval of NVIDIA Corporation. Trademarks NVIDIA, the NVIDIA logo, GeForce, NVIDIA Quadro, and NVIDIA CUDA are trademarks or registered trademarks of NVIDIA Corporation in the United States and other countries. Other company and product names may be trademarks of the respective companies with which they are associated. Copyright 7 NVIDIA Corporation. All rights reserved.