finmodel

Create specified model object type

Description

example

Model = finmodel(ModelType,Name,Value) creates a Model object based on ModelType creates a model object specified by ModelType and specifies options using one or more name-value pair arguments.

For more information on the workflow for creating an instrument object, a model object, and a pricer object, see Get Started with Workflows Using Object-Based Framework for Pricing Financial Instruments.

For more information on the available instruments, models, and pricing methods, see Choose Instruments, Models, and Pricers.

Examples

collapse all

Use finmodel to create a SABR model object.

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

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

Input Arguments

collapse all

Model type, specified as a scalar string or character vector.

These options are available for interest-rate instruments:

  • "Black" — For more information, see Black.

  • "HullWhite" — For more information, see HullWhite.

  • "BlackKarasinski" — For more information, see BlackKarasinski.

  • "Normal" — For more information, see Normal.

  • "Sabr" — For more information, see Sabr.

These options are available for equity instruments:

  • "BlackScholes" — For more information, see BlackScholes.

  • "Heston" — For more information, see Heston.

  • "Bates" — For more information, see Bates.

  • "Merton" — For more information, see Merton.

  • "Dupire" — For more information, see Dupire.

These options are available for credit derivative instruments:

  • "CDSBlack" — For more information, see CDSBlack.

Data Types: string | char

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 quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: Model = finmodel("Black",Name,Value)

The available name-value pair arguments depend on the value you specify for ModelType.

Name-Value Pair Arguments for Interest-Rate Models

Name-Value Pair Arguments for Equity Models

Name-Value Pair Arguments for Credit Derivative Models

Output Arguments

collapse all

Model, returned as a model object.

Introduced in R2020a