convfactor
Bond conversion factors
Description
computes a conversion factor for a bond futures contract.CF
= convfactor(RefDate
,Maturity
,CouponRate
)
specifies options using one or more name-value pair arguments in addition to the input
arguments in the previous syntax.CF
= convfactor(___,Name,Value
)
Examples
Compute the Conversion Factors For a Bond Futures Contract
This example shows how to calculate CF
, given the following RefDate
, Maturity
, and CouponRate
.
RefDate = [datetime(2002,12,1); datetime(2003,3,1); datetime(2003,6,1); datetime(2003,9,1); datetime(2003,12,1); datetime(2003,9,1); datetime(2002,12,1); datetime(2003,6,1)]; Maturity = [datetime(2012,11,15); datetime(2012,8,15); datetime(2012,2,15); datetime(2011,2,15); datetime(2011,8,15); datetime(2010,8,15); datetime(2009,8,15); datetime(2010,2,15)]; CouponRate = [0.04; 0.04375; 0.04875; 0.05; 0.05; 0.0575; 0.06; 0.065]; CF = convfactor(RefDate, Maturity, CouponRate)
CF = 8×1
0.8539
0.8858
0.9259
0.9418
0.9403
0.9862
1.0000
1.0266
Compute the Conversion Factor For a German Bond
This example shows how to calculate cf
, given the following RefDate
, Maturity
, and CouponRate
for a German bond.
cf = convfactor(datetime(2009,3,10),datetime(2018,1,4), .04,.06,3)
cf = 0.8659
Input Arguments
RefDate
— Reference dates
datetime array | string array | date character vector
Reference dates for which conversion factor is computed (usually the first day of
delivery months), specified as an N
-by-1
vector
using a datetime array, string array, or date character vectors
To support existing code, convfactor
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 a N
-by-1
vector
using a datetime array, string array, or date character vectors.
To support existing code, convfactor
also
accepts serial date numbers as inputs, but they are not recommended.
CouponRate
— Annual coupon rates for underlying bond
vector in decimals
Annual coupon rates for underlying bond, specified as an
numBonds
-by-1
vector in decimals.
Data Types: double
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: CF =
convfactor(RefDate,Maturity,CouponRate,'Convention',2)
Convention
— Conversion factor convention
1
US Treasury bond (30-year) and Treasury note
(10-year) futures contract (default) | integer from 1
to 5
Conversion factor convention, specified as the comma-separated pair consisting of
'Convention'
and a N
-by-1
vector using the following values:
1
= US Treasury bond (30-year) and Treasury note (10-year) futures contract2
= US 2-year and 5-year Treasury note futures contract3
= German Bobl, Bund, Buxl, and Schatz4
= UK gilts5
= Japanese Government Bonds (JGBs)
Data Types: double
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
N
-by-1
vector using a datetime array, string
array, or date character vectors.
To support existing code, convfactor
also
accepts serial date numbers as inputs, but they are not recommended.
RefYield
— Reference semiannual yield
0.06
(6%) (default) | vector in decimals
Reference semiannual yield, specified as the comma-separated pair consisting of
'RefYield'
and an N
-by-1
vector in decimals.
Data Types: double
StartDate
— Forward starting date of payments
datetime array | string array | date character vector
Forward starting date of payments, specified as the comma-separated pair
consisting of 'StartDate'
and a
N
-by-1
vector using a datetime array, string
array, or date character vectors.
To support existing code, convfactor
also
accepts serial date numbers as inputs, but they are not recommended.
Output Arguments
CF
— Conversion factors against the 6% yield par-bond
vector
Conversion factors against the 6% yield par-bond, returned as an
N
-by-1
vector.
More About
Conversion Factors
Conversion factors of US Treasury bonds and other government bonds are based on a bond yielding 6%.
Optionally, you can specify other types of bonds and yields using inputs for
RefYield
and Convention
. For US Treasury bonds,
verify the output of convfactor
by comparing the output against the
quotations provided by the Chicago Board of Trade (https://www.cmegroup.com/company/cbot.html
).
For German bonds, verify the output of convfactor
by comparing the
output against the quotations provided by Eurex (https://www.eurexchange.com
).
For UK Gilts, verify the output of convfactor
by comparing the output
against the quotations provided by Euronext (https://www.euronext.com
).
For Japanese Government Bonds, verify the output of convfactor
by
comparing the output against the quotations provided by the Tokyo Stock Exchange (https://www.jpx.co.jp/english/
).
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 convfactor
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)