Construct bond instrument
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
Create a new instrument variable with the following information:
CouponRate= [0.035;0.04]; Settle= 'Nov-1-2013'; Maturity = 'Nov-1-2014'; Period =1; InstSet = instbond(CouponRate, Settle, Maturity, ... Period)
InstSet = struct with fields:
FinObj: 'Instruments'
IndexTable: [1x1 struct]
Type: {'Bond'}
FieldName: {{11x1 cell}}
FieldClass: {{11x1 cell}}
FieldData: {{11x1 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
InstSet
— Instrument variableInstrument variable, specified only when adding Bond
instruments to an existing instrument set. For more
information on the InstSet
variable, see instget
.
Data Types: struct
CouponRate
— Coupon rate indicating the annual percentage rateCoupon 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
Settle
— Settlement datesSettlement dates, specified as scalar or an
NINST
-by-1
vector using serial date numbers or date character vectors.
Note
Settle
must be earlier
than Maturity
.
Data Types: double
| char
Maturity
— Maturity datesMaturity dates, specified as scalar or an
NINST
-by-1
vector using serial date numbers or date character
vectors.
Data Types: double
| char
Period
— Coupons per year2
per year (default) | vector(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
Basis
— Day-count basis0
(actual/actual) (default) | integer from 0
to
13
(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
EndMonthRule
— End-of-month rule flag for generating dates when Maturity
is end-of-month date for
month having 30 or fewer days1
(in effect) (default) | nonnegative integer [0,1]
(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
IssueDate
— Bond issue date(Optional) Bond issue date, specified as a scalar or
an NINST
-by-1
vector using a serial date number or date character
vector.
Data Types: double
| char
FirstCouponDate
— Irregular first coupon date(Optional) Irregular first coupon date, specified as a
scalar or an
NINST
-by-1
vector using a serial date number or date character
vector.
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.
Data Types: double
| char
LastCouponDate
— Irregular last coupon date(Optional) Irregular last coupon date, specified as a
scalar or an
NINST
-by-1
vector using a serial nonnegative date number or
date character vector.
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.
Data Types: double
| char
StartDate
— Forward starting date of paymentsSettle
date (default) | serial date number | date character vectorForward 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 serial date numbers or date character
vectors.
If you do not specify StartDate
,
the effective start date is the
Settle
date.
Data Types: char
| double
Face
— Face value100
(default) | nonnegative value | cell array of nonnegative values(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
InstSet
— Variable containing a collection of instrumentsVariable 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
.
FieldList
— Name of each data field for Bond instrument Name of each data field for a Bond instrument,
returned as an
NFIELDS
-by-1
cell array of character vectors.
ClassList
— Data class for each fieldData 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'
.
TypeString
— Type of instrumentType of instrument, returned as a character vector.
For a Bond instrument, TypeString =
'Bond'
.
hjmprice
| instaddfield
| instdisp
| instget
| intenvprice
You have a modified version of this example. Do you want to open this example with your edits?