Main Content

asiansensbyls

Calculate price and sensitivities for European or American Asian options using Monte Carlo simulations

Description

PriceSens = asiansensbyls(RateSpec,StockSpec,OptSpec,StrikeSettle,ExerciseDates) returns Asian option prices or sensitivities for fixed- and floating-strike Asian options using the Longstaff-Schwartz model. asiansensbyls supports 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.

Note

Alternatively, you can use the Asian object to calculate prices or sensitivities for Asian options. For more information, see Get Started with Workflows Using Object-Based Framework for Pricing Financial Instruments.

PriceSens = asiansensbyls(___,Name,Value) returns Asian option prices or sensitivities for fixed- and floating-strike Asian options using optional name-value pair arguments and the Longstaff-Schwartz model.

[PriceSens,Path,Times,Z] = asiansensbyls(RateSpec,StockSpec,OptSpec,StrikeSettle,ExerciseDates) returns Asian option prices or sensitivities (PriceSens, Path, Times, and Z) for fixed- and floating-strike Asian options using the Longstaff-Schwartz model.

[PriceSens,Path,Times,Z] = asiansensbyls(___,Name,Value) returns Asian option prices or sensitivities (PriceSens, Path, Times, and Z) for fixed- and floating-strike Asian options using optional name-value pair arguments and the Longstaff-Schwartz model.

Examples

collapse all

Define the RateSpec.

Rates = 0.05;
StartDate = datetime(2013,1,1);
EndDate = datetime(2014,1,1);
RateSpec = intenvset('ValuationDate', StartDate, 'StartDates', StartDate, ...
'EndDates', EndDate,'Compounding', -1, 'Rates', Rates)
RateSpec = struct with fields:
           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 = struct with fields:
             FinObj: 'StockSpec'
              Sigma: 0.2000
         AssetPrice: 100
       DividendType: []
    DividendAmounts: 0
    ExDividendDates: []

Define the Asian 'call' option.

Settle = datetime(2013,1,1);
ExerciseDates = datetime(2014,1,1);
Strike = 110;
OptSpec = 'call';

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

NumTrials = 10000;
NumPeriods = 100;
AvgType = 'arithmetic';
Antithetic= true;
OutSpec = {'Price', 'Delta', 'Gamma'};
PriceSens = asiansensbyls(RateSpec, StockSpec, OptSpec, Strike, Settle, ExerciseDates, ...
'NumTrials', NumTrials, 'NumPeriods', NumPeriods,'Antithetic', Antithetic, 'AvgType', ...
AvgType,'OutSpec',OutSpec)
PriceSens = 1.9876

Input Arguments

collapse all

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

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

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

Data Types: char

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

Settlement date or trade date for the Asian option, specified as a scalar datetime, string, or date character vector.

To support existing code, asiansensbyls also accepts serial date numbers as inputs, but they are not recommended.

Option exercise dates, specified as a datetime array, string array, or date character vectors:

  • 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 dates, the option can be exercised between Settle and the single listed ExerciseDates.

To support existing code, asiansensbyls also accepts serial date numbers as inputs, but they are not recommended.

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: PriceSens = asiansensbyls(RateSpec,StockSpec,OptSpec,Strike,Settle,ExerciseDates,'NumTrials',NumTrials,'NumPeriods', NumPeriods,'Antithetic',Antithetic,'AvgType',AvgType,'OutSpec',{'All'})

Option type, specified as the comma-separated pair consisting of 'AmericanOpt' and a NINST-by-1 positive integer scalar flags with values:

  • 0 — European

  • 1 — American

Note

For American options, the Longstaff-Schwartz least squares method is used to calculate the early exercise premium. For more information on the least squares method, see https://people.math.ethz.ch/%7Ehjfurrer/teaching/LongstaffSchwartzAmericanOptionsLeastSquareMonteCarlo.pdf.

Data Types: single | double

Average types, specified as the comma-separated pair consisting of 'AvgType' and arithmetic for arithmetic average, or geometric for geometric average.

Data Types: char

Average price of underlying asset at Settle, specified as the comma-separated pair consisting of 'AvgPrice' and a scalar numeric value.

Note

Use this argument when AvgDate < Settle.

Data Types: double

Date averaging period begins, specified as the comma-separated pair consisting of 'AvgDate' and a scalar datetime, string, or data character vector.

To support existing code, asiansensbyls also accepts serial date numbers as inputs, but they are not recommended.

Simulation trials, specified as the comma-separated pair consisting of 'NumTrials' and a scalar number of independent sample paths.

Data Types: double

Simulation periods per trial, specified as the comma-separated pair consisting of 'NumPeriods' and a scalar numeric value. 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

Dependent random variates used to generate the Brownian motion vector (that is, Wiener processes) that drive the simulation, specified as the comma-separated pair consisting of 'Z' and a NumPeriods-by-2-by-NumTrials 3-D time series array.

Data Types: single | double

Indicates antithetic sampling, specified as the comma-separated pair consisting of 'Antithetic' and a value of true or false.

Data Types: logical

Define outputs, specified as the comma-separated pair consisting of 'OutSpec' and a NOUT- by-1 or 1-by-NOUT cell array of character vectors with possible values of 'Price', 'Delta', 'Gamma', 'Vega', 'Lambda', 'Rho', 'Theta', and 'All'.

OutSpec = {'All'} specifies that the output should be Delta, Gamma, Vega, Lambda, Rho, Theta, and Price, in that order. This is the same as specifying OutSpec to include each sensitivity:

Example: OutSpec = {'delta','gamma','vega','lambda','rho','theta','price'}

Data Types: char | cell

Output Arguments

collapse all

Expected price or sensitivities (defined by OutSpec) of the Asian option, returned as a 1-by-1 array.

Simulated paths of correlated state variables, returned as a (NumPeriods + 1)-by-2-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.

Observation times associated with 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.

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

collapse all

Asian Option

An Asian option is a path-dependent option with a payoff linked to the average value of the underlying asset during the life (or some part of the life) of the option.

Asian options are similar to lookback options in that there are two types of Asian options: fixed (average price option) and floating (average strike option). Fixed Asian options have a specified strike, while floating Asian options have a strike equal to the average value of the underlying asset over the life of the option. For more information, see Asian Option.

Version History

Introduced in R2013b

expand all