Main Content

spreadbyls

使用蒙特卡洛模拟的价格欧洲或美国的蔓延选择

Description

例子

Price= spreadbyls(RateSpec,,,,Stockspec1,,,,Stockspec2,,,,Settle,,,,到期,,,,OPTSPEC,,,,罢工,,,,corr返回price of a European or American call or put spread option using Monte Carlo simulations.

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

Price= spreadbyls(___,,,,名称,价值返回price of a European or American call or put spread option using Monte Carlo simulations using optional name-value pair arguments.

[[Price,,,,路径,,,,时代,,,,z] =延byls(RateSpec,,,,Stockspec1,,,,Stockspec2,,,,Settle,,,,到期,,,,OPTSPEC,,,,罢工,,,,corr返回Price,,,,路径,,,,时代, 和zof a European or American call or put spread option using Monte Carlo simulations.

[[Price,,,,路径,,,,时代,,,,z] =延byls(___,,,,名称,价值返回Price,,,,路径,,,,时代, 和z使用蒙特卡洛模拟使用可选的名称值对参数的欧洲或美国呼叫或投票选项。

Examples

全部收缩

定义利差选项日期。

Settle ='01-Jan-2012';到期='01-April-2012';

定义资产1. RBOB汽油的价格和波动性

Price1gallon = 2.85;% $/gallonPrice1 = Price1gallon * 42;%$/桶Vol1 = 0.29;

Define asset 2. Price and volatility of WTI crude oil

Price2 = 93.20;%$/桶VOL2 = 0.36;

定义潜在的美国卫生工程师协会(asse)之间的相关性tprices of asset 1 and asset 2.

corr= 0.42;

定义传播选项。

OPTSPEC='call';罢工= 20;

定义RateSpec

rates = 0.05; Compounding = -1; Basis = 1; RateSpec = intenvset(“评估日期”,,,,Settle,'StartDates',,,,Settle,。。。'端',成熟,“费率”,,,,rates,。。。“复合”,复合,'Basis',,,,Basis)
Ratespec =带有字段的结构:FINOBJ:“ Ratesspec”复合:-1碟片:0.9876速率:0.0500末端:0.2500启动时间:0末日:734960 StartDates:734869估值:734869基础:734869基础:1 EndMonThrule:1 EndmonThrules:1 EndmonThrules:1 EndMonThrule:1 1

定义Stockspecfor the two assets.

StockSpec1 = Stockspec(Vol1,Price1)
Stockspec1=带有字段的结构:FinOBJ:“ Stockspec” Sigma:0.2900 AssetPrice:119.7000 RictendType:[] ricdendenamounts:0 exdividendenddates:[]
StockSpec2 =Stockspec((Vol2, Price2)
StockSpec2 =带有字段的结构:FinObj: 'StockSpec' Sigma: 0.3600 AssetPrice: 93.2000 DividendType: [] DividendAmounts: 0 ExDividendDates: []

使用基于Longstaff-Schwartz型号的Monte Carlo模拟来计算传播期权价格。

PRISS =余面(Ratesspec,Stockspec1,Stockspec2,setto,setto,。。。到期,,,,OPTSPEC,,,,罢工,,,,corr)
Price = 11.0799

输入参数

全部收缩

Interest-rate term structure (annualized and continuously compounded), specified by theRateSpec从...获取IntenVSet。有关利率规范的信息,请参阅IntenVSet

Data Types:结构

基础资产的库存规范1.有关股票规格的信息,请参见Stockspec

Stockspec可以处理其他类型的基础资产。例如,对于物理商品,价格由Stockspec。一个sset,,,,the volatility is represented byStockspec.sigma, 和the convenience yield is represented byStockspec。DividendAmounts

Data Types:结构

基础资产的库存规范2.有关股票规格的信息,请参见Stockspec

Stockspec可以处理其他类型的基础资产。例如,对于物理商品,价格由Stockspec。一个sset,,,,the volatility is represented byStockspec.sigma, 和the convenience yield is represented byStockspec。DividendAmounts

Data Types:结构

指定的点差选项的结算日期,作为日期字符向量或非负标量整数。

Data Types:char|double

扩展选项的成熟日期,指定为日期字符向量或非负标量整数。

Data Types:char|double

选项的定义为'call'or'put',,,,specified as a character vector.

Data Types:char

选项打击价格值,指定为非负标量整数。

Data Types:single|double

基础资产价格之间的相关性,指定为标量整数。

Data Types:single|double

名称值对参数

指定可选的逗号分隔对名称,价值arguments.Name是参数名称和Valueis the corresponding value.Name必须出现在引号中。您可以按任何顺序指定几个名称和值对参数Name1,Value1,...,NameN,ValueN

Example:PRISS = ERKERBYLS(Ratesspec,StockSpec1,Stockspec2,setter,aterity,Ederity,optspec,strike,corr,corr,'americonopt',1)

选项类型,,,,specified as the comma-separated pair consisting of'AmericanOpt'and an integer scalar flag with value:

  • 0-欧洲的

  • 1-一个merican

笔记

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

Data Types:single|double

独立样本路径的标量数(仿真试验),指定为逗号分隔对'NumTrials'和一个非负整数。

Data Types:single|double

每次试验的标量模拟期数,,,,specified as the comma-separated pair consisting of'numperiods'和一个非负整数。numperiodsis considered only when pricing European basket options. For American spread options,numperiodis equal to the number of exercise days during the life of the option.

Data Types:single|double

依赖随机变体的时间序列阵列,,,,specified as the comma-separated pair consisting of'Z'and anumperiods-by-2-by-NumTrials3-D array. Thezvalue generates the Brownian motion vector (that is, Wiener processes) that drives the simulation.

Data Types:single|double

对比抽样指标,,,,specified as the comma-separated pair consisting of'Antithetic'and a value oftrueor错误的

Data Types:逻辑

Output Arguments

全部收缩

利差期权的预期价格,返回为1-by-1标量。

相关状态变量的模拟路径,返回为numperiods + 1-by-2-by-NumTrials3-D time series array. Each row of路径是国家矢量的转置X((ttfor a given trial.

Observation times associated with simulated paths, returned as anumperiods + 1-by-1与模拟路径相关的观察时间列矢量。每个元素时代与相应的行相关联路径

依赖随机变体的时间序列数组,返回为numperiods-by-2-by-NumTrials3-D数组z被指定为输入参数。如果是z未指定输入参数,然后z输出参数包含内部生成的随机变体。

更多关于

全部收缩

Spread Option

一个传播选项是关于两个基础资产差的选项。

For example, a European call on the difference of two assetsX1andX2将在到期时获得以下回报:

最大限度 (( X 1 X 2 k ,,,, 0

在哪里:

kis the strike price.

For more information, seeSpread Option

参考

[1] Carmona,R。,Durrleman,V。“定价和对冲的差异选择。”暹罗评论。Vol. 45, No. 4, pp. 627–685, Society for Industrial and Applied Mathematics, 2003.

在R2013B中引入