用不同权益模型为欧式看涨期权定价
这个例子说明了如何使用金融工具工具箱™使用不同的股票模型为欧洲香草看涨期权定价。
这个例子使用Cox-Ross-Rubinstein模型、Leisen-Reimer模型和Black-Scholes封闭公式来比较看涨期权价格。
定义呼叫工具
考虑一个欧洲看涨期权,在2010年1月1日行使价格为30美元。该期权将于2010年9月1日到期。假设标的股票不提供股息。该股目前的交易价为25美元,年波动率为35%。年化连续复合无风险利率为每年1.11%。
%的选择解决=“1月- 01 - 2010”;成熟=“9月- 01 - 2010”;罢工= 30;OptSpec =“电话”;%的股票AssetPrice = 25;Sigma = .35;
创建利率期限结构
startdate可以=“2010年1月1日”;EndDates =“2013年1月1日”;比率= 0.0111;ValuationDate =“2010年1月1日”;复利= -1;RateSpec = intenvset(“复合”复合,startdate可以的startdate可以,…“EndDates”EndDates,“利率”率,“ValuationDate”, ValuationDate);
创建股票结构
假设我们想要创建两个场景。第一个假设AssetPrice
目前的价格是25美元,期权已经出了价(OTM)。第二个场景假设期权在货币(ATM)处,因此AssetPriceATM
=30.
.
AssetPriceATM = 30;StockSpec = StockSpec (Sigma, AssetPrice);stockspec = stockspec(Sigma, AssetPriceATM);
使用Black-Scholes封闭公式为期权定价
使用函数optstockbybls
在金融工具工具箱中计算欧洲看涨期权的价格。
%用AssetPrice = 25为期权定价PriceBLS = optstockbybls(RateSpec, StockSpec,结算,到期,OptSpec,罢工);%用AssetPrice = 30对期权定价PriceBLSATM = optstockbybls(RateSpec, StockSpecATM,结算,到期,OptSpec,罢工);
构建Cox-Ross-Rubinstein树
%创建树的时间规格NumPeriods = 15;CRRTimeSpec = CRRTimeSpec (ValuationDate, Maturity, NumPeriods);%创建树CRRTree = CRRTree (StockSpec, RateSpec, CRRTimeSpec);CRRTreeATM = crrtree(stockspec, RateSpec, CRRTimeSpec);
建造Leisen-Reimer树
%创建树的时间规格LRTimeSpec = LRTimeSpec (ValuationDate, Maturity, NumPeriods);使用默认方法“PP1”(Peizer-Pratt方法1反演)构建%树LRTree = LRTree (StockSpec, RateSpec, LRTimeSpec, Strike);LRTreeATM = lrtree(StockSpecATM, RateSpec, LRTimeSpec, Strike);
使用Cox-Ross-Rubinstein (CRR)模型为期权定价
PriceCRR = optstockbycrr(CRRTree, OptSpec, Strike, Settle, Maturity);PriceCRRATM = optstockbycrr(CRRTreeATM, OptSpec, Strike, Settle, Maturity);
使用Leisen-Reimer (LR)模型为期权定价
PriceLR = optstockbylr(LRTree, OptSpec, Strike, Settle, Maturity);PriceLRATM = optstockbylr(LRTreeATM, OptSpec, Strike, Settle, Maturity);
比较BLS、CRR和LR结果
sprintf (“PriceBLS: \t%f\nPriceCRR: \t%f\nPriceLR:\t%f\n”PriceBLS,…PriceCRR PriceLR)
ans = 'PriceBLS: 1.275075 PriceCRR: 1.294979 PriceLR: 1.275838 '
sprintf (\t== ATM ==\nPriceBLS ATM:\t%f\ nPriceCRR ATM:\t%f\ nPriceLR ATM:\t%f\nPriceBLSATM,…PriceCRRATM PriceLRATM)
ans = ' == ATM == PriceBLS ATM: 3.497891 PriceCRR ATM: 3.553938 PriceLR ATM: 3.498571 '
CRR和LR模型收敛到BLS解
下表比较了使用CRR和LR模型的看涨期权价格与使用Black-Scholes公式获得的结果。
当CRR二项式模型和Black-Scholes模型随着时间步数变大而每一步的长度变小而收敛时,除了在货币选项上,这种收敛绝不是平滑或均匀的。
下表显示,Leisen-Reimer模型即使只需要45步,也能减小误差的大小。
行权= 30,资产价格= 30
-------------------------------------
#步骤LR CRR
15 3.4986 3.5539
25 3.4981 3.5314
45 3.4980 3.5165
65 3.4979 3.5108
85 3.4979 3.5077
105 3.4979 3.5058
201 3.4979 3.5020
501 3.4979 3.4996
999 3.4979 3.4987
行权= 30,资产价格= 25
-------------------------------------
#步骤LR CRR
15 1.2758 1.2950
25 1.2754 1.2627
45 1.2751 1.2851
65 1.2751 1.2692
85 1.2751 1.2812
105 1.2751 1.2766
201 1.2751 1.2723
501 1.2751 1.2759
999 1.2751 1.2756
分析期间数对期权价格的影响
下图显示了随着二项式计算步骤数的增加,收敛性是如何变化的,以及股价变化对收敛性的影响。观察到Leisen-Reimer模型消除了振荡,只使用少量的步骤就产生了接近Black-Scholes模型的估计。
NPoints = 300;% Cox-Ross-RubinsteinNumPeriodCRR = 5: 1: NPoints;NbStepCRR = length(NumPeriodCRR);PriceCRR = nan(NbStepCRR, 1);PriceCRRATM = PriceCRR;为i = 1: NbStepCRR CRRTimeSpec = CRRTimeSpec (ValuationDate, Maturity, NumPeriodCRR(i));CRRT = crrtree(StockSpec, RateSpec, CRRTimeSpec);PriceCRR(i) = optstockbycrr(CRRT, OptSpec, Strike,ValuationDate, Maturity);CRRTATM = crrtree(StockSpecATM, RateSpec, CRRTimeSpec);PriceCRRATM(i) = optstockbycrr(CRRTATM, OptSpec, Strike,ValuationDate, Maturity);结束%现在和雷森雷莫在一起NumPeriodLR = 5: 2: NPoints;NbStepLR = length(NumPeriodLR);PriceLR = nan(NbStepLR, 1);pricelrm = PriceLR;为1: NbStepLR LRTimeSpec = LRTimeSpec (ValuationDate, Maturity, NumPeriodLR(i));LRT = lrtree(股票,股票,股票,股票);PriceLR(i) = optstockbylr(LRT, OptSpec, Strike,ValuationDate, Maturity);LRTATM = lrtree(StockSpecATM, rate, LRTimeSpec, Strike);PriceLRATM(i) = optstockbylr(LRTATM, OptSpec, Strike,ValuationDate, Maturity);结束
第一种情况:退出货币看涨期权
支持考克斯-罗斯-鲁宾斯坦情节(NumPeriodCRR PriceCRR);持有在;情节(NumPeriodCRR PriceBLS *的(NbStepCRR, 1),“颜色”,[0 0.9 0],“线宽”, 1.5);% Leisen-Reimer情节(NumPeriodLR PriceLR,“颜色”,[0.9 0 0],“线宽”, 1.5);%集中在感兴趣的区域,在Y轴上剪切5倍% LR价格:YLimDelta = 5*abs(PriceLR(1) - PriceBLS);Ax = gca;斧子。YLim = [PriceBLS-YLimDelta];%注释图titleString = sprintfCRR和LR模型收敛到BLS解决方案(OTM)\nStrike = %d,资产价格= %d, Strike, AssetPrice);标题(titleString) ylabel (期权价格的)包含(“步数”)传说(“哭泣”,劳工统计局的,“LR”,“位置”,“东北”)
第二种情况:在货币看涨期权
支持考克斯-罗斯-鲁宾斯坦图;情节(NumPeriodCRR PriceCRRATM);持有在;情节(NumPeriodCRR PriceBLSATM *的(NbStepCRR, 1),“颜色”,[0 0.9 0],“线宽”, 1.5);% Leisen-Reimer情节(NumPeriodLR PriceLRATM,“颜色”,[0.9 0 0],“线宽”, 1.5);%集中在感兴趣的区域,在Y轴上剪切5倍% LR价格:YLimDelta = 5*abs(PriceLRATM(1) - PriceBLSATM);Ax = gca;斧子。YLim = [PriceBLSATM-YLimDelta];%注释图titleString = sprintfCRR和LR模型收敛到BLS解决方案(ATM)\nStrike = %d,资产价格= %d, Strike, assetprice);标题(titleString) ylabel (期权价格的)包含(“步数”)传说(“哭泣”,劳工统计局的,“LR”,“位置”,“东北”)
另请参阅
assetbybls
|assetsensbybls
|cashbybls
|cashsensbybls
|chooserbybls
|gapbybls
|gapsensbybls
|impvbybls
|optstockbybls
|optstocksensbybls
|supersharebybls
|supersharesensbybls
|impvbyblk
|optstockbyblk
|optstocksensbyblk
|impvbyrgw
|optstockbyrgw
|optstocksensbyrgw
|impvbybjs
|optstockbybjs
|optstocksensbybjs
|spreadbybjs
|spreadsensbybjs
|basketbyju
|basketsensbyju
|basketstockspec
|maxassetbystulz
|maxassetsensbystulz
|minassetbystulz
|minassetsensbystulz
|spreadbykirk
|spreadsensbykirk
|asianbykv
|asiansensbykv
|asianbylevy
|asiansensbylevy
|lookbackbycvgsg
|lookbacksensbycvgsg
|basketbyls
|basketsensbyls
|basketstockspec
|asianbyls
|asiansensbyls
|lookbackbyls
|lookbacksensbyls
|spreadbyls
|spreadsensbyls
|optstockbyls
|optstocksensbyls
|optpricebysim
|optstocksensbybaw