instbond
Construct bond instrument
Syntax
Description
creates a new instrument set containing Bond instruments.InstSet
= instbond(CouponRate
,Settle
,Maturity
)
adds Bond instruments to an existing instrument set.InstSet
= instbond(InstSet
,CouponRate
,Settle
,Maturity
)
adds optional arguments.InstSet
= instbond(___,Period
,Basis
,EndMonthRule
,IssueDate
,FirstCouponDate
,LastCouponDate
,StartDate
,Face
)
[
lists field meta-data for the Bond instrument.FieldList
,ClassList
,TypeString
] = instbond
Examples
Create a new instrument variable with the following information:
CouponRate= [0.035;0.04];
Settle= datetime(2013,11,1);
Maturity = datetime(2014,11,1);
Period =1;
InstSet = instbond(CouponRate, Settle, Maturity, ...
Period)
InstSet = struct with fields:
FinObj: 'Instruments'
IndexTable: [1×1 struct]
Type: {'Bond'}
FieldName: {{11×1 cell}}
FieldClass: {{11×1 cell}}
FieldData: {{11×1 cell}}
Display the instrument set.
instdisp(InstSet)
Index Type CouponRate Settle Maturity Period Basis EndMonthRule IssueDate FirstCouponDate LastCouponDate StartDate Face 1 Bond 0.035 01-Nov-2013 01-Nov-2014 1 0 1 NaN NaN NaN NaN 100 2 Bond 0.04 01-Nov-2013 01-Nov-2014 1 0 1 NaN NaN NaN NaN 100
Input Arguments
Instrument variable, specified only when adding Bond
instruments to an existing instrument set. For more
information on the InstSet
variable, see instget
.
Data Types: struct
Coupon rate indicating the annual percentage rate,
specified as an
NINST
-by-1
vector or an
NINST
-by-1
cell array of decimal annual rates, or decimal
annual rate schedules. For the latter case of a
variable coupon schedule, each element of the cell
array is a
NumDates
-by-2
cell array, where the first column is dates and the
second column is its associated rate. The date
indicates the last day that the coupon rate is
valid.
Data Types: double
| cell
Settlement dates, specified as scalar or an
NINST
-by-1
vector using a datetime array, string array, or date
character vectors.
Note
Settle
must be earlier
than Maturity
.
To support existing code, instbond
also
accepts serial date numbers as inputs, but they are not recommended.
Maturity dates, specified as scalar or an
NINST
-by-1
vector using a datetime array, string array, or date
character vectors.
To support existing code, instbond
also
accepts serial date numbers as inputs, but they are not recommended.
(Optional) Coupons per year, specified as a scalar or
an NINST
-by-1
vector. Values for Period
are
1
, 2
,
3
, 4
,
6
, and
12
.
Data Types: double
(Optional) Day-count basis, specified as scalar or an
NINST
-by-1
vector.
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
(Optional) End-of-month rule flag for generating dates
when Maturity
is an end-of-month
date for a month having 30 or fewer days, specified
as a scalar or a nonnegative integer
[0
, 1
] using
an NINST
-by-1
vector.
0
= Ignore rule, meaning that a bond's coupon payment date is always the same numerical day of the month.1
= Set rule on, meaning that a bond's coupon payment date is always the last actual day of the month.
Data Types: logical
(Optional) Bond issue date, specified as a scalar or
an NINST
-by-1
vector using a datetime array, string array, or date
character vectors.
To support existing code, instbond
also
accepts serial date numbers as inputs, but they are not recommended.
(Optional) Irregular first coupon date, specified as a
scalar or an
NINST
-by-1
vector using a datetime array, string array, or date
character vectors.
To support existing code, instbond
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.
(Optional) Irregular last coupon date, specified as a
scalar or an
NINST
-by-1
vector using a datetime array, string array, or date
character vectors.
To support existing code, instbond
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.
Forward starting date of payments (the date from which
a bond cash flow is considered), specified as a
scalar or an
NINST
-by-1
vector using a datetime array, string array, or date
character vectors.
To support existing code, instbond
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.
(Optional) Face or par value, specified as a scalar or
an NINST
-by-1
vector of nonnegative face values or an
NINST
-by-1
cell array of face values or face value schedules.
For the latter case, each element of the cell array
is a
NumDates
-by-2
cell array, where the first column is dates and the
second column is its associated face value. The date
indicates the last day that the face value is
valid.
Data Types: cell
| double
Output Arguments
Variable containing a collection of instruments,
returned as a structure. Instruments are broken down
by type and each type can have different data
fields. Each stored data field has a row vector or
string for each instrument. For more information on
the InstSet
variable, see
instget
.
Name of each data field for a Bond instrument,
returned as an
NFIELDS
-by-1
cell array of character vectors.
Data class for each field, returned as an
NFIELDS
-by-1
cell array of character vectors. The class
determines how arguments are parsed. Valid character
vectors are 'dble'
,
'date'
, and
'char'
.
Type of instrument, returned as a character vector.
For a Bond instrument, TypeString =
'Bond'
.
More About
A bond is a fixed-income financial instrument that represents a loan made by an investor to a borrower, typically a corporation or government.
In return for the loan, the borrower agrees to pay the bondholder periodic interest payments and to return the principal amount (the face value) of the bond at maturity.
Version History
Introduced before R2006aAlthough instbond
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
hjmprice
| instaddfield
| instdisp
| instget
| intenvprice
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)