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.

swaptionbyblk

Price European swaption instrument using Black model

Syntax

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

Description

example

Price = swaptionbyblk(RateSpec,OptSpec,Strike,Settle,ExerciseDates,Maturity,Volatility) prices swaptions using the Black option pricing model.

example

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

Examples

collapse all

Price a European swaption that gives the holder the right to enter in five years into a three-year paying swap where a fixed-rate of 6.2% is paid and floating is received. Assume that the yield curve is flat at 6% per annum with continuous compounding, the volatility of the swap rate is 20%, the principal is $100, and payments are exchanged semiannually.

Create the 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);

Price the swaption using the Black model.

Settle = 'Jan-1-2011';
ExerciseDates = 'Jan-1-2016';
Maturity = 'Jan-1-2019'; 
Reset = 2; 
Principal = 100;
Strike = 0.062;
Volatility = 0.2;
OptSpec = 'call';

Price= swaptionbyblk(RateSpec, OptSpec, Strike, Settle, ExerciseDates, Maturity, ...
Volatility, 'Reset', Reset, 'Principal', Principal, 'Basis', Basis)
Price = 2.0710

This example shows Price a European swaption with receiving and paying legs that gives the holder the right to enter in five years into a three-year paying swap where a fixed-rate of 6.2% is paid and floating is received. Assume that the yield curve is flat at 6% per annum with continuous compounding, the volatility of the swap rate is 20%, the principal is $100, and payments are exchanged semiannually.

Rate = 0.06;
Compounding  = -1;
ValuationDate = 'Jan-1-2010';
EndDates =   'Jan-1-2020';
Basis = 1;

Define the RateSpec.

RateSpec = intenvset('ValuationDate',ValuationDate,'StartDates',ValuationDate, ...
'EndDates',EndDates,'Rates',Rate,'Compounding',Compounding,'Basis',Basis);

Define the swaption arguments.

Settle = 'Jan-1-2011';
ExerciseDates = 'Jan-1-2016';
Maturity = 'Jan-1-2019';
Reset = [2 4]; % 1st column represents receiving leg, 2nd column represents paying leg
Principal = 100;
Strike = 0.062;
Volatility = 0.2;
OptSpec = 'call';
Basis = [1 3]; % 1st column represents receiving leg, 2nd column represents paying leg

Price the swaption.

Price= swaptionbyblk(RateSpec,OptSpec,Strike,Settle,ExerciseDates,Maturity,Volatility, ...
'Reset',Reset,'Principal',Principal,'Basis',Basis)
Price =

    1.6494

Price a European swaption that gives the holder the right to enter into a 5-year receiving swap in a year, where a fixed rate of 3% is received and floating is paid. Assume that the 1-year, 2-year, 3-year, 4-year and 5- year zero rates are 3%, 3.4%, 3.7%, 3.9% and 4% with continuous compounding. The swap rate volatility is 21%, the principal is $1000, and payments are exchanged semiannually.

Create the RateSpec.

ValuationDate = 'Jan-1-2010';
EndDates = {'Jan-1-2011';'Jan-1-2012';'Jan-1-2013';'Jan-1-2014';'Jan-1-2015'};
Rates = [0.03; 0.034 ; 0.037; 0.039; 0.04;];
Compounding = -1;
Basis = 1; 

RateSpec = intenvset('ValuationDate', ValuationDate, 'StartDates', ValuationDate, ...
'EndDates', EndDates, 'Rates', Rates, 'Compounding', Compounding,'Basis', Basis)
RateSpec = struct with fields:
           FinObj: 'RateSpec'
      Compounding: -1
             Disc: [5x1 double]
            Rates: [5x1 double]
         EndTimes: [5x1 double]
       StartTimes: [5x1 double]
         EndDates: [5x1 double]
       StartDates: 734139
    ValuationDate: 734139
            Basis: 1
     EndMonthRule: 1

Price the swaption using the Black model.

Settle = 'Jan-1-2011';
ExerciseDates = 'Jan-1-2012'; 
Maturity = 'Jan-1-2017';
Strike = 0.03;
Volatility = 0.21;
Principal =1000;
Reset = 2; 
OptSpec = 'put';

Price = swaptionbyblk(RateSpec, OptSpec, Strike, Settle,  ExerciseDates, ...
Maturity, Volatility,'Basis', Basis, 'Reset', Reset,'Principal', Principal)
Price = 0.5771

Define the OIS and Libor curves.

Settle = datenum('15-Mar-2013');
CurveDates = daysadd(Settle,360*[1/12 2/12 3/12 6/12 1 2 3 4 5 7 10],1);
OISRates = [.0018 .0019 .0021 .0023 .0031 .006  .011 .017 .021 .026 .03]';
LiborRates = [.0045 .0047 .005 .0055 .0075 .0109  .0162 .0216 .0262 .0309 .0348]';

Create an associated RateSpec for the OIS and Libor curves.

OISCurve = intenvset('Rates',OISRates,'StartDate',Settle,'EndDates',CurveDates,'Compounding',2,'Basis',1);
LiborCurve = intenvset('Rates',LiborRates,'StartDate',Settle,'EndDates',CurveDates,'Compounding',2,'Basis',1);

Define the swaption instruments.

ExerciseDate = '15-Mar-2018';
Maturity = {'15-Mar-2020';'15-Mar-2023'};
OptSpec = 'call';
Strike = 0.04;
BlackVol = 0.2;

Price the swaption instruments using the term structure OISCurve both for discounting the cash flows and generating the future forward rates.

Price = swaptionbyblk(OISCurve, OptSpec, Strike, Settle, ExerciseDate, Maturity, BlackVol,'Reset',1)
Price = 

    1.0956
    2.6944

Price the swaption instruments using the term structure LiborCurve to generate the future forward rates. The term structure OISCurve is used for discounting the cash flows.

PriceLC = swaptionbyblk(OISCurve, OptSpec, Strike, Settle, ExerciseDate, Maturity, BlackVol,'ProjectionCurve',LiborCurve,'Reset',1)
PriceLC = 

    1.5346
    3.8142

Create the RateSpec.

ValuationDate = 'Jan-1-2016';
EndDates = {'Jan-1-2017';'Jan-1-2018';'Jan-1-2019';'Jan-1-2020';'Jan-1-2021'};
Rates = [-0.02; 0.024 ; 0.047; 0.090; 0.12;]/100;
Compounding = 1;
Basis = 1;

RateSpec = intenvset('ValuationDate',ValuationDate,'StartDates',ValuationDate, ...
'EndDates',EndDates,'Rates',Rates,'Compounding',Compounding,'Basis',Basis)
RateSpec = 

  struct with fields:

           FinObj: 'RateSpec'
      Compounding: 1
             Disc: [5x1 double]
            Rates: [5x1 double]
         EndTimes: [5x1 double]
       StartTimes: [5x1 double]
         EndDates: [5x1 double]
       StartDates: 736330
    ValuationDate: 736330
            Basis: 1
     EndMonthRule: 1

Price the swaption with a negative strike using the Shifted Black model.

Settle = 'Jan-1-2016';
ExerciseDates = 'Jan-1-2017';
Maturity = 'Jan-1-2020';
Strike = -0.003; % Set -0.3 percent strike.
ShiftedBlackVolatility = 0.31;
Principal = 1000;
Reset = 1;
OptSpec = 'call';
Shift = 0.008; % Set 0.8 percent shift.

Price = swaptionbyblk(RateSpec,OptSpec,Strike,Settle,ExerciseDates, ...
Maturity,ShiftedBlackVolatility,'Basis',Basis,'Reset',Reset,...
'Principal',Principal,'Shift',Shift)
Price =

   12.8301

Create the RateSpec.

ValuationDate = 'Jan-1-2016';
EndDates = {'Jan-1-2017';'Jan-1-2018';'Jan-1-2019';'Jan-1-2020';'Jan-1-2021'};
Rates = [-0.02; 0.024 ; 0.047; 0.090; 0.12;]/100;
Compounding = 1;
Basis = 1;

RateSpec = intenvset('ValuationDate',ValuationDate,'StartDates',ValuationDate, ...
'EndDates',EndDates,'Rates',Rates,'Compounding',Compounding,'Basis',Basis)
RateSpec = 

  struct with fields:

           FinObj: 'RateSpec'
      Compounding: 1
             Disc: [5x1 double]
            Rates: [5x1 double]
         EndTimes: [5x1 double]
       StartTimes: [5x1 double]
         EndDates: [5x1 double]
       StartDates: 736330
    ValuationDate: 736330
            Basis: 1
     EndMonthRule: 1

Price the swaptions with using the Shifted Black model.

Settle = 'Jan-1-2016';
ExerciseDates = 'Jan-1-2017';
Maturities = {'Jan-1-2018';'Jan-1-2019';'Jan-1-2020'};
Strikes = [-0.0034;-0.0032;-0.003];
ShiftedBlackVolatilities = [0.33;0.32;0.31]; % A vector of volatilities.
Principal = 1000;
Reset = 1;
OptSpec = 'call';
Shifts = [0.0085;0.0082;0.008]; % A vector of shifts.

Prices = swaptionbyblk(RateSpec,OptSpec,Strikes,Settle,ExerciseDates, ...
Maturities,ShiftedBlackVolatilities,'Basis',Basis,'Reset',Reset, ...
'Principal',Principal,'Shift',Shifts)
Prices =

    4.1117
    8.0577
   12.8301

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 paying leg is different than the receiving leg, the 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 date character vectors. Settle must not be later than ExerciseDates.

The Settle date input for swaptionbyblk 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

Dates, specified as serial date numbers or date character vectors, on which the swaption expires and the underlying swap starts. The swaption holder can choose to enter into the swap on this date if the situation is favorable.

For a European option, ExerciseDates are a NINST-by-1 vector of exercise dates. Each row is the schedule for one option. When using a European option, there is only one ExerciseDate on the option expiry date.

Data Types: double | char | cell

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

Data Types: double | char | cell

Annual volatilities values, specified as a NINST-by-1 vector of numeric values.

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 = swaptionbyblk(OISCurve,OptSpec,Strike,Settle,ExerciseDate,Maturity,BlackVol,'Reset',1,'Shift',.5)

collapse all

Day-count basis of the instrument. 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. Default is 0 (actual/actual).

  • 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 a NINST-by-1 vector.

Data Types: double

Reset frequency per year for the underlying forward swap, specified as 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

The rate curve to be used in generating the future forward rates. This structure must be created using intenvset. Use this optional input if the forward curve is different from the discount curve.

Data Types: struct

Shift in decimals for the shifted Black model, specified using a scalar or NINST-by-1 vector of rate shifts in positive decimals. Set this parameter to a positive rate shift in decimals to add a positive shift to the forward swap rate and strike, which effectively sets a negative lower bound for the forward swap rate and strike. For example, a Shift of 0.01 is equal to a 1% shift.

Data Types: double

Output Arguments

collapse all

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

More About

collapse all

Forward Swap

A forward swap is a swap that starts at a future date.

Shifted Black

The Shifted Black model is essentially the same as the Black’s model, except that it models the movements of (F + Shift) as the underlying asset, instead of F (which is the forward swap rate in the case of swaptions).

This model allows negative rates, with a fixed negative lower bound defined by the amount of shift; that is, the zero lower bound of Black’s model has been shifted.

Algorithms

collapse all

Black Model

dF=σBlackFdwcall=eγT[FN(d1)KN(d2)]put=eγT[KN(d2)FN(d1)]d1=ln(FK)+(σB22)TσBT,   d2=d1σBTσB=σBlack

Where F is the forward value and K is the strike.

Shifted Black Model

dF=σShifted_Black(F+Shift)dwcall=eγT[(F+Shift)N(ds1)(K+Shift)N(ds2)]put=eγT[(K+Shift)N(ds2)(F+Shift)N(ds1)]ds1=ln(F+ShiftK+Shift)+(σsB22)TσsBT,   ds2=ds1σsBTσsB=σShifted_Black

Where F+Shift is the forward value and K+Shift is the strike for the shifted version.

Introduced before R2006a

Was this topic helpful?