optstocksensbyblk

Determine option prices and sensitivities on futures and forwards using Black pricing model

Syntax

PriceSens = optstocksensbyblk(RateSpec, StockSpec, Settle,
Maturity, OptSpec, Strike, 'Name1', Value1...)

Arguments

RateSpec

The annualized continuously compounded rate term structure. For information on the interest rate specification, see intenvset.

StockSpec

Stock specification. See stockspec.

Settle

NINST-by-1 vector of settlement or trade dates.

Maturity

NINST-by-1 vector of maturity dates.

OptSpec

NINST-by-1 cell array of strings 'call' or 'put'.

Strike

NINST-by-1 vector of strike price values.

    Note:   Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

ForwardMaturity

(Optional) NINST-by-1 maturity date or delivery date of the forward contract. The default is equal to the Maturity of the option.

OutSpec

(Optional) NOUT-by-1 or 1-by-NOUT cell array of strings indicating the nature and order of the outputs for the function. Possible values are:

  • 'Price', 'Delta', 'Gamma', 'Vega', 'Lambda', 'Rho', 'Theta', or 'All'.

    For example, OutSpec = {'Price'; 'Lambda'; 'Rho'} specifies that the output should be Price, Lambda, and Rho, in that order.

    To invoke from a function: [Price, Lambda, Rho] = optstocksensbyblk(..., 'OutSpec', {'Price', 'Lambda', 'Rho'})

    OutSpec = {'All'} specifies that the output should be Delta, Gamma, Vega, Lambda, Rho, Theta, and Price, in that order. This is the same as specifying OutSpec as OutSpec = {'Delta', 'Gamma', 'Vega', 'Lambda', 'Rho', 'Theta', 'Price'};.

  • Default is OutSpec = {'Price'}.

Description

PriceSens = optstocksensbyblk(RateSpec, StockSpec, Settle,
Maturity, OptSpec, Strike, 'Name1', Value1...)
computes option prices and sensitivities on futures and forwards using the Black pricing model.

PriceSens is a NINST-by-1 vector of expected future prices or sensitivities values.

    Note:   optstocksensbyblk calculates option prices and sensitivities on futures and forwards. If ForwardMaturity is not passed, the function calculates prices and sensitivities of future options. If ForwardMaturity is passed, the function computes prices and sensitivities of forward options. This function handles several types of underlying assets, for example, stocks and commodities. For more information on the underlying asset specification, see stockspec.

Examples

expand all

Compute Option Prices and Sensitivities on Futures Using the Black Pricing Model

This example shows how to compute option prices and sensitivities on futures using the Black pricing model. Consider a European put option on a futures contract with an exercise price of $60 that expires on June 30, 2008. On April 1, 2008 the underlying stock is trading at $58 and has a volatility of 9.5% per annum. The annualized continuously compounded risk-free rate is 5% per annum. Using this data, compute delta, gamma, and the price of the put option.

AssetPrice = 58;
Strike = 60;
Sigma = .095;
Rates = 0.05;
Settle = 'April-01-08';
Maturity = 'June-30-08';

% define the RateSpec and StockSpec
RateSpec = intenvset('ValuationDate', Settle, 'StartDates', Settle, 'EndDates',...
Maturity, 'Rates', Rates, 'Compounding', -1, 'Basis', 1);

StockSpec = stockspec(Sigma, AssetPrice);

% define the options
OptSpec = {'put'};

OutSpec = {'Delta','Gamma','Price'};
[Delta, Gamma, Price] = optstocksensbyblk(RateSpec, StockSpec, Settle,...
Maturity, OptSpec, Strike,'OutSpec', OutSpec)
Delta =

   -0.7469


Gamma =

    0.1130


Price =

    2.3569

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)
Delta =

    0.3518
    0.1262


Price =

    5.4808
    1.6224

Was this topic helpful?