www.gusucode.com > fininst 案例源码程序 matlab代码 > fininst/AmeriOptionPriceSensitivitiesBjerkExample.m
%% Compute American Option Prices and Sensitivities Using the Bjerksund-Stensland 2002 Option Pricing Model % This example shows how to compute American option prices and % sensitivities using the Bjerksund-Stensland 2002 option pricing model. % Consider four American put options with an exercise price of $100. The % options expire on October 1, 2008. Assume the underlying stock pays a % continuous dividend yield of 4% and has a volatility of 40% per annum. % The annualized continuously compounded risk-free rate is 8% per annum. % Using this data, calculate the |delta|, |gamma|, % and |price| of the American put options, assuming % the following current prices of the stock on July 1, 2008: $90, $100, % $110 and $120. %% % Copyright 2015 The MathWorks, Inc. Settle = 'July-1-2008'; Maturity = 'October-1-2008'; Strike = 100; AssetPrice = [90;100;110;120]; Rate = 0.08; Sigma = 0.40; DivYield = 0.04; % define the RateSpec and StockSpec StockSpec = stockspec(Sigma, AssetPrice, {'continuous'}, DivYield); RateSpec = intenvset('ValuationDate', Settle, 'StartDates', Settle,... 'EndDates', Maturity, 'Rates', Rate, 'Compounding', -1); % define the option type OptSpec = {'put'}; OutSpec = {'Delta', 'Gamma', 'Price'}; [Delta, Gamma, Price] = optstocksensbybjs(RateSpec, StockSpec, Settle, Maturity,... OptSpec, Strike, 'OutSpec', OutSpec)