BlackScholes

Create BlackScholes model object for an Asian, Barrier, Lookback, Spread, or Vanilla instrument

Description

Create and price a Vanilla, Lookback, Barrier, Asian, or Spread instrument object with a BlackScholes model using this workflow:

  1. Use fininstrument to create a Vanilla, Lookback, Barrier, Asian, or Spread instrument object.

  2. Use finmodel to specify the BlackScholes model object for a Vanilla, Lookback, Barrier, Asian, or Spread instrument.

  3. Use finpricer to specify a supported pricing method. For more information on the available pricing methods for the Vanilla, Lookback, Barrier, Asian, or Spread instrument when using a BlackScholes model, see Choose Instruments, Models, and Pricers.

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 Vanilla, Lookback, Barrier, Asian, or Spread instrument when using a BlackScholes model, see Choose Instruments, Models, and Pricers.

Creation

Description

example

BlackScholesModelObj = finmodel(ModelType,'Volatility',volatility_value) creates a BlackScholes model object by specifying ModelType and sets the properties for the required name-value pair argument Volatility.

BlackScholesModelObj = finmodel(___,Name,Value) sets optional properties using additional name-value pairs in addition to the required arguments in the previous syntax. For example, BlackScholesModelObj = finmodel("BlackScholes",'Volatility',0.032) creates a BlackScholes model object. You can specify multiple name-value pair arguments.

Input Arguments

expand all

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

Data Types: char | string

BlackScholes Name-Value Pair Arguments

Specify required and 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: BlackScholesModelObj = finmodel("BlackScholes",'Volatility',0.032)

Required BlackScholes Name-Value Pair Arguments

expand all

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

Data Types: double

Optional BlackScholes Name-Value Pair Arguments

expand all

Correlation between the underlying asset prices, specified as the comma-separated pair consisting of 'Corr' and a scalar numeric.

Data Types: double

Properties

expand all

Volatility value, returned as a scalar nonnegative numeric.

Data Types: double

Correlation between underlying asset prices, returned as a scalar numeric.

Data Types: double

Examples

collapse all

This example shows the workflow to price an Asian instrument when you use a BlackScholes model and a TurnbullWakeman pricing method.

Create Asian Instrument Object

Use fininstrument to create an Asian instrument object.

AsianOpt = fininstrument("Asian",'ExerciseDate',datetime(2022,9,15),'Strike',105,'OptionType',"put",'ExerciseStyle',"european",'Name',"asian_option")
AsianOpt = 
  Asian with properties:

          OptionType: "put"
              Strike: 105
         AverageType: "arithmetic"
        AveragePrice: 0
    AverageStartDate: NaT
       ExerciseStyle: "european"
        ExerciseDate: 15-Sep-2022
                Name: "asian_option"

Create BlackScholes Model Object

Use finmodel to create a BlackScholes model object.

BlackScholesModel = finmodel("BlackScholes",'Volatility',0.28)
BlackScholesModel = 
  BlackScholes with properties:

     Volatility: 0.2800
    Correlation: 1

Create ratecurve Object

Create a flat ratecurve object using ratecurve.

Settle = datetime(2018,9,15);
Maturity = datetime(2023,9,15);
Rate = 0.035;
myRC = ratecurve('zero',Settle,Maturity,Rate,'Basis',12)
myRC = 
  ratecurve with properties:

                 Type: "zero"
          Compounding: -1
                Basis: 12
                Dates: 15-Sep-2023
                Rates: 0.0350
               Settle: 15-Sep-2018
         InterpMethod: "linear"
    ShortExtrapMethod: "next"
     LongExtrapMethod: "previous"

Create TurnbullWakeman Pricer Object

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

outPricer = finpricer("analytic",'Model',BlackScholesModel,'DiscountCurve',myRC,'SpotPrice',100,'PricingMethod',"TurnbullWakeman")
outPricer = 
  TurnbullWakeman with properties:

    DiscountCurve: [1x1 ratecurve]
            Model: [1x1 finmodel.BlackScholes]
        SpotPrice: 100
    DividendValue: 0
     DividendType: "continuous"

Price Asian Instrument

Use price to compute the price and sensitivities for the Asian instrument.

[Price, outPR] = price(outPricer,AsianOpt,["all"])
Price = 11.2249
outPR = 
  priceresult with properties:

       Results: [1x7 table]
    PricerData: []

outPR.Results 
ans=1×7 table
    Price      Delta       Gamma     Lambda      Vega      Theta       Rho  
    ______    ________    _______    _______    ______    _______    _______

    11.225    -0.38072    0.01087    -3.3917    44.242    -0.5256    -116.88

Introduced in R2020a