Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

swaptionbynormal

Price swaptions using Normal or Bachelier option pricing model

Syntax

Price = swaptionbynormal(RateSpec,OptSpec,Strike,Settle,ExerciseDates,Maturity,Volatility)
Price = swaptionbynormal(___,Name,Value)

Description

example

Price = swaptionbynormal(RateSpec,OptSpec,Strike,Settle,ExerciseDates,Maturity,Volatility) prices swaptions using the Normal or Bachelier option pricing model.

example

Price = swaptionbynormal(___,Name,Value) adds optional name-value pair arguments.

Examples

collapse all

Define the zero curve, and create a RateSpec.

Settle = datenum('20-Jan-2016');
ZeroTimes = [.5 1 2 3 4 5 7 10 20 30]';
ZeroRates = [0.0052 0.0055 0.0061 0.0073 0.0094 0.0119 0.0168 0.0222 0.0293 0.0307]';
ZeroDates = datemnth(Settle,12*ZeroTimes);
RateSpec = intenvset('StartDate',Settle,'EndDates',ZeroDates,'Rates',ZeroRates)
RateSpec = 

  struct with fields:

           FinObj: 'RateSpec'
      Compounding: 2
             Disc: [10x1 double]
            Rates: [10x1 double]
         EndTimes: [10x1 double]
       StartTimes: [10x1 double]
         EndDates: [10x1 double]
       StartDates: 736349
    ValuationDate: 736349
            Basis: 0
     EndMonthRule: 1

Define the swaption.

ExerciseDate = datenum('20-Jan-2021');
Maturity = datenum('20-Jan-2026');
OptSpec = 'call';
LegReset = [1 1];

Compute the par swap rate.

[~,ParSwapRate] = swapbyzero(RateSpec,[NaN 0],Settle,Maturity,'LegReset',LegReset)
Strike = ParSwapRate;
BlackVol = .3;
NormalVol = BlackVol*ParSwapRate;
ParSwapRate =

    0.0216

Price with Black volatilty.

Price = swaptionbyblk(RateSpec,OptSpec,Strike,Settle,ExerciseDate,Maturity,BlackVol)
Price =

    5.9756

Price with Normal volatility.

Price_Normal = swaptionbynormal(RateSpec,OptSpec,Strike,Settle,ExerciseDate,Maturity,NormalVol)
Price_Normal =

    5.5537

Create a RateSpec.

Rate = 0.06;
Compounding  = -1;
ValuationDate = 'Jan-1-2010';
EndDates =   'Jan-1-2020';
Basis = 1;
RateSpec = intenvset('ValuationDate', ValuationDate,'StartDates', ValuationDate, ...
'EndDates', EndDates, 'Rates', Rate, 'Compounding', Compounding, 'Basis', Basis);

Define the swaption.

ExerciseDate = datenum('20-Jan-2021');
Maturity = datenum('20-Jan-2026');
Settle = 'Jan-1-2010';
OptSpec = 'call';
Strike = .09;
NormalVol = .03;
Reset = [1 4];  % 1st column represents receiving leg, 2nd column represents paying leg
Basis = [1 7];  % 1st column represents receiving leg, 2nd column represents paying leg

Price with Normal volatility.

Price_Normal = swaptionbynormal(RateSpec,OptSpec,Strike,Settle,ExerciseDate,Maturity,NormalVol,'Reset',Reset,'Basis',Basis)
Price_Normal =

    5.9084

Define the RateSpec.

Settle = datenum('20-Jan-2016');
ZeroTimes = [.5 1 2 3 4 5 7 10 20 30]';
ZeroRates = [0.0052 0.0055 0.0061 0.0073 0.0094 0.0119 0.0168 0.0222 0.0293 0.0307]';
ZeroDates = datemnth(Settle,12*ZeroTimes);
RateSpec = intenvset('StartDate',Settle,'EndDates',ZeroDates,'Rates',ZeroRates)
RateSpec = 

  struct with fields:

           FinObj: 'RateSpec'
      Compounding: 2
             Disc: [10x1 double]
            Rates: [10x1 double]
         EndTimes: [10x1 double]
       StartTimes: [10x1 double]
         EndDates: [10x1 double]
       StartDates: 736349
    ValuationDate: 736349
            Basis: 0
     EndMonthRule: 1

Define the swaption instrument and price with swaptionbyblk.

ExerciseDate = datenum('20-Jan-2021');
Maturity = datenum('20-Jan-2026');
OptSpec = 'call';

[~,ParSwapRate] = swapbyzero(RateSpec,[NaN 0],Settle,Maturity,'StartDate',ExerciseDate)
Strike = ParSwapRate;
BlackVol = .3;
NormalVol = BlackVol*ParSwapRate;

Price = swaptionbyblk(RateSpec,OptSpec,Strike,Settle,ExerciseDate,Maturity,BlackVol)
ParSwapRate =

    0.0326


Price =

    3.6908

Price the swaption instrument using swaptionbynormal.

Price_Normal = swaptionbynormal(RateSpec,OptSpec,Strike,Settle,ExerciseDate,Maturity,NormalVol)
Price_Normal =

    3.7602

Price the swaption instrument using swaptionbynormal for a negative strike.

 Price_Normal = swaptionbynormal(RateSpec,OptSpec,-.005,Settle,ExerciseDate,Maturity,NormalVol)
Price_Normal =

   16.3674

Input Arguments

collapse all

Interest-rate term structure (annualized and continuously compounded), specified by the RateSpec obtained from intenvset. For information on the interest-rate specification, see intenvset.

If the discount curve for the paying leg is different than the receiving leg, RateSpec can be a NINST-by-2 input variable of RateSpecs, with the second input being the discount curve for the paying leg. If only one curve is specified, then it is used to discount both legs.

Data Types: struct

Definition of the option as 'call' or 'put', specified as a NINST-by-1 cell array of character vectors.

A 'call' swaption, or Payer swaption, allows the option buyer to enter into an interest-rate swap in which the buyer of the option pays the fixed rate and receives the floating rate.

A 'put' swaption, or Receiver swaption, allows the option buyer to enter into an interest-rate swap in which the buyer of the option receives the fixed rate and pays the floating rate.

Data Types: char | cell

Strike swap rate values, specified as a NINST-by-1 vector of decimal values.

Data Types: double

Settlement date (representing the settle date for each swaption), specified as a NINST-by-1 vector of serial date numbers, or cell array of date character vectors, datetime objects, or string objects. Settle must not be later than ExerciseDates.

The Settle date input for swaptionbynormal is the valuation date on which the swaption (an option to enter into a swap) is priced. The swaption buyer pays this price on this date to hold the swaption.

Data Types: double | char | cell | datetime | string

Dates on which the swaption expires and the underlying swap starts, specified as a NINST-by-1 vector of serial date numbers, or cell array of date character vectors, datetime objects, or string objects. There is only one ExerciseDate on the option expiry date. This is also the StartDate of the underlying forward swap.

Data Types: double | char | cell | datetime | string

Maturity date for each forward swap, specified as a NINST-by-1 vector of dates using serial date numbers, cell array of date character vectors, datetime objects, or string objects.

Data Types: double | char | cell | datetime | string

Volatilities values (for normal volatility), specified as a NINST-by-1 vector of numeric values.

For more information on the Normal model, see Work with Negative Interest Rates.

Data Types: double

Name-Value Pair Arguments

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.

Example: Price = swaptionbynormal(OISCurve,OptSpec,Strike,Settle,ExerciseDate,Maturity,NormalVol,'Reset',4)

collapse all

Reset frequency per year for the underlying forward swap, specified as the comma-separated pair consisting of 'Reset' and a NINST-by-1 vector or NINST-by-2 matrix representing the reset frequency per year for each leg. If Reset is NINST-by-2, the first column represents the receiving leg, while the second column represents the paying leg.

Data Types: double

Day-count basis of the instrument representing the basis used when annualizing the input term structure, specified as the comma-separated pair consisting of 'Basis' and a NINST-by-1 vector or NINST-by-2 matrix representing the basis for each leg. If Basis is NINST-by-2, the first column represents the receiving leg, while the second column represents the paying leg.

Values are:

  • 0 = actual/actual

  • 1 = 30/360 (SIA)

  • 2 = actual/360

  • 3 = actual/365

  • 4 = 30/360 (PSA)

  • 5 = 30/360 (ISDA)

  • 6 = 30/360 (European)

  • 7 = actual/365 (Japanese)

  • 8 = actual/actual (ICMA)

  • 9 = actual/360 (ICMA)

  • 10 = actual/365 (ICMA)

  • 11 = 30/360E (ICMA)

  • 12 = actual/365 (ISDA)

  • 13 = BUS/252

For more information, see basis.

Data Types: double

Notional principal amount, specified as the comma-separated pair consisting of 'Principal' and a NINST-by-1 vector.

Data Types: double

The rate curve to be used in projecting the future cash flows, specified as the comma-separated pair consisting of 'ProjectionCurve' and a rate curve structure. This structure must be created using intenvset. Use this optional input if the forward curve is different from the discount curve.

Data Types: struct

Output Arguments

collapse all

Prices for the swaptions at time 0, returned as a NINST-by-1 vector of prices.

More About

collapse all

Call Swaption

A Call swaption or Payer swaption allows the option buyer to enter into an interest rate swap in which the buyer of the option pays the fixed rate and receives the floating rate.

Put Swaption

A Put swaption or Receiver swaption allows the option buyer to enter into an interest rate swap in which the buyer of the option receives the fixed rate and pays the floating rate.

Introduced in R2017a

Was this topic helpful?