Main Content

SABR

Create SABR model object for Swaption instrument

Since R2020a

Description

Create and price a Swaption instrument object with a SABR model using this workflow:

  1. Use fininstrument to create a Swaption instrument object.

  2. Use finmodel to specify a SABR model object for the Swaption instrument object.

  3. Use finpricer to specify a SABR pricing method for the Swaption instrument object.

For more information on this workflow, see Get Started with Workflows Using Object-Based Framework for Pricing Financial Instruments.

For more information on the available pricing methods for a Swaption instrument, see Choose Instruments, Models, and Pricers.

Creation

Description

SabrModelObj = finmodel(ModelType,'Alpha',alpha_value,'Beta',beta_value,'Rho',rho_value,'Nu',nu_value) creates a SABR model object by specifying ModelType and sets the properties for the required name-value pair arguments Alpha, Beta, Rho, and Nu.

example

SabrModelObj = finmodel(___,Name,Value) sets optional properties using additional name-value pairs in addition to the required arguments in the previous syntax. For example, SabrModelObj = finmodel("SABR",'Alpha',0.22,'Beta',0.007,'Rho',0.009,'Nu',0.03,'Shift',0.002,'VolatilityType',"black") creates a SABR model object. You can specify multiple name-value pair arguments.

example

Input Arguments

expand all

Model type, specified as a string with the value of "SABR" or a character vector with the value of 'SABR'.

Data Types: char | string

Name-Value Arguments

Specify required and optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: SabrModelObj = finmodel("SABR",'Alpha',0.22,'Beta',0.007,'Rho',0.009,'Nu',0.03,'Shift',0.002,'VolatilityType',"black")

Required SABR Name-Value Pair Arguments

expand all

Current SABR volatility, specified as the comma-separated pair consisting of 'Alpha' and a scalar numeric.

Data Types: double

SABR constant elasticity of variance (CEV) exponent, specified as the comma-separated pair consisting of 'Beta' and a scalar numeric.

Note

Set the Beta parameter to 0 to allow a negative ForwardValue and Strike.

Data Types: double

Correlation between the forward value and volatility, specified as the comma-separated pair consisting of 'Rho' and a scalar numeric.

Data Types: double

Volatility of volatility, specified as the comma-separated pair consisting of 'Nu' and a scalar numeric.

Data Types: double

Optional SABR Name-Value Pair Arguments

expand all

Shift in decimals for the shifted SABR model (to be used with the shifted Black model), specified as the comma-separated pair consisting of 'Shift' and a scalar positive decimal value. For example, a Shift value of 0.01 is equal to a 1% positive shift.

Note

If you set VolatilityType to 'normal', the Shift value must be 0.

Data Types: double

Model used by the implied volatility sigma, specified as the comma-separated pair consisting of 'VolatilityType' and a scalar string or character vector.

Note

The value of VolatilityType affects the interpretation of the implied volatility ("sigma").

  • If you set VolatilityType to 'black' (default), “sigma” can be either implied Black (no shift) or implied shifted Black volatility.

  • If you set VolatilityType to 'normal', “sigma” is the implied Normal (Bachelier) volatility and you must also set Shift to zero.

Data Types: char | string

Properties

expand all

Current SABR volatility, returned as a scalar numeric.

Data Types: double

SABR constant elasticity of variance (CEV) exponent, returned as a scalar numeric.

Data Types: double

Correlation between forward value and volatility, returned as a scalar numeric.

Data Types: double

Volatility of volatility, returned as a scalar numeric.

Data Types: double

Shift in decimals for the shifted SABR model (to be used with the Shifted Black model), returned as a scalar positive decimal value.

Data Types: double

Model used by the implied volatility sigma, returned as a string with a value of "black" or "normal".

Data Types: string

Examples

collapse all

This example shows the workflow to price a Swaption instrument when you use a SABR model and a SABR pricing method.

Create ratecurve Object

Create a ratecurve object using ratecurve.

Settle = datetime(2018,9,15);
Type = 'zero';
ZeroTimes = [calmonths(6) calyears([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 = Settle + ZeroTimes;
 
myRC = ratecurve('zero',Settle,ZeroDates,ZeroRates)
myRC = 
  ratecurve with properties:

                 Type: "zero"
          Compounding: -1
                Basis: 0
                Dates: [10x1 datetime]
                Rates: [10x1 double]
               Settle: 15-Sep-2018
         InterpMethod: "linear"
    ShortExtrapMethod: "next"
     LongExtrapMethod: "previous"

Create Swap Instrument Object

Use fininstrument to create the underlying Swap instrument object.

Swap = fininstrument("Swap",'Maturity',datetime(2023,1,30),'LegRate',[0.018 0.24],'LegType',["fixed","float"],'Basis',5,'Notional',1000,'StartDate',datetime(2020,3,30),'DaycountAdjustedCashFlow',true,'BusinessDayConvention',"follow",'ProjectionCurve',myRC,'Name',"swap_instrument")
Swap = 
  Swap with properties:

                     LegRate: [0.0180 0.2400]
                     LegType: ["fixed"    "float"]
                       Reset: [2 2]
                       Basis: [5 5]
                    Notional: 1000
          LatestFloatingRate: [NaN NaN]
                 ResetOffset: [0 0]
    DaycountAdjustedCashFlow: [1 1]
             ProjectionCurve: [1x2 ratecurve]
       BusinessDayConvention: ["follow"    "follow"]
                    Holidays: NaT
                EndMonthRule: [1 1]
                   StartDate: 30-Mar-2020
                    Maturity: 30-Jan-2023
                        Name: "swap_instrument"

Create Swaption Instrument Object

Use fininstrument to create a Swaption instrument object.

Swaption = fininstrument("swaption",'Strike',0.25,'ExerciseDate',datetime(2021,7,30),'Swap',Swap,'OptionType',"put",'ExerciseStyle',"european",'Name',"swaption_instrument")
Swaption = 
  Swaption with properties:

       OptionType: "put"
    ExerciseStyle: "european"
     ExerciseDate: 30-Jul-2021
           Strike: 0.2500
             Swap: [1x1 fininstrument.Swap]
             Name: "swaption_instrument"

Create SABR Model Object

Use finmodel to create a SABR model object.

SabrModel = finmodel("SABR",'Alpha',0.032,'Beta',0.04, 'Rho', .08, 'Nu', 0.49,'Shift',0.002)
SabrModel = 
  SABR with properties:

             Alpha: 0.0320
              Beta: 0.0400
               Rho: 0.0800
                Nu: 0.4900
             Shift: 0.0020
    VolatilityType: "black"

Create SABR Pricer Object

Use finpricer to create a SABR pricer object and use the ratecurve object for the 'DiscountCurve' name-value pair argument.

outPricer = finpricer("analytic",'Model',SabrModel,'DiscountCurve',myRC)
outPricer = 
  SABR with properties:

    DiscountCurve: [1x1 ratecurve]
            Model: [1x1 finmodel.SABR]

Price Swaption Instrument

Use price to compute the price for the Swaption instrument.

Price = price(outPricer,Swaption)
Price = 
55.8596

More About

expand all

Version History

Introduced in R2020a