Main Content

FloatBondOption

FloatBondOption instrument object

Description

Create and price a FloatBondOption instrument object using this workflow:

  1. Use fininstrument to create an FloatBondOption instrument object.

  2. Use finmodel to specify a HullWhite or BlackKarasinski model for the FloatBondOption instrument.

  3. Use finpricer to specify an IRTree pricing method for the FloatBondOption 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 FloatBondOption instrument, see Choose Instruments, Models, and Pricers.

Creation

Description

example

FloatBondOptionObj = fininstrument(InstrumentType,'Strike',strike_value,'ExerciseDate',exercise_date,'Bond',bond_obj) creates a FloatBond object by specifying InstrumentType and sets properties using the required name-value pair arguments Strike, ExerciseDate, and Bond.

example

FloatBondOptionObj = fininstrument(___,Name,Value) sets optional properties using additional name-value pair arguments in addition to the required arguments in the previous syntax. For example, FloatBondOptionObj = fininstrument("floatbondoption",'Strike',100,'ExerciseDate',datetime(2019,1,30),'Bond',bond_obj,'OptionType','put','ExerciseStyle',"american",'Name',"float_bond_option") creates a FloatBondOption instrument with a strike of 100 and an American exercise. You can specify multiple name-value pair arguments.

Input Arguments

expand all

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

Data Types: char | string

FloatBondOption 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: FloatBondOptionObj = fininstrument("floatbondoption",'Strike',100,'ExerciseDate',datetime(2019,1,30),'Bond',bond_obj,'OptionType','put','ExerciseStyle',"american",'Name',"float_bond_option")
Required FloatBondOption Name-Value Pair Arguments

expand all

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

Data Types: double

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

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

  • For a Bermudan option, there is a 1-by-NSTRIKES vector of exercise dates.

  • For an American option, the option can be exercised between ValuationDate of the stock tree and the single listed ExerciseDate.

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

Data Types: double | char | string | datetime

Underlying float bond, specified as the comma-separated pair consisting of 'Bond' and the name of a FloatBond object.

Data Types: object

Optional FloatBondOption Name-Value Pair Arguments

expand all

Definition of option, specified as the comma-separated pair consisting of 'OptionType' and a scalar character vector or a string using 'call' or 'put'.

Data Types: char | string

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

Data Types: string | char

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

Data Types: char | string

Properties

expand all

Instrument type, returned as a string with the value "floatbondoption".

Data Types: string

Option strike value, returned as a scalar nonnegative value.

Data Types: double

Option exercise date, returned as a datetime.

Data Types: datetime

Definition of option, returned as a string with the value of "call" or "put".

Data Types: string

Option type, returned as a string with the value of "European", "American", or "Bermudan".

Data Types: string

Underlying float bond, returned as a FloatBond object.

Data Types: object

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

Data Types: string

Object Functions

setExercisePolicySet exercise policy for FixedBondOption, FloatBondOption, or Vanilla instrument

Examples

collapse all

This example shows the workflow to price a FloatBondOption instrument when you use a HullWhite model and an IRTree pricing method.

Create FloatBond Instrument Object

Use fininstrument to create a FloatBond instrument object as the underlying bond.

BondInst = fininstrument("FloatBond",'Maturity',datetime(2030,9,15),'Spread',0.021,'Name',"bond_instrument")
BondInst = 
  FloatBond with properties:

                      Spread: 0.0210
             ProjectionCurve: [0x0 ratecurve]
                 ResetOffset: 0
                       Reset: 2
                       Basis: 0
                EndMonthRule: 1
                   Principal: 100
    DaycountAdjustedCashFlow: 0
       BusinessDayConvention: "actual"
          LatestFloatingRate: NaN
                    Holidays: NaT
                   IssueDate: NaT
             FirstCouponDate: NaT
              LastCouponDate: NaT
                   StartDate: NaT
                    Maturity: 15-Sep-2030
                        Name: "bond_instrument"

Create FloatBondOption Instrument Objects

Use fininstrument to create three callable FloatBondOption instrument objects with European, American, and Bermudan exercise.

FloatBOptionEuro = fininstrument("FloatBondOption",'ExerciseDate',datetime(2029,9,15),'Strike',98,'Bond',BondInst,'OptionType',"call",'ExerciseStyle',"european",'Name',"float_bond_option_european")
FloatBOptionEuro = 
  FloatBondOption with properties:

       OptionType: "call"
    ExerciseStyle: "european"
     ExerciseDate: 15-Sep-2029
           Strike: 98
             Bond: [1x1 fininstrument.FloatBond]
             Name: "float_bond_option_european"

FloatBOptionAmerican = fininstrument("FloatBondOption",'ExerciseDate',datetime(2029,9,15),'Strike',98,'Bond',BondInst,'OptionType',"call",'ExerciseStyle',"american",'Name',"float_bond_option_american")
FloatBOptionAmerican = 
  FloatBondOption with properties:

       OptionType: "call"
    ExerciseStyle: "american"
     ExerciseDate: 15-Sep-2029
           Strike: 98
             Bond: [1x1 fininstrument.FloatBond]
             Name: "float_bond_option_american"

FloatBOptionBermudan = fininstrument("FloatBondOption",'ExerciseDate',[datetime(2025,9,15) ; datetime(2029,09,15)],'Strike',[98,100],'Bond',BondInst,'OptionType',"call",'ExerciseStyle',"bermudan",'Name',"float_bond_option_bermudan")
FloatBOptionBermudan = 
  FloatBondOption with properties:

       OptionType: "call"
    ExerciseStyle: "bermudan"
     ExerciseDate: [15-Sep-2025    15-Sep-2029]
           Strike: [98 100]
             Bond: [1x1 fininstrument.FloatBond]
             Name: "float_bond_option_bermudan"

Create ratecurve Object

Create a ratecurve object using ratecurve.

Settle = datetime(2024,9,15);
Type = 'zero';
ZeroTimes = [calyears([1:10])]';
ZeroRates = [0.0055 0.0061 0.0073 0.0094 0.0119 0.0168 0.0222 0.0293 0.0307 0.0310]';
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-2024
         InterpMethod: "linear"
    ShortExtrapMethod: "next"
     LongExtrapMethod: "previous"

Create a HullWhite Model Object

Use finmodel to create a HullWhite model object.

HullWhiteModel = finmodel("HullWhite",'Alpha',0.01,'Sigma',0.05)
HullWhiteModel = 
  HullWhite with properties:

    Alpha: 0.0100
    Sigma: 0.0500

Create IRTree Pricer Object

Use finpricer to create an IRTree pricer object and use the ratecurve object with the 'DiscountCurve' name-value pair argument.

CFdates = cfdates(Settle, BondInst.Maturity, BondInst.Reset, BondInst.Basis);
HWTreePricer = finpricer("IRTree",'Model',HullWhiteModel,'DiscountCurve',myRC,'TreeDates',CFdates')
HWTreePricer = 
  HWBKTree with properties:

             Tree: [1x1 struct]
        TreeDates: [12x1 datetime]
            Model: [1x1 finmodel.HullWhite]
    DiscountCurve: [1x1 ratecurve]

HWTreePricer.Tree
ans = struct with fields:
     FinObj: 'HWFwdTree'
       tObs: [0 0.4959 1 1.4959 2 2.4959 3 3.4986 4.0027 4.4986 5.0027 5.4986]
       dObs: [1x12 datetime]
     CFlowT: {1x12 cell}
      Probs: {1x11 cell}
    Connect: {1x11 cell}
    FwdTree: {1x12 cell}

Price FixedBondOption Instruments

Use price to compute the price and sensitivities for the two FixedBondOption instruments.

[Price, outPR] = price(HWTreePricer,FloatBOptionEuro,["all"])
Price = 3.8040
outPR = 
  priceresult with properties:

       Results: [1x4 table]
    PricerData: [1x1 struct]

outPR.Results
ans=1×4 table
    Price       Vega        Gamma      Delta 
    _____    ___________    ______    _______

    3.804    -2.6645e-11    110.75    -20.465

[Price, outPR] = price(HWTreePricer,FloatBOptionAmerican,["all"])
Price = 14.1700
outPR = 
  priceresult with properties:

       Results: [1x4 table]
    PricerData: [1x1 struct]

outPR.Results
ans=1×4 table
    Price    Vega    Gamma      Delta 
    _____    ____    ______    _______

    14.17     0      160.87    -38.981

[Price, outPR] = price(HWTreePricer,FloatBOptionBermudan,["all"])
Price = 12.0676
outPR = 
  priceresult with properties:

       Results: [1x4 table]
    PricerData: [1x1 struct]

outPR.Results
ans=1×4 table
    Price        Vega        Gamma      Delta 
    ______    ___________    ______    _______

    12.068    -2.8422e-10    161.55    -39.402

More About

expand all

Tips

After creating a FloatBondOption instrument object, you can use setExercisePolicy to change the size of the options. For example, consider the following instrument:

FloatBOption = fininstrument("FloatBondOption",'ExerciseDate',datetime(2029,9,15),'Strike',98,'Bond',BondInst,'OptionType',"call",'ExerciseStyle',"European")
To modify the size of the FloatBondOption instrument by changing the ExerciseStyle from "European" to "American", use setExercisePolicy:
FloatBOption = setExercisePolicy(FloatBOption,[datetime(2021,1,1) datetime(2022,1,1)],100,'American')

Introduced in R2020a