asianbyls

Price European or American Asian option using Longstaff-Schwartz model

Syntax

  • Price = asianbyls(RateSpec,StockSpec,OptSpec,Strike,Settle,
    ExerciseDates)
    example
  • Price = asianbyls(___,Name,Value)
  • [Price,Paths,Times,Z] = asianbyls(RateSpec,StockSpec,OptSpec,Strike,Settle,
    ExerciseDates)
    example
  • [Price,Paths,Times,Z] = asianbyls(___,Name,Value)

Description

example

Price = asianbyls(RateSpec,StockSpec,OptSpec,Strike,Settle,
ExerciseDates)
returns fixed- and floating-strike Asian option prices using the Longstaff-Schwartz model. asianbyls computes prices of European and American Asian options. For American options, the Longstaff-Schwartz least squares method is used to calculate the early exercise premium. To compute the value of a floating-strike Asian option, Strike should be specified as NaN. Fixed-strike Asian options are also known as average price options and floating-strike Asian options are also known as average strike options.

Price = asianbyls(___,Name,Value) returns fixed- and floating-strike Asian option prices using optional name-value pair arguments and the Longstaff-Schwartz model. asianbyls computes prices of European and American Asian options. For American options, the Longstaff-Schwartz least squares method is used to calculate the early exercise premium. To compute the value of a floating-strike Asian option, Strike should be specified as NaN. Fixed-strike Asian options are also known as average price options and floating-strike Asian options are also known as average strike options.

example

[Price,Paths,Times,Z] = asianbyls(RateSpec,StockSpec,OptSpec,Strike,Settle,
ExerciseDates)
returns fixed- and floating-strike Asian option Price, Paths, Times, and Z values using the Longstaff-Schwartz model. asianbyls computes prices of European and American Asian options. For American options, the Longstaff-Schwartz least squares method is used to calculate the early exercise premium. To compute the value of a floating-strike Asian option, Strike should be specified as NaN. Fixed-strike Asian options are also known as average price options and floating-strike Asian options are also known as average strike options.

[Price,Paths,Times,Z] = asianbyls(___,Name,Value) returns fixed and floating strike Asian option Price, Paths, Times, and Z values using optional name-value pair arguments and the Longstaff-Schwartz model. asianbyls computes prices of European and American Asian options. For American options, the Longstaff-Schwartz least squares method is used to calculate the early exercise premium. To compute the value of a floating-strike Asian option, Strike should be specified as NaN. Fixed-strike Asian options are also known as average price options and floating-strike Asian options are also known as average strike options.

Examples

expand all

Compute the Price of an Asian Option Using the Longstaff-Schwartz Model

Define the RateSpec.

Rates = 0.05;
StartDate = 'Jan-1-2013';
EndDate = 'Jan-1-2014';
RateSpec = intenvset('ValuationDate', StartDate, 'StartDates', StartDate, ...
'EndDates', EndDate,'Compounding', -1, 'Rates', Rates)
RateSpec = 

           FinObj: 'RateSpec'
      Compounding: -1
             Disc: 0.9512
            Rates: 0.0500
         EndTimes: 1
       StartTimes: 0
         EndDates: 735600
       StartDates: 735235
    ValuationDate: 735235
            Basis: 0
     EndMonthRule: 1

Define the StockSpec for the asset.

AssetPrice = 100;
Sigma = 0.2;
StockSpec = stockspec(Sigma, AssetPrice)
StockSpec = 

             FinObj: 'StockSpec'
              Sigma: 0.2000
         AssetPrice: 100
       DividendType: []
    DividendAmounts: 0
    ExDividendDates: []

Define the Asian 'call' option.

Settle = 'Jan-1-2013';
ExerciseDates = 'Jan-1-2014';
Strike = 110;
OptSpec = 'call';

Compute the price for the European arithmetic average price for the Asian option using the Longstaff-Schwartz model.

NumTrials = 10000;
NumPeriods = 100;
AvgType = 'arithmetic';
Antithetic= true;
Price= asianbyls(RateSpec, StockSpec, OptSpec, Strike, Settle, ExerciseDates, ...
'NumTrials', NumTrials, 'NumPeriods', NumPeriods,'Antithetic', Antithetic, 'AvgType', AvgType)
Price =

    1.9693

Input Arguments

expand all

RateSpec — Interest-rate term structurestructure

Interest-rate term structure (annualized and continuously compounded), specified by the RateSpec obtained from intenvset. For information on the interest-rate specification, see intenvset.

Data Types: struct

StockSpec — Stock specification for underlying assetstructure

Stock specification for underlying asset, specified using StockSpec obtained from stockspec. For information on the stock specification, see stockspec.

stockspec can handle other types of underlying assets. For example, stocks, stock indices, and commodities. If dividends are not specified in StockSpec, dividends are assumed to be 0.

Data Types: struct

OptSpec — Definition of optionstring with a value of 'call'or 'put'

Definition of option, specified as 'call' or 'put' using a string.

Data Types: char

Strike — Option strike price valuenonnegative scalar integer

Option strike price value, specified with a nonnegative scalar integer. To compute the value of a floating-strike Asian option, Strike should be specified as NaN. Floating-strike Asian options are also known as average strike options.

Data Types: double

Settle — Settlement or trade datedate string | nonnegative scalar integer

Settlement or trade date for the Asian option, specified as a nonnegative scalar integer or date string.

Data Types: char

ExerciseDates — Option exercise datesdate string | nonnegative scalar integer

Option exercise dates, specified as a nonnegative scalar integer or date string:

  • For a European option, use a 1-by-1 vector of dates. For a European option, there is only one ExerciseDates on the option expiry date.

  • For an American option, use a 1-by-2 vector of exercise date boundaries. The option can be exercised on any date between or including the pair of dates on that row. If only one non-NaN date is listed, or if ExerciseDates is a 1-by-1 vector of serial date numbers or cell array of strings, the option can be exercised between Settle and the single listed ExerciseDates.

Data Types: char

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: Price = asianbyls(RateSpec,StockSpec,OptSpec,Strike,Settle,ExerciseDates,'NumTrials',NumTrials,'NumPeriods',NumPeriods,'Antithetic',Antithetic,'AvgType',AvgType)

'AmericanOpt' — Option type0 European (default) | scalar with value [0,1]

Option type, specified as NINST-by-1 positive integer scalar flags with values:

  • 0 — European

  • 1 — American

Data Types: single | double

'AvgType' — Average typesarithmetic (default) | string with values of arithmetic or geometric

Average types, specified as arithmetic for arithmetic average, or geometric for geometric average.

Data Types: double

'AvgPrice' — Average price of underlying asset at Settlescalar

Average price of underlying asset at Settle, specified as a scalar.

    Note:   Use this argument when AvgDate < Settle.

Data Types: double

'AvgDate' — Date averaging period beginsscalar

Date averaging period begins, specified as a scalar.

Data Types: double

'NumTrials' — Simulation trials1000 (default) | scalar

Simulation trials, specified as a scalar number of independent sample paths.

Data Types: double

'NumPeriods' — Simulation periods per trial100 (default) | scalar

Simulation periods per trial, specified as a scalar number. NumPeriods is considered only when pricing European Asian options. For American Asian options NumPeriod is equal to the number of exercise days during the life of the option.

Data Types: double

'Z' — Dependent random variatesscalar | nonnegative integer

Dependent random variates used to generate the Brownian motion vector (i.e., Wiener processes) that drive the simulation, specified as a NumPeriods-by-2-by-NumTrials 3-D time series array.

Data Types: single | double

'Antithetic' — Indicator for antithetic samplingfalse (default) | logical flag with value of true or false

Logical flag to indicate antithetic sampling, specified with a value of true or false.

Data Types: logical

Output Arguments

expand all

Price — Expected price of Asian optionscalar

Expected price of the Asian option, returned as a 1-by-1 scalar.

Paths — Simulated paths of correlated state variablesvector

Simulated paths of correlated state variables, returned as a (NumPeriods + 1)-by-1-by-NumTrials 3-D time series array. Each row of Paths is the transpose of the state vector X(t) at time t for a given trial.

Times — Observation times associated with simulated pathsvector

Observation times associated with the simulated paths, returned as a (NumPeriods + 1)-by-1 column vector of observation times associated with the simulated paths. Each element of Times is associated with the corresponding row of Paths.

Z — Dependent random variates vector

Dependent random variates, returned, if Z is specified as an optional input argument, the same value is returned. Otherwise, Z contains the random variates generated internally.

More About

Was this topic helpful?