金融MATLAB实验报告三答案详解 下载本文

内容发布更新时间 : 2024/6/7 12:22:22星期一 下面是文章的全部内容请认真阅读。

>> Time=(1:1:12)/12; >> Volatility=0.55; >> [Price,Time]=meshgrid(Price,Time); [Calldelta, Putdelta] = blsdelta(Price, Strike, Rate, Time, Volatility); >> mesh(Price, Time, Putdelta); xlabel('Stock Price '); ylabel('Time (year)'); zlabel('Delta'); >> 5. B-S公式隐含波动率计算 例3:假设欧式股票期权,一年后,执行价格99元,现价为105元,无股利支付,股价年化波动率为40%,无风险利率为10%,则期权价格为: 解:clear >> Price=105; >> Strike=99; >> Rate=0.1; >> Time=1; >> CallValue=15; >> CallVolatility = blsimpv(Price, Strike, Rate, Time, CallValue, [], [], [], {'Call'}) 计算结果: CallVolatility = NaN >> PutValue=7; >> PutVolatility = blsimpv(Price, Strike, Rate, Time, PutValue, [], [], [], {'Put'}) PutVolatility = 0.3455 6. 期权二叉树模型的计算 例:假设欧式股票期权,三个月后到期,执行价格85元,现价为95元,无股利支付,股价年化波动率为60%,无风险利率为10%。 解:clear >> Price=95; >> Strike=85; >> Rate=0.1; >> Time=4/12; >> flag=1; >> Increment=1/12; >> Volatility=0.6; >> [AssetPrice, OptionValue] = binprice(Price, Strike, Rate, Time, Increment, Volatility, flag) 计算结果: AssetPrice = 95.0000 112.9654 134.3283 159.7312 189.9379 0 79.8917 95.0000 112.9654 134.3283 0 0 67.1861 79.8917 95.0000 0 0 0 56.5012 67.1861 0 0 0 0 47.5155 OptionValue = 20.0574 32.4952 50.7333 75.4365 104.9379 0 8.8608 16.1268 28.6708 49.3283 0 0 2.2739 4.7685 10.0000 0 0 0 0 0 0 0 0 0 0 成绩: 指导教师签字: