optbndbycir
Price bond option from Cox-Ingersoll-Ross interest-rate tree
Syntax
Description
[
calculates the price for a bond option from a Cox-Ingersoll-Ross (CIR) interest-rate tree
using a CIR++ model with the Nawalka-Beliaeva (NB) approach.Price
,PriceTree
]
= optbndbycir(CIRTree
,OptSpec
,Strike
,ExerciseDates
,AmericanOpt
,CouponRate
,Settle
,Maturity
)
Note
Alternatively, you can use the FixedBondOption
object to price bond option instruments. For more information, see Get Started with Workflows Using Object-Based Framework for Pricing Financial Instruments.
[
adds optional name-value pair arguments.Price
,PriceTree
]
= optbndbycir(___,Name,Value
)
Examples
Price a European Call and Put Option on a Bond Using a CIR Interest-Rate Tree
Compute the price for a European call option on a 4% bond with a strike of 96. The exercise date for the option is Jan. 01, 2018. The settle date for the bond is Jan. 01, 2017, and the maturity date is Jan. 01, 2020.
Create a RateSpec
using the intenvset
function.
Rates = [0.035; 0.042147; 0.047345; 0.052707]; Dates = [datetime(2017,1,1) ; datetime(2018,1,1) ; datetime(2019,1,1) ; datetime(2020,1,1) ; datetime(2021,1,1)]; ValuationDate = 'Jan-1-2017'; EndDates = Dates(2:end)'; Compounding = 1; RateSpec = intenvset('ValuationDate', ValuationDate, 'StartDates', ValuationDate, 'EndDates',EndDates,'Rates', Rates, 'Compounding', Compounding);
Create a CIR
tree.
NumPeriods = length(EndDates); Alpha = 0.03; Theta = 0.02; Sigma = 0.1; Settle = datetime(2017,1,1); Maturity = datetime(2019,1,1); CIRTimeSpec = cirtimespec(ValuationDate, Maturity, NumPeriods); CIRVolSpec = cirvolspec(Sigma, Alpha, Theta); CIRT = cirtree(CIRVolSpec, RateSpec, CIRTimeSpec)
CIRT = struct with fields:
FinObj: 'CIRFwdTree'
VolSpec: [1x1 struct]
TimeSpec: [1x1 struct]
RateSpec: [1x1 struct]
tObs: [0 0.5000 1 1.5000]
dObs: [736696 736878 737061 737243]
FwdTree: {[1.0173] [1.0276 1.0175 1.0097] [1.0456 1.0331 1.0229 1.0151 1.0096] [1.0644 1.0494 1.0368 1.0267 1.0188 1.0133 1.0100]}
Connect: {[3x1 double] [3x3 double] [3x5 double]}
Probs: {[3x1 double] [3x3 double] [3x5 double]}
Price the 'Call'
option.
[Price,PriceTree] = optbndbycir(CIRT,'Call',96,datetime(2018,1,1),... 0,0.04,datetime(2017,1,1),datetime(2020,1,1))
Price = 2.6827
PriceTree = struct with fields:
FinObj: 'CIRPriceTree'
tObs: [0 0.5000 1 1.5000 2]
PTree: {[2.6827] [0.6059 2.3578 4.7924] [0 0 1.9089 4.8220 6.9566] [0 0 0 0 0 0 0] [0 0 0 0 0 0 0]}
Connect: {[3x1 double] [3x3 double] [3x5 double]}
ExTree: {[0] [0 0 0] [0 0 1 1 1] [0 0 0 0 0 0 0] [0 0 0 0 0 0 0]}
Price the 'Put'
option.
[Price,PriceTree] = optbndbycir(CIRT,'Put',96,datetime(2018,1,1),... 0,0.04,datetime(2017,1,1),datetime(2020,1,1))
Price = 0.6835
PriceTree = struct with fields:
FinObj: 'CIRPriceTree'
tObs: [0 0.5000 1 1.5000 2]
PTree: {[0.6835] [2.1341 0.4096 0] [5.9513 1.7111 0 0 0] [0 0 0 0 0 0 0] [0 0 0 0 0 0 0]}
Connect: {[3x1 double] [3x3 double] [3x5 double]}
ExTree: {[0] [0 0 0] [1 1 0 0 0] [0 0 0 0 0 0 0] [0 0 0 0 0 0 0]}
The PriceTree.ExTree
output for the 'Call'
and 'Put'
option contains the exercise indicator arrays. Each element of the cell array is an array containing 1
's where an option is exercised and 0
's where it is not.
Input Arguments
CIRTree
— Interest-rate tree structure
structure
Interest-rate tree structure, specified by using cirtree
.
Data Types: struct
OptSpec
— Definition of option
character vector with values 'call'
or
'put'
| cell array of character vectors with values 'call'
or
'put'
| string arrays with values "call"
or
"put"
Definition of option, specified as a
NINST
-by-1
cell array of character vectors or
string arrays.
Data Types: char
| cell
| string
Strike
— Option strike price values
nonnegative integer
Option strike price value, specified as a
NINST
-by-1
or
NINST
-by-NSTRIKES
depending on the type of option:
European option —
NINST
-by-1
vector of strike price values.Bermuda option —
NINST
by number of strikes (NSTRIKES
) matrix of strike price values. Each row is the schedule for one option. If an option has fewer thanNSTRIKES
exercise opportunities, the end of the row is padded withNaN
s.American option —
NINST
-by-1
vector of strike price values for each option.
Data Types: double
ExerciseDates
— Option exercise dates
datetime array | string array | date character vector
Option exercise dates, specified as a
NINST
-by-1
,
NINST
-by-2
, or
NINST
-by-NSTRIKES
vector using a datetime array,
string array, or date character vectors, depending on the type of option:
For a European option, use a
NINST
-by-1
vector of dates. For a European option, there is only oneExerciseDates
on the option expiry date.For a Bermuda option, use a
NINST
-by-NSTRIKES
vector of dates.For an American option, use a
NINST
-by-2
vector of exercise date boundaries. The option can be exercised on any date between or including the pair of dates on that row. If only one non-NaN
date is listed, or ifExerciseDates
is aNINST
-by-1
vector, the option can be exercised betweenValuationDate
of the stock tree and the single listedExerciseDates
.
To support existing code, optbndbycir
also
accepts serial date numbers as inputs, but they are not recommended.
AmericanOpt
— Option type
0
European/Bermuda (default) | integer with values 0
or 1
Option type, specified as NINST
-by-1
positive integer flags with values:
0
— European/Bermuda1
— American
Data Types: double
CouponRate
— Bond coupon rate
positive decimal value
Bond coupon rate, specified as an NINST
-by-1
decimal annual rate or NINST
-by-1
cell array,
where each element is a NumDates
-by-2
cell
array. The first column of the NumDates
-by-2
cell array is dates and the second column is associated rates. The date indicates the
last day that the coupon rate is valid.
Data Types: double
| cell
Settle
— Settlement date
datetime array | string array | date character vector
Settlement date for the bond option, specified as a
NINST
-by-1
vector using a datetime array, string
array, or date character vectors.
Note
The Settle
date for every bond is set to the
ValuationDate
of the CIR tree. The bond argument
Settle
is ignored.
To support existing code, optbndbycir
also
accepts serial date numbers as inputs, but they are not recommended.
Maturity
— Maturity date
datetime array | string array | date character vector
Maturity date, specified as an NINST
-by-1
vector using a datetime array, string array, or date character vectors.
To support existing code, optbndbycir
also
accepts serial date numbers as inputs, but they are not recommended.
Name-Value Arguments
Specify 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: [Price,PriceTree] = optbndbycir(CIRTree,OptSpec,
Strike,ExerciseDates,AmericanOpt,CouponRate,Settle,Maturity,'Period'6,'Basis',7,'Face',1000)
Period
— Coupons per year
2
per year (default) | possible values include: 0
, 1
,
2
, 3
, 4
,
6
, 12
.
Coupons per year, specified as the comma-separated pair consisting of
'Period'
and a NINST
-by-1
vector.
Data Types: double
Basis
— Day-count basis
0
(actual/actual) (default) | integer from 0
to 13
Day-count basis, specified as the comma-separated pair consisting of
'Basis'
and a NINST
-by-1
vector of integers.
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
EndMonthRule
— End-of-month rule flag
1
(in effect) (default) | nonnegative integer with values 0
or
1
End-of-month rule flag, specified as the comma-separated pair consisting of
'EndMonthRule'
and a nonnegative integer using a
NINST
-by-1
vector. This rule applies only when
Maturity
is an end-of-month date for a month having 30 or fewer days.
0
= Ignore rule, meaning that a bond coupon payment date is always the same numerical day of the month.1
= Set rule on, meaning that a bond coupon payment date is always the last actual day of the month.
Data Types: double
IssueDate
— Bond issue date
date character vector | string array | datetime
Bond issue date, specified as the comma-separated pair consisting of
'IssueDate'
and a
NINST
-by-1
vector using a datetime array,
string array, or date character vectors.
To support existing code, optbndbycir
also
accepts serial date numbers as inputs, but they are not recommended.
FirstCouponDate
— Irregular first coupon date
datetime array | string array | date character vector
Irregular first coupon date, specified as the comma-separated pair consisting of
'FirstCouponDate'
and a
NINST
-by-1
vector using a datetime array,
string array, or date character vectors.
To support existing code, optbndbycir
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 a
FirstCouponDate
, the cash flow payment dates are determined
from other inputs.
LastCouponDate
— Irregular last coupon date
datetime array | string array | date character vector
Irregular last coupon date, specified as the comma-separated pair consisting of
'LastCouponDate'
and a
NINST
-by-1
vector using a datetime array,
string array, or date character vectors.
To support existing code, optbndbycir
also
accepts serial date numbers as inputs, but they are not recommended.
In the absence of a specified FirstCouponDate
, a specified
LastCouponDate
determines the coupon structure of the bond. The
coupon structure of a bond is truncated at the LastCouponDate
,
regardless of where it falls, and is followed only by the bond's maturity cash flow
date. If you do not specify a LastCouponDate
, the cash flow
payment dates are determined from other inputs.
StartDate
— Forward starting date of payments
datetime array | string array | date character vector
Forward starting date of payments (the date from which a bond cash flow is
considered), specified as the comma-separated pair consisting of
'StartDate'
and a
NINST
-by-1
vector using a datetime array,
string array, or date character vectors.
To support existing code, optbndbycir
also
accepts serial date numbers as inputs, but they are not recommended.
If you do not specify StartDate
, the effective start date is
the Settle
date.
Face
— Face value
100
(default) | nonnegative value | cell array of nonnegative values
Face or par value, specified as the comma-separated pair consisting of
'Face'
and a NINST
-by-1
vector.
Data Types: double
Output Arguments
Price
— Expected prices of bond option at time 0
matrix
Expected price of the bond option at time 0
, returned as a
NINST
-by-1
matrix.
PriceTree
— Structure containing trees of vectors of instrument prices and accrued interest for each node
structure
Structure containing trees of vectors of instrument prices and accrued interest, and a vector of observation times for each node. Values are:
PriceTree.tObs
contains the observation times.PriceTree.PTree
contains the clean prices.PriceTree.ExTree
contains the exercise indicator arrays. Each element of the cell array is an array containing1
's where an option is exercised and0
's where it isn't.
More About
Bond Option
A bond option gives the holder the right to sell a bond back to the issuer (put) or to redeem a bond from its current owner (call) at a specific price and on a specific date.
Financial Instruments Toolbox™ supports three types of put and call options on bonds:
American option: An option that you exercise any time until its expiration date.
European option: An option that you exercise only on its expiration date.
Bermuda option: A Bermuda option resembles a hybrid of American and European options. You can exercise it on predetermined dates only, usually monthly.
For more information, see Bond Options.
References
[1] Cox, J., Ingersoll, J., and S. Ross. "A Theory of the Term Structure of Interest Rates." Econometrica. Vol. 53, 1985.
[2] Brigo, D. and F. Mercurio. Interest Rate Models - Theory and Practice. Springer Finance, 2006.
[3] Hirsa, A. Computational Methods in Finance. CRC Press, 2012.
[4] Nawalka, S., Soto, G., and N. Beliaeva. Dynamic Term Structure Modeling. Wiley, 2007.
[5] Nelson, D. and K. Ramaswamy. "Simple Binomial Processes as Diffusion Approximations in Financial Models." The Review of Financial Studies. Vol 3. 1990, pp. 393–430.
Version History
Introduced in R2018aR2022b: Serial date numbers not recommended
Although optbndbycir
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.
See Also
bondbycir
| capbycir
| cfbycir
| fixedbycir
| floatbycir
| floorbycir
| oasbycir
| optfloatbycir
| optembndbycir
| optemfloatbycir
| rangefloatbycir
| swapbycir
| swaptionbycir
| instoptbnd
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
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)