Barrier 3

download Barrier 3

of 11

Transcript of Barrier 3

  • 7/30/2019 Barrier 3

    1/11Electronic copy available at: http://ssrn.com/abstract=1659248Electronic copy available at: http://ssrn.com/abstract=1659248

    1

    Path-Dependent Options Pricing: A Quasi Monte Carlo Simulation Approach

    with MATLAB

    Jay Au-Yeung

    The Chinese University of Hong Kong

    E-mail: [email protected]

    July 2010

    Abstract

    This paper presents a tailor-made discrete-time simulation model for valuing path-dependent options.In the context of a real-life application that is interest to many students, we illustrate the option

    pricing by using Quasi Monte Carlo simulation methods. We give an Asian option pricing which relies

    heavily on the underlying asset path as a case study with the implementation of MATLAB code.

    1 IntroductionPath-dependent option is a security that payoff at exercise or at expiry depends on the past history

    of the underlying asset price as well as its spot price at exercise or expiry. There are several types of

    path-dependent options, such as binaries (or digital options), compounds, choosers, barriers,lookbacks and Asian options. These types of options are well developed for currency and oil

    exchange in the international financial markets nowadays.

    Option pricing theory has a very long history since 1973. The well-developed PDE based Black-

    Scholes model presented a revolutionary change to the derivative industry. There are several

    approaches to the option pricing. A simplified approach is developed by Cox, Ross and Rubintein

    who applied binomial model for the option valuation. The Monte Carlo approach developed by

    Phelim (1977) simulating the process, in order to generate the returns on the underlying asset and

    invokes the risk neutrality assumption to derive the value of the option.

    The development of financial industry was very fast and innovative derivative related financial

    instruments which designed for hedging or leverage investment were developed in last decade.

    Derivative products valuation turns complicated, such as path-dependent option.

    This paper extends the Monte Carlo methods to Quasi Monte Carlo (QMC) method for the path-

    dependent option valuation. Section 2 illustrates the path-dependent nature of an option and how

    this property related to the low-discrepancy sequence. There is a brief introduction about the

  • 7/30/2019 Barrier 3

    2/11Electronic copy available at: http://ssrn.com/abstract=1659248Electronic copy available at: http://ssrn.com/abstract=1659248

    2

    Halton and Sobol sequences. In the section 3, there is a case study about QMC approach for Asian

    option pricing and the implementation of MATLAB code.

    2 The Model2.1 The Path-Dependent NatureThe starting point of path-dependent option pricing is the generation of sample paths of underlying

    asset price. Monte Carlo simulation is a conventional approach for vanilla option pricing. However,

    this approach is only suitable for the option price depends on the price of underlying at maturity.

    The Monte Carlo simulation generates random number for the underlying asset price at maturity

    and discount back to the present value.

    When we are going to value a path-dependent option, the whole underlying asset path is required

    to be considered. The simulation need to generate a sequence of underlying price at each timeinstant. For example, 24 underlying monthly price need to be simulated for an option mature in 2

    years which tequals to 1 month.

    2.2 Low-Discrepancy Path GenerationIn order to get the highest probability that the value of every single underlying asset price will be

    simulated in a sequence, we need a low-discrepancy sequence, instead of pseudo random sequence.

    Low-discrepancy sequence is a sequence of n-tuples that fills n-space more uniformly than

    uncorrelated pseudo random points. Each point is repelled from the others with the longest

    distance in a hypercube. This idea is possible for avoiding clustering. This case looks like that the

    underlying asset prices are plotting on a fine grid, and as fine as possible. The Quasi Monte Carlo

    method generates a sequence of random number on this fine grid in low-discrepancy.

    When the number of time instance increases, the dimension for the integration increases. It

    becomes a high-dimensional problem, which the lattice and PDE method are unable to be applied.

    The number of dimensions dis the number of discrete time intervals of one sample path, so d = T/t

    where T is the time period between current and the maturity. A finer grid can be constructed by

    using a smaller t. It implies that a good normal distribution of Brownian motion of asset price pathis able to be generated.

    In this paper, Halton and Sobol sequence, which are low-discrepancy sequences with different

    deterministic model, will be applied in the QMC for path-dependent option pricing.

  • 7/30/2019 Barrier 3

    3/11

    3

    2.3 The Basic Low-Discrepancy SequencesHalton sequence

    We are going to show how a Halton sequence can be generated.

    Generating Haltons low-discrepancy sequences:

    = (43210)Where b is a prime number

    = (0.01234 )An integer number n is for m-dimensional sequence,

    =

    =0

    The nth number in the Haltons sequence with base b is,

    (, ) = (+1)

    =0

    Halton sequences are obtained in multiple dimensions when a Van der Corput generator is

    associated to each dimension.

    % Halton.m generates low-discrepancy Halton sequence

    % NSteps = Number of steps (dimensions) between current and maturity

    % NRepl = Number of simulations per time instant

    f unct i on z_RandMat=Hal t on( NSt eps, NRepl )

    % qrandstream is a MATLAB function that constructs quasi-random number stream

    % Parameter Skip and Leap in function qrandstream skip the first 1000 values and

    % then retains every 101st point

    q = qr andst r eam( ' hal t on' , NSt eps, ' Ski p' , 1e3, ' Leap' , 1e2) ;

    % MATLAB function qrand generates quasi-random points from stream

    RandMat = qrand( q, NRepl ) ;

    % z_RandMat generates a NReplxNSteps matrix which values are normally

    % inveresed of the Halton sequence points

    z_ RandMat = normi nv(RandMat , 0, 1) ;

    end

    Figure 1 Halton.m

    MATLAB Statistics Toolbox is applied for the Halton sequence generation. Before the option pricing,

    underlying asset price path need to be constructed. Function Halton.m (Figure 1), qrandstream

    generates NSteps steps sequence and NRepl number of simulation for each time instant. The result

  • 7/30/2019 Barrier 3

    4/11

    4

    matrix is in the interval [0,1]. The function norminvcomputes the inverse of the normal cumulative

    distribution function using the corresponding (0,1)at the corresponding Halton sequence value.

    Sobol Sequence

    Sobol sequence is complex and MATLAB Statistics Toolbox is applied for the random sequence

    generation, so the concept covered here is only brief. Let{} be the digital representation inbase b=2, which is a binary number, of any integer n. The nth element of the Sobol sequence isdefined as,

    = 2

    +

    =1 1

    where [0,1) are directional numbers.The ith number of the sequence , ,{1,,}, is generated by XOR together the set of.Each Sobol sequence is based on a different primitive polynomial over the integers modulo 2, or apolynomial whose coefficients are either 0 or 1. Suppose p is such a polynomial of degree q,

    = + 11 + 22 + + 1 + 1Wherep is a polynomial of degree q

    Define a sequence of integers , by the qth term recurrence relation, = 2112222 21+1 + 1 (2 )

    where denotes the XOR operation. The starting values for the recurrence are 1, , that areodd integers chosen arbitrarily and less than 2 , , 2 , respectively. The directional number aregiven by,

    = 2 , = 1, ,

    where is the maximum number of digitsf unct i on z_RandMat=Sobol ( NSteps, NRepl )

    q = qr andst r eam( ' sobol ' , NSt eps, ' Ski p' , 1e3, ' Leap' , 1e2) ;

    RandMat = qrand( q, NRepl ) ;

    z_ RandMat = normi nv(RandMat , 0, 1) ;end

    Figure 2 Sobol.m

    Sobol.m (Figure 2) is similar to Halton.m. The only difference is that the first parameter in function

    qrandstream is replaced halton by sobol.

  • 7/30/2019 Barrier 3

    5/11

    5

    In the next section, there is a case study about the application of an Asian option pricing. Halton,

    Sobol and Pseudo sequence will be applied for the QMC. Different random sequences yield different

    pricing approximation results.

    3 Application: Option Pricing for Asian Call3.1 Geometric Brownian Motion of Asset PriceWe want to price an Asian Call option written on an underlying asset, which price under the risk-

    neutral measure, is modeled as a Geometric Brownian motion. The Brownian motion is the building

    block for time model in finance. Firstly, we need to simulate the underlying asset price path based

    on the Wiener process. LD random sequence is inputted to the Wiener process,

    The simplest discretization approach, known as Euler scheme, yields the following discrete-time

    model,

    = + = (, ) + (, )where is the discretization step and random variable ~(0,1), which is generated bysimulation.

    Geometric Brownian motion

    = + = 122 +

    where is a standard Brownian motion, asset price , drift and volatility

    3.2 Asian Option

    Asian option is an option which payoff depends on the average price of the underlying asset over a

    certain period of time as opposed to at maturity, also known as an average option. This type ofoption contract is attractive because it tends to cost less than regular American options. An Asian

    option can protect an investor from the volatility risk that comes with the market.

    They are commonly traded on currencies and commodity products which have low trading

    volumes. They were originally used in 1987 when Banker's Trust Tokyo office used them for

    pricing average options on crude oil contracts; and hence the name "Asian" option.

  • 7/30/2019 Barrier 3

    6/11

    6

    Different Asian options may be devised, depending on how the average is computed. Furthermore,

    the average may be arithmetic or geometric. The discrete arithmetic average is demonstrated in

    this case study,

    Payoff of Arithmetic Average Price Call,

    = max { , 0}Discrete Averaging of the asset underlying [rice generated by Wiener process,

    = 1

    {(1) + (2) + + ()}

    () = (log(0)+1 2 2,)where S(t) is a random lognormal variable with density function,

    () = 12 1 2 (log

    ())2 2

    can be priced by analytic approximation by applying Edgeworth series expansion, however, weare not going to discuss this method in this paper, QMC as a case study instead.

    For the conventional Monte Carlo method, pseudo random number is applied. Here is the MATLAB

    code, Pseudo.m (Figure 3), for pseudo random number sequence generation.

    % Pseudo.m generates pseudorandom number sequence

    % NSteps = Number of steps (number of dimensions) between current and maturity

    % NRepl = Number of simulations per time instant

    f unct i on z_RandMat=Pseudo( NSteps, NRepl )

    % z_RandMat generates a NReplxNSteps matrix which values are normally

    % inveresed of the pseudorandom number

    z_RandMat = normi nv( r and(NRepl , NSt eps) , 0, 1) ;

    end

    Figure 3 Pseudo.m

    Once the random sequence is generated, they can be inputted into the Wiener process. AsianC.m

    (Figure 4) firstly generates the underlying asset price path based on the geometric Brownian

    motion. The increment of underlying asset price changes with the random value. Then, it calculates

    the Asian option price by taking the arithmetic average for each time instant for each simulated

    path and discounts it back into the present value.

  • 7/30/2019 Barrier 3

    7/11

    7

    In this case study, an option with $50.00 strike and matures in 2 years. The current price is $50.00,

    risk-free rate equals to 1.00%, and standard deviation is 40.00%. 50,000 underlying asset price

    paths will be generated by simulation.

    % AsianC.m approximates the Arithmetic Average Asian Call option price% based on the Brownian motion of the underlying asset price with random sequence that

    % generated by Pseudo.m , Halton.m or Sobol.m

    % S0 = Current underlying asset price

    % K = Strike Price

    % mu = Risk-free rate

    % T = Time between current and the maturity

    % sigma = Square root of variance

    % NSteps = Number of steps (dimensions) between current and maturity

    % NRepl = Number of simulations per time instant

    f unct i on P=Asi anC( S0, K, mu, T, si gma, NSt eps, NRepl )

    dt = T/ NSteps;

    dr i f t = ( mu- 0. 5*si gma 2) *dt ;var i = si gma*sqr t ( dt ) ;

    I ncrement s = dr i f t + var i *Hal t on( NSt eps, NRepl ) ;

    LogPat hs = cumsum( [ l og( S0) *ones( NRepl , 1) , I ncr ement s] , 2) ;

    % Underlying asset price path

    SPaths = exp( LogPaths) ;

    Payof f = zeros( NRepl , 1) ;

    Payof f = max( 0, mean( SPat hs( : , 2: ( NSt eps+1) ) , 2) - K) ;

    P = mean( exp( - mu*T) * Payof f ) ;

    endFigure 4 AsianC.m

    3.3 Simulation ResultThe option price approximation varies when different random sequences are applied in the

    simulation.

    For pseudo random number sequence

    >> Asi anC( 50, 50, 0. 01, 2, 0. 4, 24, 50000)

    ans =

    6. 8669

    For Halton sequence

  • 7/30/2019 Barrier 3

    8/11

    8

    >> Asi anC( 50, 50, 0. 01, 2, 0. 4, 24, 50000)

    ans =

    6. 8422

    For Sobol sequence

    >> Asi anC( 50, 50, 0. 01, 2, 0. 4, 24, 50000)

    ans =

    6. 9126

    Figure 5

    0 5,000 10,000 15,000 20,000 25,000 30,000 35,000 40,000 45,000 50,0004

    4.5

    5

    5.5

    6

    6.5

    7

    7.5

    8

    8.5

    9

    9.5

    Number of Simulation

    OptionPrice

    Halton

    Sobol

  • 7/30/2019 Barrier 3

    9/11

    9

    Figure 6

    The option prices approximated by the three sequences are close together. The prices generated by

    the Halton and Sobol sequence tend to be stable after 50,000 times simulation. However, the

    frustration of price is very large by using pseudo random number, which is the default random

    sequence in Monte Carlo method (Figure 5, 6). It implies that exact solution is not available aftermass simulation.

    Standard deviation decreases across the range of number of simulation for the 3 random sequences

    (Figure 7). Their standard deviation drop continuously when the number of simulation increases.

    Obviously, the standard deviation of Halon and Sobol sequence are smaller that the pseudo random

    sequence. This statistical result explains the large frustration in pricing approximation by using

    conventional Monte Carlo method.

    The overall standard deviation of Halton sequence is lower than the Sobol sequence, but the

    variation is very small after 50,000 simulations. The result implies that the adoption of Halton or

    Sobol sequence in QMC is make-sense for the path-dependent option pricing, by comparing withpseudo random Monte Carlo method. Also, more simulations yield lower standard deviation and

    higher pricing approximation accuracy.

    0 5,000 10,000 15,000 20,000 25,000 30,000 35,000 40,000 45,000 50,0005

    5.5

    6

    6.5

    7

    7.5

    8

    8.5

    9

    9.5

    Number of Simulation

    OptionPrice

    Pseudo Random

  • 7/30/2019 Barrier 3

    10/11

    10

    Figure 7

    4 ConclusionThe application of Asian option pricing is just a small sample of possible problems for which QMC

    can provide more precise approximation for path-dependent option than conventional Monte Carlo

    methods with pseudo random number sequence in computational finance. It shows that QMC is a

    tailor-made method for path-dependent option pricing. It focuses on the particular path-dependentproperty. Other path-dependent options, like binaries (or digital options), compounds, choosers,

    barriers or lookbacks, can be priced by using QMC method. The implementation by using MATLAB

    provides an efficient way for random sequence generation, mass simulation and calculation.

    5 ReferencesBlack, Fischer; Myron Scholes (1973). The Pricing of Options and Corporate Liabilities, Journal of

    Political Economy

    Boyle, Phelim P., (1977). Options: A Monte Carlo approach, Journal of Financial Economics,

    Elsevier, vol. 4(3)

    Cox, John C. & Ross, Stephen A. & Rubinstein, Mark, (1979). Option pricing: A simplified approach,

    Journal of Financial Economics, Elsevier, vol. 7(3)

    0-5,000 5,000-10,000 10,000-15,000 15,000-20,000 20,000-25,000 25,000-30,000 30,000-35,000 35,000-40,000 40,000-45,000 45,000-50,0000

    0.05

    0.1

    0.15

    0.2

    0.25

    0.3

    0.35

    0.4

    0.45

    StandardDeviation

    Halton Sequence

    Pseudo Number

    Sobol Sequence

  • 7/30/2019 Barrier 3

    11/11

    11

    Harald G. Niederreiter (1978), Quasi-Monte Carlo methods and pseudo-random numbers, Bull.

    Amer. Math. Soc. 84, no. 6

    Kemna, A. G. Z. & Vorst, A. C. F., (1990). A pricing method for options based on average asset

    values,Journal of Banking & Finance, Elsevier, vol. 14(1)

    Morokoff, W. J. and Caflisch, R. E. (1994). Quasi-random sequences and their discrepancies, SIAMJ.

    Sci. Comput. 15, 6

    Niederreiter, Harald (1992), Random number generation and quasi-Monte Carlo methods, SIAM,

    p. 29

    Rogers, L.C.G.; Shi, Z. (1995), The Value of an Asian Option,Journal of Applied Probability32 (4)

    Smith, Clifford Jr., (1976). Option Pricing: A review, Journal of Financial Economics, Elsevier, vol.

    3(1-2)

    Turnbull, Stuart M. & Wakeman, Lee Macdonald, (1991). A Quick Algorithm for Pricing EuropeanAverage Options, Journal of Financial and Quantitative Analysis, Cambridge University Press, vol.

    26(03), pages 377-389