Main Content

OptionEmbeddedFixedBond

OptionEmbeddedFixedBond instrument object

Description

Create and price a OptionEmbeddedFixedBond instrument object using this workflow:

  1. Use fininstrument to create an OptionEmbeddedFixedBond instrument object.

  2. use finmodel to specify a HullWhite or BlackKarasinski model for the OptionEmbeddedFixedBond instrument.

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

Creation

Description

example

OptionEmbeddedFixedBondObj = fininstrument(InstrumentType,'CouponRate',couponrate_value,'Maturity',maturity_date,'CallSchedule',call_schedule_value) creates a OptionEmbeddedFixedBond object by specifying InstrumentType and sets the properties for the required name-value pair arguments CouponRate, Maturity, and CallSchedule.

The OptionEmbeddedFixedBond instrument supports a vanilla bond with embedded option, stepped coupon bond with embedded option, and an amortizing bond with embedded option. For more information, see More About.

example

OptionEmbeddedFixedBondObj = fininstrument(InstrumentType,'CouponRate',couponrate_value,'Maturity',maturity_date,'PutSchedule',put_schedule_value) creates a OptionEmbeddedFixedBond object by specifying InstrumentType and sets the properties for the required name-value pair arguments CouponRate, Maturity, and PutSchedule.

example

OptionEmbeddedFixedBondObj = fininstrument(___,Name,Value) sets optional properties using additional name-value pairs in addition to the required arguments in the previous syntax. For example, OptionEmbeddedFixedBondObj = fininstrument("OptionEmbeddedFixedBond",'CouponRate',0.034,'Maturity',datetime(2019,1,30),'Period',2,'Basis',1,'Principal',100,'CallSchedule',schedule,'CallExerciseStyle',"American",'Name',"optionembeddedfixedbond_instrument") creates an OptionEmbeddedFixedBond instrument with an American exercise and a call schedule. You can specify multiple name-value pair arguments.

Input Arguments

expand all

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

Data Types: char | string

OptionEmbeddedFixedBond 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: OptionEmbeddedFixedBondObj = fininstrument("OptionEmbeddedFixedBond",'CouponRate',0.034,'Maturity',datetime(2019,1,30),'Period',2,'Basis',1,'Principal',100,'CallSchedule',schedule,'CallExerciseStyle',"American",'Name',"optionembeddedfixedbond_instrument")
Required OptionEmbeddedFixedBond Name-Value Pair Arguments

expand all

Coupon rate for OptionEmbeddedFixedBond, specified as the comma-separated pair consisting of 'CouponRate' as a scalar decimal for an annual rate or a timetable where the first column is dates and the second column is associated rates. The date indicates the last day that the coupon rate is valid.

Data Types: double | timetable

Maturity date for OptionEmbeddedFixedBond, specified as the comma-separated pair consisting of 'Maturity' and a scalar datetime, serial date number, date character vector, or date string.

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: char | double | string | datetime

Call schedule, specified as the comma-separated pair consisting of 'CallSchedule' and a timetable of call dates and strikes.

If you use a date character vector or date string for the dates in this timetable, the format must be recognizable by datetime because the CallSchedule property is stored as a datetime.

Note

The OptionEmbeddedFixedBond instrument supports either CallSchedule and CallExerciseStyle or PutSchedule and PutExerciseStyle, but not both.

Data Types: timetable

Put schedule, specified as the comma-separated pair consisting of 'PutSchedule' and a timetable of call dates and strikes.

If you use a date character vector or date string for dates in this timetable, the format must be recognizable by datetime because the PutSchedule property is stored as a datetime.

Note

The OptionEmbeddedFixedBond instrument supports either CallSchedule and CallExerciseStyle or PutSchedule and PutExerciseStyle, but not both.

Data Types: timetable

Optional OptionEmbeddedFixedBond Name-Value Pair Arguments

expand all

Frequency of payments per year, specified as the comma-separated pair consisting of 'Period' and a scalar integer. Values for Period are: 1, 2, 3, 4, 6, and 12.

Data Types: double

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

Data Types: string | char

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

Data Types: string | char

Day count basis, specified as the comma-separated pair consisting of 'Basis' and scalar integer using one of the following values:

  • 0 — actual/actual

  • 1 — 30/360 (SIA)

  • 2 — actual/360

  • 3 — actual/365

  • 4 — 30/360 (PSA)

  • 5 — 30/360 (ISDA)

  • 6 — 30/360 (European)

  • 7 — actual/365 (Japanese)

  • 8 — actual/actual (ICMA)

  • 9 — actual/360 (ICMA)

  • 10 — actual/365 (ICMA)

  • 11 — 30/360E (ICMA)

  • 12 — actual/365 (ISDA)

  • 13 — BUS/252

For more information, see Basis.

Data Types: double

Notional principal amount or principal value schedule, specified as the comma-separated pair consisting of 'Principal' and a scalar numeric or timetable.

Principal accepts a timetable, where the first column is dates and the second column is the associated notional principal value. The date indicates the last day that the principal value is valid.

Data Types: double | timetable

Flag indicating whether cash flow adjusts for day count convention, specified as the comma-separated pair consisting of 'DaycountAdjustedCashFlow' and a scalar logical with a value of true or false.

Data Types: logical

Business day conventions, specified as the comma-separated pair consisting of 'BusinessDayConvention' and a scalar string or character vector. The selection for business day convention determines how nonbusiness days are treated. Nonbusiness days are defined as weekends plus any other date that businesses are not open (for example, statutory holidays). Values are:

  • "actual" — Nonbusiness days are effectively ignored. Cash flows that fall on non-business days are assumed to be distributed on the actual date.

  • "follow" — Cash flows that fall on a nonbusiness day are assumed to be distributed on the following business day.

  • "modifiedfollow" — Cash flows that fall on a nonbusiness day are assumed to be distributed on the following business day. However if the following business day is in a different month, the previous business day is adopted instead.

  • "previous" — Cash flows that fall on a nonbusiness day are assumed to be distributed on the previous business day.

  • "modifiedprevious" — Cash flows that fall on a nonbusiness day are assumed to be distributed on the previous business day. However if the previous business day is in a different month, the following business day is adopted instead.

Data Types: char | string

Holidays used in computing business days, specified as the comma-separated pair consisting of 'Holidays' and dates using datetimes, serial date numbers, cell array of date character vectors, or date string array. For example:

H = holidays(datetime('today'),datetime(2025,12,15));
OptionEmbeddedFixedBondObj = fininstrument("OptionEmbeddedFixedBond",'CouponRate',0.34,'Maturity',datetime(2025,12,15),...
'CallSchedule',schedule,'CallExerciseStyle',"american",'Holidays',H)

Data Types: double | cell | datetime | string

End-of-month rule flag for generating dates when Maturity is an end-of-month date for a month with 30 or fewer days, specified as the comma-separated pair consisting of 'EndMonthRule' and a scalar logical value of true or false.

  • If you set EndMonthRule to false, the software ignores the rule, meaning that a payment date is always the same numerical day of the month.

  • If you set EndMonthRule to true, the software sets the rule on, meaning that a payment date is always the last actual day of the month.

Data Types: logical

Bond issue date, specified as the comma-separated pair consisting of 'IssueDate' and a scalar datetime, serial date number, date character vector, or date string.

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

Data Types: double | char | string | datetime

Irregular first coupon date, specified as the comma-separated pair consisting of 'FirstCouponDate' and a scalar datetime, serial date number, date character vector, or date string.

When FirstCouponDate and LastCouponDate are both specified, FirstCouponDate takes precedence in determining the coupon payment structure. If you do not specify FirstCouponDate, the cash flow payment dates are determined from other inputs.

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

Data Types: double | char | string | datetime

Irregular last coupon date, specified as the comma-separated pair consisting of 'LastCouponDate' and a scalar datetime, serial date number, date character vector, or date string.

If you specify LastCouponDate but not FirstCouponDate, LastCouponDate determines the coupon structure of the bond. The coupon structure of a bond is truncated at LastCouponDate, regardless of where it falls, and is followed only by the bond's maturity cash flow date. If you do not specify LastCouponDate, the cash flow payment dates are determined from other inputs.

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

Data Types: double | char | string | datetime

Forward starting date of payments, specified as the comma-separated pair consisting of 'StartDate' and a scalar datetime, serial date number, date character vector, or date string.

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

Data Types: char | double | string | datetime

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

Coupon annual rate, returned as a scalar decimal or timetable.

Data Types: double | timetable

Maturity date, returned as a datetime.

Data Types: datetime

Call schedule, returned as a timetable.

Data Types: cell | datetime

Put schedule, returned as a timetable.

Data Types: cell | datetime

Coupons per year, returned as a scalar integer.

Data Types: double

Day count basis, returned as a scalar integer.

Data Types: double

Notional principal amount or principal value schedule, returned as a scalar numeric or timetable.

Data Types: timetable | double

Flag indicating whether cash flow adjusted for day count convention, returned as scalar logical with a value of true or false.

Data Types: logical

Business day conventions, returned as a string

Data Types: string

Holidays used in computing business days, returned as datetimes.

Data Types: datetime

End-of-month rule flag for generating dates when Maturity is an end-of-month date for a month with 30 or fewer days, returned as a scalar logical.

Data Types: logical

Bond issue date, returned as a datetime.

Data Types: datetime

Irregular first coupon date, returned as a datetime.

Data Types: datetime

Irregular last coupon date, returned as a datetime.

Data Types: datetime

Forward starting date of payments, returned as a datetime.

Data Types: datetime

This property is read-only.

Call option exercise style, returned as a string with a value of "European", "American", or "Bermuda".

Data Types: string

This property is read-only.

Put option exercise style, returned as a string with a value of "European", "American", or "Bermuda".

Data Types: string

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

Data Types: string

Object Functions

setCallExercisePolicySet call exercise policy for OptionEmbeddedFixedBond or OptionEmbeddedFloatBond instrument
setPutExercisePolicySet put exercise policy for OptionEmbeddedFixedBond or OptionEmbeddedFloatBond instrument

Examples

collapse all

This example shows the workflow to price American, European, and Bermudan exercise styles for three callable OptionEmbeddedFixedBond instruments when you use a HullWhite model and an IRTree pricing method.

Create ratecurve Object

Create a ratecurve object using ratecurve.

Settle = datetime(2018,1,1);
ZeroTimes = calyears(1:10)';
ZeroRates = [0.0052 0.0055 0.0061 0.0073 0.0094 0.0119 0.0168 0.0222 0.0293 0.0307]';
ZeroDates = Settle + ZeroTimes;
Compounding = 1;
ZeroCurve = ratecurve("zero",Settle,ZeroDates,ZeroRates, "Compounding",Compounding);

Create OptionEmbeddedFixedBond Instrument Objects

Use fininstrument to create three OptionEmbeddedFixedBond instrument objects with the different exercise styles.

Maturity = datetime(2024,1,1);

% Option embedded bond (Bermudan callable bond)
Strike = [100; 100];
ExerciseDates = [datetime(2020,1,1); datetime(2024,1,1)];
Period = 1;
CallSchedule =  timetable(ExerciseDates,Strike,'VariableNames',{'Strike Schedule'}); 

CallableBondBermudan = fininstrument("OptionEmbeddedFixedBond",'Maturity',Maturity,...
                              'CouponRate',0.025,'Period',Period, ...
                              'CallSchedule',CallSchedule,'CallExerciseStyle', "bermudan")
CallableBondBermudan = 
  OptionEmbeddedFixedBond with properties:

                  CouponRate: 0.0250
                      Period: 1
                       Basis: 0
                EndMonthRule: 1
                   Principal: 100
    DaycountAdjustedCashFlow: 0
       BusinessDayConvention: "actual"
                    Holidays: NaT
                   IssueDate: NaT
             FirstCouponDate: NaT
              LastCouponDate: NaT
                   StartDate: NaT
                    Maturity: 01-Jan-2024
                   CallDates: [2x1 datetime]
                    PutDates: [0x1 datetime]
                CallSchedule: [2x1 timetable]
                 PutSchedule: [0x0 timetable]
           CallExerciseStyle: "bermudan"
            PutExerciseStyle: [0x0 string]
                        Name: ""

% Option embedded bond (American callable bond)
Strike = 100;
ExerciseDates = datetime(2024,1,1);
CallSchedule =  timetable(ExerciseDates,Strike,'VariableNames',{'Strike Schedule'}); 
Period = 1;

CallableBondAmerican = fininstrument("OptionEmbeddedFixedBond",'Maturity',Maturity,...
                              'CouponRate',0.025,'Period', Period, ...
                              'CallSchedule',CallSchedule,'CallExerciseStyle',"american")
CallableBondAmerican = 
  OptionEmbeddedFixedBond with properties:

                  CouponRate: 0.0250
                      Period: 1
                       Basis: 0
                EndMonthRule: 1
                   Principal: 100
    DaycountAdjustedCashFlow: 0
       BusinessDayConvention: "actual"
                    Holidays: NaT
                   IssueDate: NaT
             FirstCouponDate: NaT
              LastCouponDate: NaT
                   StartDate: NaT
                    Maturity: 01-Jan-2024
                   CallDates: 01-Jan-2024
                    PutDates: [0x1 datetime]
                CallSchedule: [1x1 timetable]
                 PutSchedule: [0x0 timetable]
           CallExerciseStyle: "american"
            PutExerciseStyle: [0x0 string]
                        Name: ""

% Option embedded bond (European callable bond)
Strike = 100;
ExerciseDates = datetime(2024,1,1);
CallSchedule =  timetable(ExerciseDates,Strike,'VariableNames',{'Strike Schedule'}); 
Period = 1;

CallableBondEuropean = fininstrument("OptionEmbeddedFixedBond",'Maturity',Maturity,...
                              'CouponRate',0.025,'Period',Period, ...
                              'CallSchedule',CallSchedule)                          
CallableBondEuropean = 
  OptionEmbeddedFixedBond with properties:

                  CouponRate: 0.0250
                      Period: 1
                       Basis: 0
                EndMonthRule: 1
                   Principal: 100
    DaycountAdjustedCashFlow: 0
       BusinessDayConvention: "actual"
                    Holidays: NaT
                   IssueDate: NaT
             FirstCouponDate: NaT
              LastCouponDate: NaT
                   StartDate: NaT
                    Maturity: 01-Jan-2024
                   CallDates: 01-Jan-2024
                    PutDates: [0x1 datetime]
                CallSchedule: [1x1 timetable]
                 PutSchedule: [0x0 timetable]
           CallExerciseStyle: "european"
            PutExerciseStyle: [0x0 string]
                        Name: ""

Create HullWhite Model Object

Use finmodel to create a HullWhite model object.

VolCurve = 0.01;
AlphaCurve = 0.1;

HWModel = finmodel("HullWhite",'alpha',AlphaCurve,'sigma',VolCurve);

Create IRTree Pricer Object

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

HWTreePricer = finpricer("IRTree",'Model',HWModel,'DiscountCurve',ZeroCurve,'TreeDates',ZeroDates)
HWTreePricer = 
  HWBKTree with properties:

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

Price OptionEmbeddedFixedBond Instruments

Use price to compute the price and sensitivities for the three OptionEmbeddedFixedBond instruments.

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

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

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

    103.27    -148.28    1375.9    -290.33

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

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

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

     100      0        0        0  

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

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

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

    107.7     0      4086.4    -602.56

This example shows the workflow to price a callable OptionEmbeddedFixedBond instrument and obtain the exercise probabilities when you use a BlackKarasinski model and an IRTree pricing method.

Create ratecurve Object

Create a ratecurve object using ratecurve.

Settle = datetime(2018, 1, 1);
ZeroTimes = calyears(1:4)';
ZeroRates = [0.035; 0.042147; 0.047345; 0.052707];
ZeroDates = Settle + ZeroTimes;
Compounding = 1;
ZeroCurve = ratecurve("zero",Settle,ZeroDates,ZeroRates, "Compounding",Compounding)
ZeroCurve = 
  ratecurve with properties:

                 Type: "zero"
          Compounding: 1
                Basis: 0
                Dates: [4x1 datetime]
                Rates: [4x1 double]
               Settle: 01-Jan-2018
         InterpMethod: "linear"
    ShortExtrapMethod: "next"
     LongExtrapMethod: "previous"

Create OptionEmbeddedFixedBond Instrument Object

Use fininstrument to create an OptionEmbeddedFixedBond instrument object with an American exercise style.

CouponRate = 0.0425;
Strike = [95; 98];
ExerciseDates = [datetime(2021,1,1); datetime(2022,1,1)];
Maturity = datetime(2022,1,1);
Period = 1;
CallSchedule =  timetable(ExerciseDates,Strike,'VariableNames',{'Strike Schedule'}); 
CallableBond = fininstrument("OptionEmbeddedFixedBond", 'Maturity',Maturity,...
                              'CouponRate',CouponRate,'Period', Period, ...
                              'CallSchedule',CallSchedule,...
                              'CallExerciseStyle', "American",...
                              'Name',"MyCallableBond")                
CallableBond = 
  OptionEmbeddedFixedBond with properties:

                  CouponRate: 0.0425
                      Period: 1
                       Basis: 0
                EndMonthRule: 1
                   Principal: 100
    DaycountAdjustedCashFlow: 0
       BusinessDayConvention: "actual"
                    Holidays: NaT
                   IssueDate: NaT
             FirstCouponDate: NaT
              LastCouponDate: NaT
                   StartDate: NaT
                    Maturity: 01-Jan-2022
                   CallDates: [2x1 datetime]
                    PutDates: [0x1 datetime]
                CallSchedule: [2x1 timetable]
                 PutSchedule: [0x0 timetable]
           CallExerciseStyle: "american"
            PutExerciseStyle: [0x0 string]
                        Name: "MyCallableBond"

Create BlackKarasinski Model Object

Use finmodel to create a BlackKarasinski model object.

VolCurve = 0.01;
AlphaCurve = 0.1;
BKModel = finmodel("BlackKarasinski",'alpha',AlphaCurve,'sigma',VolCurve)
BKModel = 
  BlackKarasinski with properties:

    Alpha: 0.1000
    Sigma: 0.0100

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',BKModel,'DiscountCurve',ZeroCurve,'TreeDates',ZeroDates)
BKTreePricer = 
  HWBKTree with properties:

             Tree: [1x1 struct]
        TreeDates: [4x1 datetime]
            Model: [1x1 finmodel.BlackKarasinski]
    DiscountCurve: [1x1 ratecurve]

Price OptionEmbeddedFixedBond Instrument

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

[Price,  PriceResults]= price(BKTreePricer, CallableBond)
Price = 92.5235
PriceResults = 
  priceresult with properties:

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

Examine the output PriceResults.PricerData.PriceTree.ExTree, which contains the exercise indicator arrays. In the cell array, a 1 indicates an exercised option and a 0 indicates an unexercised option.

PriceResults.PricerData.PriceTree.ExTree{5} 
ans = 1×7

     1     1     1     1     1     1     1

No options are exercised.

PriceResults.PricerData.PriceTree.ExTree{4} 
ans = 1×7

     0     0     0     0     0     0     0

The instrument is exercised at all nodes.

PriceResults.PricerData.PriceTree.ExTree{3} 
ans = 1×5

     0     0     0     0     0

No options are exercised.

PriceResults.PricerData.PriceTree.ExTree{2} 
ans = 1×3

     0     0     0

No options are exercised.

View the probability of reaching each node from the root node using PriceResults.PricerData.PriceTree.ProbTree.

PriceResults.PricerData.PriceTree.ProbTree{2}
ans = 1×3

    0.1667    0.6667    0.1667

PriceResults.PricerData.PriceTree.ProbTree{3}
ans = 1×5

    0.0203    0.2206    0.5183    0.2206    0.0203

PriceResults.PricerData.PriceTree.ProbTree{4}
ans = 1×7

    0.0018    0.0395    0.2370    0.4433    0.2370    0.0395    0.0018

PriceResults.PricerData.PriceTree.ProbTree{5}
ans = 1×7

    0.0018    0.0395    0.2370    0.4433    0.2370    0.0395    0.0018

View the exercise probabilities using PriceResults.PricerData.PriceTree.ExProbTree. PriceResults.PricerData.PriceTree.ExProbTree contains the exercise probabilities. Each element in the cell array is an array containing 0's where there is no exercise, or the probability of reaching that node where exercise happens.

PriceResults.PricerData.PriceTree.ExProbTree{5}
ans = 1×7

    0.0018    0.0395    0.2370    0.4433    0.2370    0.0395    0.0018

PriceResults.PricerData.PriceTree.ExProbTree{4}
ans = 1×7

     0     0     0     0     0     0     0

PriceResults.PricerData.PriceTree.ExProbTree{3}
ans = 1×5

     0     0     0     0     0

PriceResults.PricerData.PriceTree.ExProbTree{2}
ans = 1×3

     0     0     0

View the exercise probabilities at each tree level using PriceResults.PricerData.PriceTree.ExProbsByTreeLevel. PriceResults.PricerData.PriceTree.ExProbsByTreeLevel is an array in which each row holds the exercise probability for a given option at each tree observation time.

PriceResults.PricerData.PriceTree.ExProbsByTreeLevel
ans = 1×5

         0         0         0         0    1.0000

More About

expand all

Tips

After creating an OptionEmbeddedFixedBond object, you can modify the CallSchedule and CallExerciseStyle using setCallExercisePolicy. Or, you can modify the PutSchedule and PutExerciseStyle values using setPutExercisePolicy.

Introduced in R2020a