%% Compute Forward Option Prices and Delta Sensitivities
% This example shows how to compute option prices and sensitivities on forwards using the Black pricing model. Consider two European call options on the Brent Blend forward contract that expires on January 1, 2015. The options expire on October 1, 2014 and Dec 1, 2014 with an exercise price % of $120 and $150 respectively. Assume that on January 1, 2014 the forward price is at $107, the annualized continuously compounded risk-free rate is 3% per annum and volatility is 28% per annum. Using this data, compute the price and delta of the options.
% Define the RateSpec.

ValuationDate = 'Jan-1-2014';
EndDates = 'Jan-1-2015';
Rates = 0.03;
Compounding = -1;
Basis = 1;
RateSpec  = intenvset('ValuationDate', ValuationDate, 'StartDates', ...
ValuationDate, 'EndDates', EndDates, 'Rates', Rates, ...
'Compounding', Compounding, 'Basis', Basis');

%
% Define the StockSpec.

AssetPrice = 107;
Sigma = 0.28;
StockSpec  = stockspec(Sigma, AssetPrice);

%
% Define the options.

Settle = 'Jan-1-2014';
Maturity = {'Oct-1-2014'; 'Dec-1-2014'}; %Options maturity
Strike = [120;150];
OptSpec = {'call'; 'call'};

%
% Price the forward call options and return the Delta sensitivities.

ForwardMaturity = 'Jan-1-2015';  % Forward contract maturity
OutSpec = {'Delta'; 'Price'};
[Delta, Price] = optstocksensbyblk(RateSpec, StockSpec, Settle, Maturity, OptSpec, ...
Strike, 'ForwardMaturity', ForwardMaturity, 'OutSpec', OutSpec)

% Copyright 2015 The MathWorks, Inc.