Spread

Spread instrument object

Description

Create and price a Spread instrument object using this workflow:

  1. Use fininstrument to create a Spread instrument object.

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

  3. Use finpricer to specify a Kirk or BjerksundStensland pricing method for the Spread instrument.

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 models and pricing methods for a Spread instrument, see Choose Instruments, Models, and Pricers.

Creation

Description

example

SpreadObj = fininstrument(InstrumentType,'Strike',strike_value,'ExerciseDate',exercise_date) creates a Spread object by specifying InstrumentType and sets the properties for the required name-value pair arguments Strike and ExerciseDate.

example

SpreadObj = fininstrument(___,Name,Value) sets optional properties using additional name-value pairs in addition to the required arguments in the previous syntax. For example, SpreadObj = fininstrument("Spread",'Strike',100,'ExerciseDate',datetime(2019,1,30),'OptionType',"put",'ExerciseStyle',"American",'Name',"spread_instrument") creates a Spread put option with an American exercise. You can specify multiple name-value pair arguments.

Input Arguments

expand all

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

Data Types: char | string

Spread 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: SpreadObj = fininstrument("Spread",'Strike',100,'ExerciseDate',datetime(2019,1,30),'OptionType',"put",'ExerciseStyle',"American",'Name',"spread_instrument")

Required Spread Name-Value Pair Arguments

expand all

Option strike price value, specified as the comma-separated pair consisting of 'Strike' and a scalar nonnegative numeric value.

Data Types: double

Option exercise date, specified as the comma-separated pair consisting of 'ExerciseDate' and a scalar datetime, serial date number, date character vector, or date string.

Note

For a European option, there is only one ExerciseDate on the option expiry date.

If you use a date character vector or date string, the format must be recognizable by datetime because the ExerciseDate property is stored as a datetime.

Data Types: double | char | string | datetime

Optional Spread Name-Value Pair Arguments

expand all

Option type, specified as the comma-separated pair consisting of 'OptionType' and a scalar string or character vector.

Data Types: char | string

Option exercise style, specified as the comma-separated pair consisting of 'ExerciseStyle' and a scalar string or character vector.

Data Types: string | char

User-defined name for the instrument, specified as the comma-separated pair consisting of 'Name' and a scalar string or character vector.

Data Types: char | string

Properties

expand all

Option strike price value, returned as a scalar nonnegative numeric value.

Data Types: double

Option exercise date, returned as a datetime.

Data Types: datetime

Option type, returned as a string with a value of "call" or "put".

Data Types: string

Option exercise style, returned as a string with a value of "European".

Data Types: string

User-defined name for the instrument, returned as a string.

Data Types: string

Examples

collapse all

This example shows the workflow to price a Spread instrument with an American option when using a BlackScholes model and a BjerksundStensland pricing method.

Create Spread Instrument Object

Use fininstrument to create a Spread instrument object.

SpreadOpt = fininstrument("Spread",'Strike',105,'ExerciseDate',datetime(2021,9,15),'OptionType',"put",'ExerciseStyle',"european",'Name',"spread_option")
SpreadOpt = 
  Spread with properties:

       OptionType: "put"
    ExerciseStyle: "european"
     ExerciseDate: 15-Sep-2021
           Strike: 105
             Name: "spread_option"

Create BlackScholes Model Object

Use finmodel to create a BlackScholes model object.

BlackScholesModel = finmodel("BlackScholes",'Volatility',[0.2 ; 0.1])
BlackScholesModel = 
  BlackScholes with properties:

     Volatility: [2x1 double]
    Correlation: [2x2 double]

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

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

outPricer = finpricer("analytic",'Model',BlackScholesModel,'DiscountCurve',myRC,'SpotPrice',[103 ; 105],'DividendValue',[.025 , 028],'PricingMethod',"BjerksundStensland")
outPricer = 
  BjerksundStensland with properties:

    DiscountCurve: [1x1 ratecurve]
            Model: [1x1 finmodel.BlackScholes]
        SpotPrice: [2x1 double]
    DividendValue: [0.0250 28]
     DividendType: "continuous"

Price Spread Instrument

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

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

       Results: [1x7 table]
    PricerData: []

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

    12.564    -0.38878           0    0.010159           0    -3.1872          0    64.665         0    -1.3159    -157.75

This example shows the workflow to price a commodity Spread instrument when you use a BlackScholes model and Kirk and BjerksundStensland analytic pricing methods.

Understanding Crack Spread Options

In the petroleum industry, refiners are concerned about the difference between their input costs (crude oil) and output prices (refined products — gasoline, heating oil, diesel fuel, and so on). The differential between these two underlying commodities is referred to as a crack spread. It represents the profit margin between crude oil and the refined products.

A spread option is an option on the spread where the holder has the right, but not the obligation, to enter into a spot or forward spread contract. Crack spread options are often used to protect against declines in the crack spread or to monetize volatility or price expectations on the spread.

Define the Commodity

Assume that current gasoline prices are strong, and you want to model a crack spread option strategy to protect the gasoline margin. A crack spread option strategy is used to maintain profits for the following season. The WTI crude oil futures are at $93.20 per barrel and RBOB gasoline futures contract are at $2.85 per gallon.

Strike = 20;
Rate = 0.05;

Settle = datetime(2020,1,1);
Maturity = datemnth(Settle,3);

% Price and volatility of RBOB gasoline
PriceGallon1 = 2.85;          % Dollars per gallon
Price1 = PriceGallon1 * 42;   % Dollars per barrel
Vol1 = 0.29;

% Price and volatility of WTI crude oil
Price2 = 93.20;         % Dollars per barrel
Vol2 = 0.36;

% Correlation between the prices of the commodities
Corr = 0.42;

Create Spread Instrument Object

Use fininstrument to create a Spread instrument object.

SpreadOpt = fininstrument("Spread", 'ExerciseDate', Maturity, 'Strike', Strike,'ExerciseStyle',"european",'Name',"spread_instrument")
SpreadOpt = 
  Spread with properties:

       OptionType: "call"
    ExerciseStyle: "european"
     ExerciseDate: 01-Apr-2020
           Strike: 20
             Name: "spread_instrument"

Create BlackScholes Model Object

Use finmodel to create a BlackScholes model object.

BlackScholesModel = finmodel("BlackScholes", 'Volatility', [Vol1; Vol2], 'Correlation', [1 Corr; Corr 1]);

Create ratecurve Object

Create a flat ratecurve object using ratecurve.

ZeroCurve = ratecurve('zero', Settle, Maturity, Rate, 'Basis', 1);

Create BjerksundStensland Pricer Object

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

BJSPricer = finpricer("Analytic", 'Model', BlackScholesModel, 'SpotPrice', [Price1; Price2], 'DiscountCurve', ZeroCurve,'PricingMethod', "BjerksundStensland");

Create Kirk Pricer Object

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

KirkPricer = finpricer("Analytic", 'Model', BlackScholesModel,'SpotPrice', [Price1; Price2], 'DiscountCurve', ZeroCurve,'PricingMethod', "Kirk");

Price Spread Instrument Using BjerksundStensland and Kirk Analytic Pricing Methods

Use price to compute the price and sensitivities for the commodity Spread instrument.

[PriceKirk, outPR_Kirk] = price(KirkPricer, SpreadOpt, "all");
[PriceBJS,  outPR_BJS]  = price(BJSPricer,  SpreadOpt, "all");

[outPR_Kirk.Results; outPR_BJS.Results]
ans=2×7 table
    Price           Delta                  Gamma                 Lambda                Vega           Theta      Rho  
    _____    ___________________    ____________________    _________________    ________________    _______    ______

    11.19    0.67224    -0.60665    0.019081    0.021662    7.1907    -6.4891    11.299    9.8869    -14.539    3.1841
     11.2    0.67371    -0.60816    0.018992    0.021572    7.2003    -6.4997    11.198    9.9878    -14.555    3.1906

More About

expand all

Introduced in R2020a