Main Content

BlackDermanToy

Create BlackDermanToy model object for a Cap, Floor, Swaption, Swap, FloatBond, FixedBond, FixedBondOption, FloatBondOption, OptionEmbeddedFixedBond, or OptionEmbeddedFloatBond instrument

Since R2022b

Description

Create and price a Cap, Floor, Swaption, Swap, FloatBond, FixedBond, FixedBondOption, FloatBondOption, OptionEmbeddedFixedBond, or OptionEmbeddedFloatBond instrument object with a BlackDermanToy model using this workflow:

  1. Use fininstrument to create a Cap, Floor, Swaption, Swap, FloatBond, FixedBond, FixedBondOption, FloatBondOption, OptionEmbeddedFixedBond, or OptionEmbeddedFloatBond instrument object.

  2. Use finmodel to specify a BlackDermanToy model object for the Cap, Floor, Swaption, Swap, FixedBond, FloatBond, FixedBondOption, FloatBondOption, OptionEmbeddedFixedBond, or OptionEmbeddedFloatBond instrument object.

  3. Use finpricer to specify an IRTree pricing method for the Cap, Floor, Swaption, Swap, FixedBond, FloatBond, FixedBondOption, OptionEmbeddedFixedBond, or OptionEmbeddedFloatBond instrument object.

  4. Optionally, when using an OptionEmbeddedFixedBond with an IRTree pricing method and a BlackDermanToy model, you can calculate the option adjusted spread (OAS) using oas.

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 Cap, Floor, Swaption, Swap, FixedBond, FloatBond, FixedBondOption, FloatBondOption, OptionEmbeddedFixedBond, or OptionEmbeddedFloatBond instrument, see Choose Instruments, Models, and Pricers.

Creation

Description

example

BlackDermanToyModelObj = finmodel(ModelType,Sigma=sigma_value) creates a BlackDermanToy model object by specifying ModelType and the required name-value pair argument Sigma to set the properties. For example, BlackDermanToyModelObj = finmodel("BlackDermanToy",Sigma=0.34) creates a BlackDermanToy model object with a Sigma volatility of .34.

Input Arguments

expand all

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

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: BlackDermanToyModelObj = finmodel("BlackDermanToy",Sigma=0.34)

Positive volatility, specified as Sigma and a scalar numeric value or timetable.

Sigma accepts a timetable, where the first column is dates and the second column is the associated Sigma value.

Data Types: double | timetable

Properties

expand all

Positive volatility, returned as a scalar numeric value or timetable.

Data Types: double | timetable

Examples

collapse all

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

Create FixedBond Instrument Object

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

BondInst = fininstrument("FixedBond",Maturity=datetime(2029,9,15),CouponRate=.024,Principal=100,Basis=1,Period=1,Name="fixed_bond")
BondInst = 
  FixedBond with properties:

                  CouponRate: 0.0240
                      Period: 1
                       Basis: 1
                EndMonthRule: 1
                   Principal: 100
    DaycountAdjustedCashFlow: 0
       BusinessDayConvention: "actual"
                    Holidays: NaT
                   IssueDate: NaT
             FirstCouponDate: NaT
              LastCouponDate: NaT
                   StartDate: NaT
                    Maturity: 15-Sep-2029
                        Name: "fixed_bond"

Create FixedBondOption Instrument Object

Use fininstrument to create a FixedBondOption instrument object.

FixedBOption = fininstrument("FixedBondOption",ExerciseDate=datetime(2025,9,15),Strike=80,Bond=BondInst,OptionType="put",ExerciseStyle="american",Name="fixed_bond_option")
FixedBOption = 
  FixedBondOption with properties:

       OptionType: "put"
    ExerciseStyle: "american"
     ExerciseDate: 15-Sep-2025
           Strike: 80
             Bond: [1x1 fininstrument.FixedBond]
             Name: "fixed_bond_option"

Create ratecurve Object

Create a ratecurve object using ratecurve.

Settle = datetime(2019,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,Basis=5)
myRC = 
  ratecurve with properties:

                 Type: "zero"
          Compounding: -1
                Basis: 5
                Dates: [10x1 datetime]
                Rates: [10x1 double]
               Settle: 15-Sep-2019
         InterpMethod: "linear"
    ShortExtrapMethod: "next"
     LongExtrapMethod: "previous"

Create BlackDermanToy Model Object

Use finmodel to create a BlackDermanToy model object.

BlackDermanToyModel = finmodel("BlackDermanToy",Sigma=0.14)
BlackDermanToyModel = 
  BlackDermanToy with properties:

    Sigma: 0.1400

Create IRTree Pricer Object

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

BKTreePricer = finpricer("IRTree",Model=BlackDermanToyModel,DiscountCurve=myRC,TreeDates=ZeroDates)
BKTreePricer = 
  BDTTree with properties:

             Tree: [1x1 struct]
        TreeDates: [10x1 datetime]
            Model: [1x1 finmodel.BlackDermanToy]
    DiscountCurve: [1x1 ratecurve]

BKTreePricer.Tree
ans = struct with fields:
        tObs: [0 1 2 3 4 5 6 7 8 9]
        dObs: [15-Sep-2019    15-Sep-2020    15-Sep-2021    15-Sep-2022    15-Sep-2023    15-Sep-2024    15-Sep-2025    15-Sep-2026    15-Sep-2027    15-Sep-2028]
     FwdTree: {1x10 cell}
    RateTree: {1x10 cell}

Price FixedBondOption Instrument

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

[Price, outPR] = price(BKTreePricer,FixedBOption,"all")
Price = 0.5153
outPR = 
  priceresult with properties:

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

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

    0.51526    106.21    -1973.8    15.402

More About

expand all

Version History

Introduced in R2022b