Documentation

optstockbybls

Price options using Black-Scholes option pricing model

Syntax

Price = optstockbybls(RateSpec, StockSpec, Settle, Maturity,
OptSpec, Strike)

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 character vectors 'call' or 'put'.

Strike

NINST-by-1 vector of strike price values.

Description

Price = optstockbybls(RateSpec, StockSpec, Settle, Maturity,
OptSpec, Strike)

Price is a NINST-by-1 vector of expected option prices.

Examples

collapse all

Compute Option Prices Using the Black-Scholes Option Pricing Model

This example shows how to compute option prices using the Black-Scholes option pricing model. Consider two European options, a call and a put, with an exercise price of $29 on January 1, 2008. The options expire on May 1, 2008. Assume that the underlying stock for the call option provides a cash dividend of $0.50 on February 15, 2008. The underlying stock for the put option provides a continuous dividend yield of 4.5% per annum. The stocks are trading at $30 and have a volatility of 25% per annum. The annualized continuously compounded risk-free rate is 5% per annum. Using this data, compute the price of the options using the Black-Scholes model.

Strike = 29;
AssetPrice = 30;
Sigma = .25;
Rates = 0.05;
Settle = 'Jan-01-2008';
Maturity = 'May-01-2008';

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

DividendType = {'cash';'continuous'};
DividendAmounts = [0.50; 0.045];
ExDividendDates = {'Feb-15-2008';NaN};

StockSpec = stockspec(Sigma, AssetPrice, DividendType, DividendAmounts,...
ExDividendDates);

OptSpec = {'call'; 'put'};

Price = optstockbybls(RateSpec, StockSpec, Settle, Maturity, OptSpec, Strike)
Price =

    2.2030
    1.2025

Compute Option Prices on Foreign Currencies Using the Garman-Kohlhagen Option Pricing Model

This example shows how to compute option prices on foreign currencies using the Garman-Kohlhagen option pricing model. Consider a European put option on a currency with an exercise price of $0.50 on October 1, 2015. The option expires on June 1, 2016. Assume that the current exchange rate is $0.52 and has a volatility of 12% per annum. The annualized continuously compounded domestic risk-free rate is 4% per annum and the foreign risk-free rate is 8% per annum. Using this data, compute the price of the option using the Garman-Kohlhagen model.

Settle = 'October-01-2015';
Maturity = 'June-01-2016';
AssetPrice = 0.52;
Strike = 0.50;
Sigma = .12;
Rates = 0.04;
ForeignRate = 0.08;

Define the RateSpec.

RateSpec = intenvset('ValuationDate', Settle, 'StartDates', Settle, 'EndDates',...
Maturity, 'Rates', Rates, 'Compounding', -1)
RateSpec = 

           FinObj: 'RateSpec'
      Compounding: -1
             Disc: 0.9737
            Rates: 0.0400
         EndTimes: 0.6667
       StartTimes: 0
         EndDates: 736482
       StartDates: 736238
    ValuationDate: 736238
            Basis: 0
     EndMonthRule: 1

Define the StockSpec.

DividendType = 'Continuous';
DividendAmounts = ForeignRate;

StockSpec = stockspec(Sigma, AssetPrice, DividendType, DividendAmounts)
StockSpec = 

             FinObj: 'StockSpec'
              Sigma: 0.1200
         AssetPrice: 0.5200
       DividendType: {'continuous'}
    DividendAmounts: 0.0800
    ExDividendDates: []

Price the European put option.

OptSpec = {'put'};
Price = optstockbybls(RateSpec, StockSpec, Settle, Maturity, OptSpec, Strike)
Price =

    0.0162

Related Examples

Introduced in R2008b

Was this topic helpful?