Main Content

Normal

Create Normal model object for Cap, Floor, or Swaption instrument

Since R2020a

Description

Create and price a Cap, Floor, or Swaption instrument object with a Normal model using this workflow:

  1. Use fininstrument to create a Cap, Floor, or Swaption instrument object.

  2. Use finmodel to specify a Normal model object for the Cap, Floor, or Swaption instrument object.

  3. Use finpricer to specify a Normal pricing method for the Cap, Floor, or 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 Cap, Floor, or Swaption instrument, see Choose Instruments, Models, and Pricers.

Creation

Description

example

NormalModelObj = finmodel(ModelType,'Volatility',volatility_value) creates a Normal model object by specifying ModelType and the required name-value pair argument Volatility to set properties using name-value pair arguments. For example, NormalModelObj = finmodel("Normal",'Volatility',0.063) creates a Normal model object.

Input Arguments

expand all

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

Data Types: char | string

Name-Value Arguments

Specify required 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: NormalModelObj = finmodel("Normal",'Volatility',0.063)

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

Data Types: double

Properties

expand all

Volatility value, returned as a scalar nonnegative numeric.

Data Types: double

Examples

collapse all

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

Create Cap Instrument Object

Use fininstrument to create a Cap instrument object.

CapOpt = fininstrument("Cap",'Strike',0.51,'Maturity',datetime(2019,6,25),'Reset',4,'Principal',100,'Basis',8,'Name',"cap_option")
CapOpt = 
  Cap with properties:

                      Strike: 0.5100
                    Maturity: 25-Jun-2019
                 ResetOffset: 0
                       Reset: 4
                       Basis: 8
                   Principal: 100
             ProjectionCurve: [0x0 ratecurve]
    DaycountAdjustedCashFlow: 0
       BusinessDayConvention: "actual"
                    Holidays: NaT
                        Name: "cap_option"

Create Normal Model Object

Use finmodel to create a Normal model object.

NormalModel = finmodel("normal",'Volatility',0.063)
NormalModel = 
  Normal with properties:

    Volatility: 0.0630

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 Normal Pricer Object

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

outPricer = finpricer("analytic",'Model',NormalModel,'DiscountCurve',myRC)
outPricer = 
  Normal with properties:

    DiscountCurve: [1x1 ratecurve]
            Shift: 0
            Model: [1x1 finmodel.Normal]

Price Cap Instrument

Use price to compute the price for the Cap instrument.

Price = price(outPricer,CapOpt)
Price = 9.3325e-30

More About

expand all

Version History

Introduced in R2020a