OptionEmbeddedFixedBond
Description
Create and price a OptionEmbeddedFixedBond
instrument
object for one or more Option Embedded Fixed Bond instruments using this
workflow:
Use
fininstrument
to create anOptionEmbeddedFixedBond
instrument object for one or more Option Embedded Fixed Bond instruments.use
finmodel
to specify aHullWhite
,BlackKarasinski
,BlackDermanToy
,BraceGatarekMusiela
,SABRBraceGatarekMusiela
,CoxIngersollRoss
, orLinearGaussian2F
model for theOptionEmbeddedFixedBond
instrument object.Choose a pricing method.
When using a
HullWhite
,BlackKarasinski
,CoxIngersollRoss
, orBlackDermanToy
model, usefinpricer
to specify anIRTree
pricing method for one or moreOptionEmbeddedFixedBond
instruments.When using a
HullWhite
,BlackKarasinski
,BraceGatarekMusiela
,SABRBraceGatarekMusiela
, orLinearGaussian2F
model, usefinpricer
to specify anIRMonteCarlo
pricing method for one or moreOptionEmbeddedFixedBond
instruments.
Optionally, when using an
IRTree
pricing method, you can compute the option adjusted spread (OAS) for one or moreOptionEmbeddedFixedBond
instruments usingoas
.
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
Syntax
Description
creates a OptionEmbeddedFixedBondObj
= fininstrument(InstrumentType
,'CouponRate
',couponrate_value,'Maturity
',maturity_date,'CallSchedule
',call_schedule_value)OptionEmbeddedFixedBond
object for one or more
Option Embedded Fixed Bond instruments 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.
creates a OptionEmbeddedFixedBondObj
= fininstrument(InstrumentType
,'CouponRate
',couponrate_value,'Maturity
',maturity_date,'PutSchedule
',put_schedule_value)OptionEmbeddedFixedBond
object for one or more
Option Embedded Fixed Bond instruments by specifying
InstrumentType
and sets the properties
for the required name-value pair arguments CouponRate
,
Maturity
, and
PutSchedule
.
sets optional properties
using additional name-value pairs in addition to the required arguments in
the previous syntax. For example, OptionEmbeddedFixedBondObj
= fininstrument(___,Name,Value
)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
InstrumentType
— Instrument type
string with value
"OptionEmbeddedFixedBond"
| string array with values of
"OptionEmbeddedFixedBond"
| character vector with value
'OptionEmbeddedFixedBond'
| cell array of character vectors with values of
'OptionEmbeddedFixedBond'
Instrument type, specified as a string with the value of
"OptionEmbeddedFixedBond"
, a character vector
with the value of 'OptionEmbeddedFixedBond'
, an
NINST
-by-1
string array with
values of "OptionEmbeddedFixedBond"
, or an
NINST
-by-1
cell array of
character vectors with values of
'OptionEmbeddedFixedBond'
.
Data Types: char
| cell
| string
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: OptionEmbeddedFixedBondObj =
fininstrument("OptionEmbeddedFixedBond",'CouponRate',0.034,'Maturity',datetime(2019,1,30),'Period',2,'Basis',1,'Principal',100,'CallSchedule',schedule,'CallExerciseStyle',"American",'Name',"optionembeddedfixedbond_instrument")
OptionEmbeddedFixedBond
Name-Value Pair
ArgumentsCouponRate
— Coupon rate for OptionEmbeddedFixedBond
scalar decimal | vector of decimals | timetable
Coupon rate for OptionEmbeddedFixedBond
,
specified as the comma-separated pair consisting of
'CouponRate'
as a scalar decimal or an
NINST
-by-1
vector of
decimals 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.
Note
If you are creating one or more
OptionEmbeddedFixedBond
instruments and
use a timetable, the timetable specification applies to all of
the OptionEmbeddedFixedBond
instruments.
CouponRate
does not accept an
NINST
-by-1
cell array
of timetables as input.
Data Types: double
| timetable
Maturity
— Maturity date for OptionEmbeddedFixedBond
datetime array | string array | date character vector
Maturity date for OptionEmbeddedFixedBond
,
specified as the comma-separated pair consisting of
'Maturity'
and a scalar or an
NINST
-by-1
vector using a
datetime array, string array, or date character vectors.
To support existing code, OptionEmbeddedFixedBond
also
accepts serial date numbers as inputs, but they are not recommended.
If you use date character vectors or strings, the format must be
recognizable by datetime
because
the Maturity
property is stored as a
datetime.
CallSchedule
— Call schedule
timetable
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.
If you are creating one or more
OptionEmbeddedFixedBond
instruments
and use a timetable, the timetable specification applies to
all of the OptionEmbeddedFixedBond
instruments. CallSchedule
does not accept
an NINST
-by-1
cell
array of timetables as input.
Data Types: timetable
PutSchedule
— Call schedule
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.
If you are creating one or more
OptionEmbeddedFixedBond
instruments
and use a timetable, the timetable specification applies to
all of the OptionEmbeddedFixedBond
instruments. PutSchedule
does not accept
an NINST
-by-1
cell
array of timetables as input.
Data Types: timetable
OptionEmbeddedFixedBond
Name-Value Pair
ArgumentsPeriod
— Frequency of payments per year
2
(default) | scalar integer | vector of integers
Frequency of payments per year, specified as the comma-separated
pair consisting of 'Period'
and a scalar integer
or an NINST
-by-1
vector of
integers. Values for Period
are:
1
, 2
,
3
, 4
, 6
,
and 12
.
Data Types: double
CallExerciseStyle
— Call option exercise style
"European"
(default) | string with value "European"
,
"American"
, or
"Bermudan"
| string array with value "European"
,
"American"
, or
"Bermudan"
| character vector with value 'European'
,
'American'
, or
'Bermudan'
| cell array of character vectors with values of
'European'
, 'American'
, or
'Bermudan'
Call option exercise style, specified as the comma-separated pair
consisting of 'CallExerciseStyle'
and a scalar
string or character vector or an
NINST
-by-1
cell array of
character vectors or string array.
Note
The CallSchedule
is a timetable of
call dates and strikes. If you do not specify a
CallExerciseStyle
, then based on the
CallSchedule
specification, a
default value of CallExerciseStyle
is
assigned as follows:
If there is one exercise date in the
CallSchedule
, then theCallExerciseStyle
is an"European"
.If there are two exercise dates in the
CallSchedule
, then theCallExerciseStyle
is an"American"
with a start date and maturity.If there are more than two exercise dates in the
CallSchedule
, then theCallExerciseStyle
is an"Bermudan"
.
If the you define a CallExerciseStyle
and this is not consistent with what you have specified in
the CallSchedule
, you receive an error
message.
Data Types: string
| cell
| char
PutExerciseStyle
— Put option exercise style
"European"
(default) | string with value "European"
,
"American"
, or
"Bermudan"
| string array with value "European"
,
"American"
, or
"Bermudan"
| character vector with value 'European'
,
'American'
, or
'Bermudan'
| cell array of character vectors with values of
'European'
, 'American'
, or
'Bermudan'
Put option exercise style, specified as the comma-separated pair
consisting of 'PutExerciseStyle'
and a scalar
string or character vector or an
NINST
-by-1
cell array of
character vectors or string array.
Note
The PutSchedule
is a timetable of
call dates and strikes. If you do not specify a
PutExerciseStyle
, then based on the
PutSchedule
specification, a
default value of PutExerciseStyle
is
assigned as follows:
If there is one exercise date in the
PutSchedule
, then thePutExerciseStyle
is an"European"
.If there are two exercise dates in the
PutSchedule
, then thePutExerciseStyle
is an"American"
with a start date and maturity.If there are more than two exercise dates in the
PutSchedule
, then thePutExerciseStyle
is an"Bermudan"
.
If the you define a PutExerciseStyle
and this is not consistent with what you have specified in
the PutSchedule
, you receive an error
message.
Data Types: string
| cell
| char
Basis
— Day count basis
0
(actual/actual) (default) | scalar integer from 0
to
13
| vector of integers from 0
to
13
Day count basis, specified as the comma-separated pair consisting
of 'Basis'
and scalar integer or an
NINST
-by-1
vector of
integers using 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
Principal
— Notional principal amount or principal value schedule
100
(default) | scalar numeric | numeric vector | timetable
Notional principal amount or principal value schedule, specified
as the comma-separated pair consisting of
'Principal'
and a scalar numeric or an
NINST
-by-1
numeric vector
or a 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.
Note
If you are creating one or more
OptionEmbeddedFixedBond
instruments and
use a timetable, the timetable specification applies to all of
the OptionEmbeddedFixedBond
instruments.
Principal
does not accept an
NINST
-by-1
cell array
of timetables as input.
Data Types: double
| timetable
DaycountAdjustedCashFlow
— Flag indicating whether cash flow adjusts for day count convention
false
(default) | scalar logical value of true
or
false
| vector of logicals with values of true
or
false
Flag indicating whether cash flow adjusts for day count
convention, specified as the comma-separated pair consisting of
'DaycountAdjustedCashFlow'
and a scalar
logical or an NINST
-by-1
vector of logicals with values of true
or
false
.
Data Types: logical
BusinessDayConvention
— Business day conventions
"actual"
(default) | string | string array | character vector | cell array of character vectors
Business day conventions, specified as the comma-separated pair
consisting of 'BusinessDayConvention'
and a
scalar string or character vector or an
NINST
-by-1
cell array of
character vectors or string array. 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
| cell
| string
Holidays
— Holidays used in computing business days
NaT
(default) | datetime array | string array | date character vector
Holidays used in computing business days, specified as the
comma-separated pair consisting of 'Holidays'
and
dates using an NINST
-by-1
vector of a datetime array, string array, or date character vectors.
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)
To support existing code, OptionEmbeddedFixedBond
also
accepts serial date numbers as inputs, but they are not recommended.
EndMonthRule
— End-of-month rule flag for generating dates when Maturity
is end-of-month date for month with 30
or fewer days
true
(in effect) (default) | scalar logical value of true
or
false
| vector of logicals with values of true
or
false
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
or an NINST
-by-1
vector of
logicals with values of true
or
false
.
If you set
EndMonthRule
tofalse
, the software ignores the rule, meaning that a payment date is always the same numerical day of the month.If you set
EndMonthRule
totrue
, the software sets the rule on, meaning that a payment date is always the last actual day of the month.
Data Types: logical
IssueDate
— Bond issue date
NaT
(default) | datetime array | string array | date character vector
Bond issue date, specified as the comma-separated pair consisting
of 'IssueDate'
and a scalar or an
NINST
-by-1
vector using a
datetime array, string array, or date character vectors.
To support existing code, OptionEmbeddedFixedBond
also
accepts serial date numbers as inputs, but they are not recommended.
If you use date character vectors or strings, the format must be
recognizable by datetime
because
the IssueDate
property is stored as a
datetime.
FirstCouponDate
— Irregular first coupon date
NaT
(default) | datetime array | string array | date character vector
Irregular first coupon date, specified as the comma-separated pair
consisting of 'FirstCouponDate'
and a scalar or
an NINST
-by-1
vector using a
datetime array, string array, or date character vectors.
To support existing code, OptionEmbeddedFixedBond
also
accepts serial date numbers as inputs, but they are not recommended.
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 date character vectors or date strings, the format must
be recognizable by datetime
because
the FirstCouponDate
property is stored as a
datetime.
LastCouponDate
— Irregular last coupon date
NaT
(default) | datetime array | string array | date character vector
Irregular last coupon date, specified as the comma-separated pair
consisting of 'LastCouponDate'
and a scalar or an
NINST
-by-1
vector using a
datetime array, string array, or date character vectors.
To support existing code, OptionEmbeddedFixedBond
also
accepts serial date numbers as inputs, but they are not recommended.
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 date character vectors or strings, the format must be
recognizable by datetime
because
the LastCouponDate
property is stored as a
datetime.
StartDate
— Forward starting date of payments
NaT
(default) | datetime array | string array | date character vector
Forward starting date of payments, specified as the
comma-separated pair consisting of 'StartDate'
and a scalar or an NINST
-by-1
vector using a datetime array, string array, or date character
vectors.
To support existing code, OptionEmbeddedFixedBond
also
accepts serial date numbers as inputs, but they are not recommended.
If you use date character vectors or strings, the format must be
recognizable by datetime
because
the StartDate
property is stored as a
datetime.
Name
— User-defined name for instrument
" "
(default) | string | string array | character vector | cell array of character vectors
User-defined name for the instrument, specified as the
comma-separated pair consisting of 'Name'
and a
scalar string or character vector or an
NINST
-by-1
cell array of
character vectors or string array.
Data Types: char
| cell
| string
Properties
CouponRate
— Coupon annual rate
scalar decimal | timetable | vector of decimals
Coupon annual rate, returned as a scalar decimal or an
NINST
-by-1
vector of decimals or a
timetable.
Data Types: double
| timetable
Maturity
— Maturity date
scalar datetime | vector of datetimes
Maturity date, returned as a scalar datetime or an
NINST
-by-1
vector of
datetimes.
Data Types: datetime
CallSchedule
— Call schedule
timetable
Call schedule, returned as a timetable.
Data Types: datetime
PutSchedule
— Call schedule
timetable
Put schedule, returned as a timetable.
Data Types: datetime
Period
— Coupons per year
2
(default) | scalar integer | vector of integers
Coupons per year, returned as a scalar integer or an
NINST
-by-1
vector of
integers.
Data Types: double
Basis
— Day count basis
0
(actual/actual) (default) | scalar integer from 0
to 13
| vector of integers from 0
to
13
Day count basis, returned as a scalar integer or an
NINST
-by-1
vector of integers.
Data Types: double
Principal
— Notional principal amount or principal value schedule
100
(default) | scalar numeric | numeric vector | timetable
Notional principal amount or principal value schedule, returned as a
scalar numeric or an NINST
-by-1
numeric vector or a timetable.
Data Types: timetable
| double
DaycountAdjustedCashFlow
— Flag indicating whether cash flow adjusts for day count convention
false
(default) | scalar logical value of true
or
false
| vector of logical values of true
or
false
Flag indicating whether cash flow adjusted for day count convention,
returned as scalar logical or an
NINST
-by-1
vector of logicals with
values of true
or false
.
Data Types: logical
BusinessDayConvention
— Business day conventions
"actual"
(default) | string | string array
Business day conventions, returned as a string or an
NINST
-by-1
string array.
Data Types: string
Holidays
— Holidays used in computing business days
NaT
(default) | datetimes
Holidays used in computing business days, returned as an
NINST
-by-1
vector of
datetimes.
Data Types: datetime
EndMonthRule
— End-of-month rule flag for generating dates when Maturity
is end-of-month date for month with 30 or fewer
days
true
(in effect) (default) | scalar logical value of true
or
false
| vector of logical values of true
or
false
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 or an
NINST
-by-1
vector of
logicals.
Data Types: logical
IssueDate
— Bond issue date
NaT
(default) | scalar datetime | vector of datetimes
Bond issue date, returned as a scalar datetime or an
NINST
-by-1
vector of
datetimes.
Data Types: datetime
FirstCouponDate
— Irregular first coupon date
NaT
(default) | datetime | vector of datetimes
Irregular first coupon date, returned as a scalar datetime or an
NINST
-by-1
vector of datetimes.
Data Types: datetime
LastCouponDate
— Irregular last coupon date
NaT
(default) | scalar datetime | vector of datetimes
Irregular last coupon date, returned as a scalar datetime or an
NINST
-by-1
vector of
datetimes.
Data Types: datetime
StartDate
— Forward starting date of payments
NaT
(default) | scalar datetime | vector of datetimes
Forward starting date of payments, returned as a scalar datetime or an
NINST
-by-1
vector of datetimes.
Data Types: datetime
CallExerciseStyle
— Call option exercise style
"European"
(default) | string with value "European"
,
"American"
, or "Bermuda"
| string array with values of "European"
,
"American"
, or "Bermuda"
This property is read-only.
Call option exercise style, returned as a scalar string or an
NINST
-by-1
string array with
values of "European"
, "American"
, or
"Bermuda"
.
Data Types: string
PutExerciseStyle
— Put option exercise style
"European"
(default) | string with value "European"
,
"American"
, or "Bermuda"
| string array with values of "European"
,
"American"
, or "Bermuda"
This property is read-only.
Put option exercise style, returned as a scalar string or an
NINST
-by-1
string array with
values of "European"
, "American"
, or
"Bermuda"
.
Data Types: string
Name
— User-defined name for instrument
" "
(default) | string | string array
User-defined name for the instrument, returned as a string or an
NINST
-by-1
string array.
Data Types: string
Object Functions
setCallExercisePolicy | Set call exercise policy for OptionEmbeddedFixedBond ,
OptionEmbeddedFloatBond , or ConvertibleBond
instrument |
setPutExercisePolicy | Set put exercise policy for OptionEmbeddedFixedBond ,
OptionEmbeddedFloatBond , or ConvertibleBond
instrument |
Examples
Price OptionEmbeddedFixedBond
Instruments Using HullWhite
Model and IRTree
Pricer
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 Delta Gamma Vega
______ _______ ______ _______
103.27 -290.33 1375.9 -148.28
[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 Delta Gamma Vega
_____ _____ _____ ____
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 Delta Gamma Vega
_____ _______ ______ ____
107.7 -602.56 4086.4 0
Price Multiple OptionEmbeddedFixedBond
Instruments Using HullWhite
Model and IRTree
Pricer
This example shows the workflow to price multiple callable OptionEmbeddedFixedBond
instruments with Bermudan exercise styles 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 an OptionEmbeddedFixedBond
instrument object for three Option Embedded Fixed Bond instuments.
Maturity = datetime([2025,1,1 ; 2026,1,1 ; 2027,1,1]); % Option embedded bond (Bermudan callable bond) Strike = [100 ; 200 ; 300]; ExerciseDates = datetime([2022,1,1 ; 2023,1,1 ; 2024,1,1]); CallSchedule = timetable(ExerciseDates,Strike,'VariableNames',{'Strike Schedule'}); Period = 1; CallableBondBermudan = fininstrument("OptionEmbeddedFixedBond",'Maturity',Maturity,... 'CouponRate',0.025,'Period', Period, ... 'CallSchedule',CallSchedule,'CallExerciseStyle',"Bermudan")
CallableBondBermudan=3×1 OptionEmbeddedFixedBond array with properties:
CouponRate
Period
Basis
EndMonthRule
Principal
DaycountAdjustedCashFlow
BusinessDayConvention
Holidays
IssueDate
FirstCouponDate
LastCouponDate
StartDate
Maturity
CallDates
PutDates
CallSchedule
PutSchedule
CallExerciseStyle
PutExerciseStyle
Name
When you create multiple OptionEmbeddedFixedBond
instruments and use a timetable for CallSchedule
, the timetable specification applies to all of the OptionEmbeddedFixedBond
instruments. The CallSchedule
input argument does not accept an NINST
-by-1
cell array of timetables as input.
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 prices and sensitivities for the OptionEmbeddedFixedBond
instruments.
[Price, outPR] = price(HWTreePricer,CallableBondBermudan,["all"])
Price = 3×1
104.5001
102.0649
97.6664
outPR=3×1 priceresult array with properties:
Results
PricerData
outPR.Results
ans=1×4 table
Price Delta Gamma Vega
_____ _______ ______ _______
104.5 -584.34 4134.2 -166.73
ans=1×4 table
Price Delta Gamma Vega
______ _______ ______ _______
102.06 -621.72 4850.3 -201.07
ans=1×4 table
Price Delta Gamma Vega
______ _______ ______ _______
97.666 -743.76 6857.7 -84.933
Price OptionEmbeddedFixedBond
Option Instrument Using HullWhite
Model and IRMonteCarlo
Pricer
This example shows the workflow to price an OptionEmbeddedFixedBondOption
instrument when using a HullWhite
model and an IRMonteCarlo
pricing method.
Create ratecurve
Object
Create a ratecurve
object using ratecurve
.
Settle = datetime(2019,1,1); 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: 01-Jan-2019 InterpMethod: "linear" ShortExtrapMethod: "next" LongExtrapMethod: "previous"
Create OptionEmbeddedFixedBondOption
Instrument Object
Use fininstrument
to create an OptionEmbeddedFixedBondOption
instrument object.
% Option embedded bond (European callable bond) Maturity = datetime(2022,9,15); Strike = 100; ExerciseDates = datetime(2024,1,1); CallSchedule = timetable(datetime(2020,3,15), 50); 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: 15-Sep-2022 CallDates: 15-Mar-2020 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.
HullWhiteModel = finmodel("HullWhite",'Alpha',0.32,'Sigma',0.49)
HullWhiteModel = HullWhite with properties: Alpha: 0.3200 Sigma: 0.4900
Create IRMonteCarlo
Pricer Object
Use finpricer
to create an IRMonteCarlo
pricer object and use the ratecurve
object for the 'DiscountCurve'
name-value pair argument.
outPricer = finpricer("IRMonteCarlo",'Model',HullWhiteModel,'DiscountCurve',myRC,'SimulationDates',datetime(2019,3,15)+calmonths(0:6:48)')
outPricer = HWMonteCarlo with properties: NumTrials: 1000 RandomNumbers: [] DiscountCurve: [1x1 ratecurve] SimulationDates: [15-Mar-2019 15-Sep-2019 15-Mar-2020 15-Sep-2020 15-Mar-2021 15-Sep-2021 15-Mar-2022 15-Sep-2022 15-Mar-2023] Model: [1x1 finmodel.HullWhite]
Price OptionEmbeddedFixedBondOption
Instrument
Use price
to compute the price and sensitivities for the OptionEmbeddedFixedBondOption
instrument.
[Price,outPR] = price(outPricer,CallableBondEuropean,["all"])
Price = 58.1882
outPR = priceresult with properties: Results: [1x4 table] PricerData: [1x1 struct]
outPR.Results
ans=1×4 table
Price Delta Gamma Vega
______ _______ ______ _____
58.188 -125.43 356.04 18.24
Price OptionEmbeddedFixedBond
Instrument and Obtain Exercise Probabilities Using BlackKarasinski
Model and IRTree
Pricer
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 = 1x7 logical array
1 1 1 1 1 1 1
No options are exercised.
PriceResults.PricerData.PriceTree.ExTree{4}
ans = 1x7 logical array
0 0 0 0 0 0 0
The instrument is exercised at all nodes.
PriceResults.PricerData.PriceTree.ExTree{3}
ans = 1x5 logical array
0 0 0 0 0
No options are exercised.
PriceResults.PricerData.PriceTree.ExTree{2}
ans = 1x3 logical array
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
Price OptionEmbeddedFixedBond
Instrument Using CoxIngersollRoss
Model and IRTree
Pricer
This example shows the workflow to price an OptionEmbeddedFixedBond
instrument when you use a CoxIngersollRoss
model and an IRTree
pricing method.
Create OptionEmbeddedFixedBond
Instrument Object
Use fininstrument
to create a OptionEmbeddedFixedBond
instrument object.
Maturity = datetime(2027,1,1); Period = 1; CouponRate = 0.045; Strike = 85; ExerciseDates = datetime(2026,1,1); CallSchedule = timetable(ExerciseDates,Strike,VariableNames={'Strike Schedule'}); CallableBond = fininstrument("OptionEmbeddedFixedBond",Maturity=Maturity,CouponRate=CouponRate,Period=Period,CallSchedule=CallSchedule,Name="OptionEmbeddedFixedBond_inst")
CallableBond = OptionEmbeddedFixedBond with properties: CouponRate: 0.0450 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-2027 CallDates: 01-Jan-2026 PutDates: [0x1 datetime] CallSchedule: [1x1 timetable] PutSchedule: [0x0 timetable] CallExerciseStyle: "european" PutExerciseStyle: [0x0 string] Name: "OptionEmbeddedFixedBond_inst"
Create CoxIngersollRoss
Model Object
Use finmodel
to create a CoxIngersollRoss
model object.
alpha = 0.03;
theta = 0.02;
sigma = 0.1;
CIRModel = finmodel("CoxIngersollRoss",Sigma=sigma,Alpha=alpha,Theta=theta)
CIRModel = CoxIngersollRoss with properties: Sigma: 0.1000 Alpha: 0.0300 Theta: 0.0200
Create ratecurve
Object
Create a ratecurve
object using ratecurve
.
Times= [calyears([1 2 3 4 ])]';
Settle = datetime(2023,1,1);
ZRates = [0.035; 0.042147; 0.047345; 0.052707]';
ZDates = Settle + Times;
Compounding = -1;
Basis = 1;
ZeroCurve = ratecurve("zero",Settle,ZDates,ZRates,Compounding = Compounding, Basis = Basis);
Create IRTree
Pricer Object
Use finpricer
to create an IRTree
pricer object for the CoxIngersollRoss
model and use the ratecurve
object for the 'DiscountCurve'
name-value argument.
CIRPricer = finpricer("irtree",Model=CIRModel,DiscountCurve=ZeroCurve,Maturity=ZDates(end),NumPeriods=length(ZDates))
CIRPricer = CIRTree with properties: Tree: [1x1 struct] TreeDates: [4x1 datetime] Model: [1x1 finmodel.CoxIngersollRoss] DiscountCurve: [1x1 ratecurve]
Price OptionEmbeddedFixedBond
Instrument
Use price
to compute the price for the OptionEmbeddedFixedBond
instrument.
[Price,outPR] = price(CIRPricer,CallableBond,"all")
Price = 86.1308
outPR = priceresult with properties: Results: [1x4 table] PricerData: [1x1 struct]
outPR.Results
ans=1×4 table
Price Delta Gamma Vega
______ _______ ______ ___________
86.131 -245.57 719.73 -1.4211e-10
More About
Vanilla Bond with Embedded Option
A vanilla coupon bond is a security representing an obligation to repay a borrowed amount at a designated time and to make periodic interest payments until that time.
The issuer of a bond makes the periodic interest payments until the bond matures. At maturity, the issuer pays to the holder of the bond the principal amount owed (face value) and the last interest payment. A vanilla bond with an embedded option is where an option contract has an underlying asset of a vanilla bond.
Stepped Coupon Bond with Callable and Puttable Features
A step-up bond and step-down bond is a debt security with a predetermined coupon structure over time.
With these instruments, coupons increase (step up) or decrease (step down) at specific times during the life of the bond. Stepped coupon bonds can have options features (call and puts).
Amortizing Callable and Puttable Bond
An amortizing callable bond or
amortizing puttable bond work under a scheduled
Principal
.
An amortizing callable bond gives the issuer the right to call back the bond, but
instead of paying the Principal
amount at maturity, it repays
part of the principal along with the coupon payments. An amortizing puttable bond,
repays part of the principal along with the coupon payments and gives the bondholder
the right to sell the bond back to the issuer.
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
.
Version History
Introduced in R2020aR2023b: Support for Pricing OptionEmbeddedFixedBond
Instruments Using CoxIngersollRoss
Model and IRTree
Pricer
You can price OptionEmbeddedFixedBond
instruments using a
CoxIngersollRoss
model object
and an IRTree
pricing
method.
R2023a: Support for Option Adjusted Spread
You can use the oas
function to calculate
the option adjusted spread (OAS) when using an
OptionEmbeddedFixedBond
object with an
IRTree
pricer object and a HullWhite
, BlackKarasinski
,
or BlackDermanToy
model.
R2022b: Serial date numbers not recommended
Although OptionEmbeddedFixedBond
supports serial date numbers,
datetime
values are recommended instead. The
datetime
data type provides flexible date and time
formats, storage out to nanosecond precision, and properties to account for time
zones and daylight saving time.
To convert serial date numbers or text to datetime
values, use the datetime
function. For example:
t = datetime(738427.656845093,"ConvertFrom","datenum"); y = year(t)
y = 2021
There are no plans to remove support for serial date number inputs.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)