主要内容

barriersensbyls

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

描述

example

[PriceSens,Paths,时代,Z] = barriersensbyls(RateSpec,StockSpec,OptSpec,罢工,Settle,ExerciseDates,BarriersPec,Barrier)使用Longstaff-Schwartz模型计算单个基础资产上的障碍期权价格或敏感性。barriersensbylscomputes prices of European and American barrier options.

对于美国选择,使用Longstaff-Schwartz最小二乘法来计算早期锻炼溢价。

example

[PriceSens,Paths,时代,Z] = barriersensbyls(___,Name,Value)添加可选的名称值对参数。

例子

collapse all

Compute the price of an American down in put option using the following data:

费率= 0.0325;定居='01 -Jan-2016';Maturity ='01 -Jan-2017';复合= -1;基础= 1;

Define aRateSpec.

Ratespec = IntenVset('ValuationDate',Settle,“开始日”,Settle,'EndDates',Maturity,...'Rates',费率,'Compounding',Compounding,'基础',基础)
RateSpec =struct with fields:FinObj: 'RateSpec' Compounding: -1 Disc: 0.9680 Rates: 0.0325 EndTimes: 1 StartTimes: 0 EndDates: 736696 StartDates: 736330 ValuationDate: 736330 Basis: 1 EndMonthRule: 1

Define aStockSpec.

AssetPrice = 40;波动率= 0.20;StockSpec = StockSpec(波动性,资产量)
StockSpec =struct with fields:FinOBJ:“ Stockspec” Sigma:0.2000 AssetPrice:40 resdendtype:[] RictendAmounts:0 ExdividendEdendDates:[]

计算美国障碍物的三角洲和伽玛。

罢工= 45; OptSpec ='put';Barrier = 35; BarrierSpec ='DI';AmericanOpt = 1; OutSpec = {'delta','gamma'};[delta,伽马] = barriersensbyls(Ratesspec,Stockspec,Optspec,罢工,定居...Maturity,BarrierSpec,Barrier,“数字”,2000年,'AmericanOpt',AmericanOpt,'OutSpec',否定)
Delta = -0.6346
伽马= -0.3091

Input Arguments

collapse all

利率期限结构(annualized and continuously compounded), specified by theRateSpecobtained fromintenvset. For information on the interest-rate specification, seeintenvset.

数据类型:struct

基础资产的库存规范。有关库存规格的信息,请参阅stockspec.

stockspec处理多种类型的基础资产。为前ample, for physical commodities the price isStockSpec.Asset, the volatility isStockSpec.Sigma, and the convenience yield isStockSpec.DividendAmounts.

数据类型:struct

Definition of the option as'call'or'put',指定为具有值的字符向量或字符串数​​组"call"or"put".

数据类型:char|string

期权行动价值, specified as a scalar numeric.

数据类型:双倍的

Settlement or trade date for the barrier option, specified as a serial date number, a date character vector, or a datetime object.

数据类型:双倍的|char|datetime

选项练习日期,指定为序列日期编号,日期字符向量或DateTime对象:

  • 对于欧洲选择,只有一个ExerciseDateson the option expiry date which is the maturity of the instrument.

  • For an American option, use a1-经过-2vector 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-NaNdate is listed, the option can be exercised betweenSettle和单个列出的日期ExerciseDates.

数据类型:双倍的|char|cell

屏障选项类型,指定为具有以下值的字符向量:

  • 'UI'— Up Knock-in

    这个选项th时生效e price of the underlying asset passes above the barrier level. It gives the option holder the right, but not the obligation, to buy or sell (call/put) the underlying security at the strike price if the underlying asset goes above the barrier level during the life of the option.

  • 'uo'- 上淘汰赛

    This option gives the option holder the right, but not the obligation, to buy or sell (call/put) the underlying security at the strike price as long as the underlying asset does not go above the barrier level during the life of the option. This option terminates when the price of the underlying asset passes above the barrier level. Usually with an up-and-out option, the rebate is paid if the spot price of the underlying reaches or exceeds the barrier level.

  • 'DI'— Down Knock-in

    这个选项th时生效e price of the underlying stock passes below the barrier level. It gives the option holder the right, but not the obligation, to buy or sell (call/put) the underlying security at the strike price if the underlying security goes below the barrier level during the life of the option. With a down-and-in option, the rebate is paid if the spot price of the underlying does not reach the barrier level during the life of the option.

  • '做'— Down Knock-up

    This option gives the option holder the right, but not the obligation, to buy or sell (call/put) the underlying asset at the strike price as long as the underlying asset does not go below the barrier level during the life of the option. This option terminates when the price of the underlying security passes below the barrier level. Usually, the option holder receives a rebate amount if the option expires worthless.

Option Barrier Type Payoff if Barrier Crossed Payoff if Barrier not Crossed
Call/Put Down Knock-out 毫无价值 Standard Call/Put
Call/Put Down Knock-in Call/Put 毫无价值
Call/Put 上淘汰赛 毫无价值 Standard Call/Put
Call/Put Up Knock-in Standard Call/Put 毫无价值

数据类型:char

Barrier level, specified as a scalar numeric.

数据类型:双倍的

Name-Value Arguments

Specify optional pairs of arguments asName1=Value1,...,NameN=ValueN, 在哪里Nameis the argument name andValue是相应的值。名称值参数必须在其他参数之后出现,但是对的顺序并不重要。

Before R2021a, use commas to separate each name and value, and encloseName用引号。

例子:价格= barriersensbyls(Ratesspec,Stockspec,Optspec,罢工,定居点,成熟,障碍,障碍,障碍,回扣,1000)

Option type, specified as the comma-separated pair consisting of'AmericanOpt'以及具有以下值之一的标量标志:

  • 0— European

  • 1- 美国人

Note

对于美国选择,使用Longstaff-Schwartz最小二乘法来计算早期锻炼溢价。For more information on the least squares method, seehttps://people.math.ethz.ch/%7Ehjfurrer/teaching/LongstaffSchwartzAmericanOptionsLeastSquareMonteCarlo.pdf.

数据类型:双倍的

回扣价值,指定为逗号分隔对'Rebate'and a scalar numeric. For Knock-in options, theRebateis paid at expiry. For Knock-out options, theRebateis paid when theBarrieris reached.

数据类型:双倍的

Number of independent sample paths (simulation trials), specified as the comma-separated pair consisting of“数字”和标量非负整数。

数据类型:双倍的

Number of simulation periods per trial, specified as the comma-separated pair consisting of'NumPeriods'和标量非负整数。

数据类型:双倍的

相关随机变体的时间序列阵列,指定为逗号分隔对'Z'and anumperiods-经过-1-经过-NumTrials3-D time series array. TheZ值生成驱动模拟的布朗运动矢量(即维纳过程)。

数据类型:双倍的

Indicator for antithetic sampling, specified as the comma-separated pair consisting of'Antithetic'and a scalar value oftrueorfalse.

数据类型:logical

Define outputs, specified as the comma-separated pair consisting of'OutSpec'and aNOUT- by-1or a1-经过-NOUTcell array of character vectors with possible values of'Price','Delta','Gamma','vega','Lambda','Rho',“θ”, and'All'.

OutSpec = {'All'}指定输出为Delta,伽玛,维加,Lambda,Rho,Theta, andPrice, in that order. This is the same as specifyingOutSpecto include each sensitivity.

例子:OUTSPEC = {'delta','gamma','vega','lambda','rho','theta','price'}

数据类型:char|cell

监视障碍之间的天数,指定为标量整数。默认值为0这表明屏障是连续监测的。

数据类型:双倍的

Output Arguments

collapse all

Expected prices or sensitivities (defined usingOutSpec) for barrier options, returned as aNinst-经过-1matrix.

Simulated paths of correlated state variables, returned as anumperiods+ 1-经过-1-经过-NumTrials3-D time series array of simulated paths of correlated state variables. Each row ofPathsis the transpose of the state vectorX(ttfor a given trial.

与模拟路径相关的观察时间,返回numperiods+ 1-经过-1与模拟路径相关的观察时间列矢量。每个元素时代is associated with the corresponding row ofPaths.

Time series array of dependent random variates, returned as anumperiods-经过-1-经过-NumTrials3-D array whenZis specified as an input argument. If theZinput argument is not specified, then theZ输出参数包含内部生成的随机变体。

More About

collapse all

Barrier Option

A Barrier option has not only a strike price but also a barrier level and sometimes a rebate.

A rebate is a fixed amount that is paid if the option cannot be exercised because the barrier level has been reached or not reached. The payoff for this type of option depends on whether the underlying asset crosses the predetermined trigger value (barrier level), indicated byBarrier,在期权的生命中。有关更多信息,请参阅Barrier Option.

参考

[1] Hull, J.Options, Futures and Other DerivativesFourth Edition. Prentice Hall, 2000, pp. 646-649.

[2] Aitsahlia,F.,L。Imhof和T.L.莱。“美国淘汰赛的定价和对冲。”衍生物杂志。卷。11.3, 2004, pp. 44–50.

[3] Broadie, M., P. Glasserman and S. Kou. "A continuity correction for discrete barrier options."Mathematical Finance.卷。7.4,1997,第3250–349页。

[4] Moon, K.S. "Efficient Monte Carlo algorithm for pricing barrier options."Communications of the Korean Mathematical Society.Vol 23.2, 2008 pp. 85–294.

[5] Papatheodorou,B。“Enhanced Monte Carlo methods for pricing and hedging exotic options."University of Oxford thesis, 2005.

[6] Rubinstein M. and E. Reiner. “Breaking down the barriers.”风险。卷。4(8), 1991, pp. 28–35.

Version History

Introduced in R2016b