Main Content

finmodel

Create specified model object type

Since R2020a

Description

Model = finmodel(ModelType,Name,Value) creates a Model object based on ModelType creates a model object specified by ModelType and specifies model 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.

example

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:

These options are available for inflation instruments:

These options are available for equity instruments:

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

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

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

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

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

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

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

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

These options are available for credit derivative instruments:

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

Data Types: string | char

Name-Value Arguments

Specify 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: 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 Inflation 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.

Version History

Introduced in R2020a

expand all