Main Content

Levy

Create Levy pricer object for Asian instrument using BlackScholes model

Since R2020a

Description

Create and price a Asian instrument object with a BlackScholes model and a Levy pricing method using this workflow:

  1. Use fininstrument to create an Asian instrument object.

  2. Use finmodel to specify a BlackScholes model for the Asian instrument object.

  3. Use finpricer to specify a Levy pricer object for the Asian 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 instruments, models, and pricing methods for an Asian instrument, see Choose Instruments, Models, and Pricers.

Creation

Description

LevyPricerObj = finpricer(PricerType,'DiscountCurve',ratecurve_obj,'Model',model,'SpotPrice',spotprice_value) creates a Levy pricer object by specifying PricerType and sets the properties for the required name-value pair arguments DiscountCurve, Model, and SpotPrice.

example

LevyPricerObj = finpricer(___,Name,Value) to set optional properties using additional name-value pairs in addition to the required arguments in the previous syntax. For example, LevyPricerObj = finpricer("Analytic",'DiscountCurve',ratecurve_obj,'Model',BSModel,'SpotPrice',1000,'DividendType',"continuous",'DividendValue',100,'PricingMethod',"Levy") creates a Levy pricer object.

example

Input Arguments

expand all

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

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: LevyPricerObj = finpricer("Analytic",'DiscountCurve',ratecurve_obj,'Model',BSModel,'SpotPrice',1000,'DividendType',"continuous",'DividendValue',100,'PricingMethod',"Levy")

Required Levy Name-Value Pair Arguments

expand all

ratecurve object for discounting cash flows, specified as the comma-separated pair consisting of 'DiscountCurve' and the name of a previously created ratecurve object.

Note

Specify a flat ratecurve object for DiscountCurve. If you use a nonflat ratecurve object, the software uses the rate in the ratecurve object at Maturity and assumes that the value is constant for the life of the equity option.

Data Types: object

Model, specified as the comma-separated pair consisting of 'Model' and the name of a previously created BlackScholes model object using finmodel.

Data Types: object

Current price of the underlying asset, specified as the comma-separated pair consisting of 'SpotPrice' and a scalar nonnegative numeric.

Data Types: double

Optional Levy Name-Value Pair Arguments

expand all

Dividend type, specified as the comma-separated pair consisting of 'DividendType' and a string or character vector for a continuous dividend yield.

Data Types: char | string

Dividend yield for the underlying stock, specified as the comma-separated pair consisting of 'DividendValue' and a scalar numeric for a dividend yield or a timetable for a dividend schedule.

Note

Specify a scalar if DividendType is "continuous" and a timetable if DividendType is "cash".

Data Types: double | timetable

Analytic pricing method, specified as the comma-separated pair consisting of 'PricingMethod' and a character vector or string.

Note

The default pricing method for a BlackScholes model is a BlackScholes pricer.

Data Types: double

Properties

expand all

ratecurve object for discounting cash flows, returned as a ratecurve object.

Data Types: object

Model, returned as a BlackScholes model object.

Data Types: object

Current price of the underlying asset, returned as a scalar nonnegative numeric.

Data Types: double

This property is read-only.

Dividend type, returned as a string.

Data Types: string

Dividend yield or dividend schedule for the underlying stock, returned as a scalar numeric for a dividend yield or a timetable for a dividend schedule.

Data Types: double | timetable

Analytic pricing method, returned as a string.

Data Types: string

Object Functions

priceCompute price for interest-rate, equity, or credit derivative instrument with Analytic pricer

Examples

collapse all

This example shows the workflow to price an Asian instrument when you use a BlackScholes model and a Levy 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.32)
BlackScholesModel = 
  BlackScholes with properties:

     Volatility: 0.3200
    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 Levy Pricer Object

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

outPricer = finpricer("analytic",'Model',BlackScholesModel,'DiscountCurve',myRC,'SpotPrice',100,'PricingMethod',"Levy")
outPricer = 
  Levy 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 = 
13.0014
outPR = 
  priceresult with properties:

       Results: [1x7 table]
    PricerData: []

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

    13.001    -0.3749    0.0094403    -2.8836    44.586    -0.71607    -121.97

This example shows the workflow to price an Asian instrument for an arithmetic average currency option when you use a BlackScholes model and a Levy pricing method. Assume that the current exchange rate is $0.52 and has a volatility of 12% per annum. The annualized continuously compounded foreign risk-free rate is 8% per annum.

Create Asian Instrument Object

Use fininstrument to create an Asian instrument object.

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

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

Create BlackScholes Model Object

Use finmodel to create a BlackScholes model object.

Sigma = .12;
BlackScholesModel = finmodel("BlackScholes",'Volatility',Sigma)
BlackScholesModel = 
  BlackScholes with properties:

     Volatility: 0.1200
    Correlation: 1

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

Use finpricer to create a Levy pricer object and use the ratecurve object for the 'DiscountCurve' name-value pair argument. When you price currencies using a Asian instrument for an arithmetic average currency option, DividendType must be "continuous" and DividendValue is the annualized risk-free interest rate in the foreign country.

ForeignRate = 0.08;
outPricer = finpricer("analytic",'Model',BlackScholesModel,'DiscountCurve',myRC,'SpotPrice',.52,'DividendType',"continuous",'DividendValue',ForeignRate,'PricingMethod',"Levy")
outPricer = 
  Levy with properties:

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

Price Asian FX Instrument

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

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

       Results: [1x7 table]
    PricerData: []

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

    0.053516    -0.62792    3.8371    -6.1014    0.15613    -0.010917    -0.82694

Version History

Introduced in R2020a