资源描述:
《MATLAB金融计算试题.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、MATLAB金融计算试题(2014级研究生用)(上机操作使用)一、利率期限结构(20分)已知国债面值是100美元,各期收益率为国债品种票息到期日当期收益3个月17-Apr-20131.156个月17-Jul-20131.182年1.7531-Dec-20141.685年3.0015-Nov-20172.9710年4.0015-Nov-20224.0130年5.37515-Feb-20414.92试分析其利率期限结构。MATLAB命令:bonds=[datenum('04/17/2013')0100;datenum('07/17/2013')0
2、100;datenum('12/31/2014')0.0175100;datenum('11/15/2017')0.03100;datenum('11/15/2022')0.04100;datenum('02/15/2041')0.0537100];yield=[0.01150.01180.01680.02970.04010.0492]';settle=datenum('01/17/2013');%结算日[zerorates,curvedates]=zbtyield(bonds,yield,settle)datestr(curvedates)
3、plot(zerorates)运行结果:zerorates=0.01150.01180.01680.03020.04180.0550curvedates=735341735432735964737014738840745507ans=17-Apr-201317-Jul-201331-Dec-201415-Nov-201715-Nov-202215-Feb-2041二、期权定价(30分)若股票现在价格为$50,期权执行价格为$52,无风险利率为0.1,股票波动标准差为0.4,期权的到期日为6个月,且若这一卖权在3.5月时有一次股息支付$2。(1
4、)使用Black-Scholes定价公式计算欧式卖权和买权的价值;MATLAB命令:price=50;strike=52;rate=0.1;time=6/12;volatility=0.4;[callprice,putprice]=blsprice(price,strike,rate,time,volatility)运行结果:callprice=5.8651putprice=5.3290(2)利用二项式期权定价(二叉树(CRR)模型定价数值解)计算看涨看跌期权价格;MATLAB命令:price=50;strike=52;rate=0.1;ti
5、me=6/12;increment=1/12;volatility=0.4;flag=0;dividentrate=0;divident=2;exdiv=3.5;[price,option]=binprice(price,strike,rate,time,increment,volatility,flag,dividentrate,divident,exdiv)运行结果:得出二叉树每个交点处的资产价格和期权价值.price=50.000055.898562.517269.944176.269985.605496.0836044.775550.
6、032655.931560.542067.952476.26990040.122644.808448.057553.939860.542000035.979038.147442.816748.0575000030.280933.987338.14740000026.978730.280900000024.0366option=6.70163.93081.76520.459800009.66866.22753.13930.9412000013.37629.51325.45601.9263000017.581113.85269.18333.942
7、5000021.719118.012713.85260000025.021321.719100000027.9634由结果可知,option第一行第一列就是看跌期权价格,该期权价格为6.7016元。MATLAB命令:price=50;strike=52;rate=0.1;time=6/12;increment=1/12;volatility=0.4;flag=1;dividentrate=0;divident=2;exdiv=3.5;[price,option]=binprice(price,strike,rate,time,incremen
8、t,volatility,flag,dividentrate,divident,exdiv)运行结果:得出二叉树每个交点处的资产价格和期权价值.price=50.0