bndfutprice
Price bond future given repo rates
Syntax
Description
[
computes the price of a bond futures contract for
one or more bonds given a repo rate, and bond
properties, including the bond conversion factor.
The default behavior is that the coupon
reinvestment rate matches the repo rate. However,
you can specify a separate reinvestment rate using
optional arguments.FutPrice
,AccrInt
] = bndfutprice(RepoRate
Price
,FutSettle
,Delivery
,ConvFactor
,CouponRate
,Maturity
)
[
specifies options using one or more optional
name-value pair arguments in addition to the input
arguments in the previous syntax.FutPrice
,AccrInt
] = bndfutprice(___,Name,Value
)
Examples
Compute the Price For a Bond Future
This example shows how to compute the price for a bond future using the following data.
bndfutprice(.064, 129, datetime(2000,9,21),datetime(2000,12,29), 1.3136, .0875, datetime(2020,8,15))
ans = 98.1516
Input Arguments
RepoRate
— Repo rates
vector
Repo rates, specified as an
numBonds
-by-1
vector in decimals.
Data Types: double
Price
— Bond prices
vector
Bond prices, specified as an
numBonds
-by-1
vector in decimals.
Data Types: double
FutSettle
— Future settlement date
datetime array | string array | date character vector
Future settlement date, specified as an
numBonds
-by-1
vector
using a datetime array, string array, or date character
vectors.
To support existing code, bndfutprice
also
accepts serial date numbers as inputs, but they are not recommended.
Delivery
— Future delivery dates
datetime array | string array | date character vector
Future delivery dates, specified as an
numBonds
-by-1
vector
using a datetime array, string array, or date character
vectors.
To support existing code, bndfutprice
also
accepts serial date numbers as inputs, but they are not recommended.
ConvFactor
— Bond conversion factors
vector
Bond conversion factors, specified as an
numBonds
-by-1
vector. For more information, see convfactor
.
Data Types: double
CouponRate
— Coupon rates
vector
Coupon rates, specified as an
numBonds
-by-1
vector of numeric decimals.
Data Types: double
Maturity
— Maturity dates
datetime array | string array | date character vector
Maturity dates, specified as an
numBonds
-by-1
vector
using a datetime array, string array, or date character
vectors.
To support existing code, bndfutprice
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: [FutPrice,AccrInt] =
bndfutprice(RepoRate,Price,FutSettle,Delivery,ConvFactor,CouponRate,Maturity,'Basis',5,'Face',1000,'Period',4)
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 scalar integer
from 0
to
13
.
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 floorlet dates
1
(in
effect) (default) | scalar of nonnegative integer
[0,1]
End-of-month rule flag, specified as the
comma-separated pair consisting of
'EndMonthRule'
and a scalar
with a nonnegative integer [0
,
1
].
0
= Ignore rule, meaning that a payment date is always the same numerical day of the month.1
= Set rule on, meaning that a payment date is always the last actual day of the month.
Data Types: logical
IssueDate
— Bond issue date
if you do not specify an
IssueDate
, the cash flow payment
dates are determined from other inputs (default) | datetime scalar | string scalar | date character vector
Bond issue date, specified as the
comma-separated pair consisting of
'IssueDate'
and a scalar
datetime, string, or date character vector.
To support existing code, bndfutprice
also
accepts serial date numbers as inputs, but they are not recommended.
Face
— Face value of the bond
100
(default) | scalar numeric
Face value of the bond, specified as the
comma-separated pair consisting of
'Face'
and a scalar numeric.
Face
has no impact on key rate
duration.
Data Types: double
FirstCouponDate
— Irregular first coupon date
if you do not specify a
FirstCouponDate
, the cash flow
payment dates are determined from other inputs (default) | datetime scalar | string scalar | date character vector
Irregular first coupon date, specified as
the comma-separated pair consisting of
'FirstCouponDate'
and a scalar
datetime, string, or date character vector.
To support existing code, bndfutprice
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.
LastCouponDate
— Irregular last coupon date
datetime scalar | string scalar | date character vector
Irregular last coupon date, specified as the
comma-separated pair consisting of
'LastCouponDate'
and a scalar
datetime, string, or date character vector.
To support existing code, bndfutprice
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.
Period
— Coupons per year
2
per
year (default) | vector
Coupons per year, specified as the
comma-separated pair consisting of
'Period'
and a scalar integer.
Values for Period
are
0
, 1
,
2
, 3
,
4
, 6
, and
12
.
Data Types: double
ReinvestBasis
— Day count basis for reinvestment rate
identical to
RepoBasis
(default) | integer from 0
to
13
Day count basis for the reinvestment rate,
specified as the comma-separated pair consisting
of 'ReinvestBasis'
and a scalar
integer from 0
to
13
.
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
ReinvestRate
— Underlying bond annual coupon
scalar decimal numeric
Underlying bond annual coupon, specified as
the comma-separated pair consisting of
'ReinvestRate'
and a scalar
decimal numeric.
Data Types: double
RepoBasis
— Day count basis for repo rate
2
(actual/360) (default) | integer from 0
to
13
Day count basis for repo rate, specified as
the comma-separated pair consisting of
'RepoBasis'
and a scalar
integer from 0
to
13
.
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
StartDate
— Forward starting date of payments
Settle
date (default) | datetime scalar | string scalar | 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 scalar
datetime, string, or date character vector.
To support existing code, bndfutprice
also
accepts serial date numbers as inputs, but they are not recommended.
Output Arguments
FutPrice
— Quoted futures price, per $100 notional
vector
Quoted futures price, per $100 notional,
returned as
numBonds
-by-1
vector.
AccrInt
— Accrued interest due at delivery date, per $100 notional
vector
Accrued interest due at delivery date, per
$100 notional, returned as
numBonds
-by-1
vector.
References
[1] Burghardt, G., T. Belton, M. Lane, and J. Papa. The Treasury Bond Basis. McGraw-Hill, 2005.
[2] Krgin, Dragomir. Handbook of Global Fixed Income Calculations. John Wiley & Sons, 2002.
Version History
Introduced in R2009bR2022b: Serial date numbers not recommended
Although bndfutprice
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-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)