tbl2bond
Treasury bond parameters given Treasury bill parameters
Description
[
restates US Treasury bill market parameters in US Treasury bond form as zero-coupon
bonds. This function makes Treasury bills directly comparable to Treasury bonds and
notes.TBondMatrix,Settle] = tbl2bond(TBillMatrix)
Examples
This example shows how to restate U.S. Treasury bill market parameters in U.S. Treasury bond form, given published Treasury bill market parameters for December 22, 1997.
TBill = [datenum('jan 02 1998') 10 0.0526 0.0522 0.0530 datenum('feb 05 1998') 44 0.0537 0.0533 0.0544 datenum('mar 05 1998') 72 0.0529 0.0527 0.0540]; TBond = tbl2bond(TBill)
TBond = 3×5
105 ×
0 7.2976 0.0010 0.0010 0.0000
0 7.2979 0.0010 0.0010 0.0000
0 7.2982 0.0010 0.0010 0.0000
This example shows how to use datetime input to restate U.S. Treasury bill market parameters in U.S. Treasury bond form, given published Treasury bill market parameters for December 22, 1997.
TBill = [datenum('jan 02 1998') 10 0.0526 0.0522 0.0530 datenum('feb 05 1998') 44 0.0537 0.0533 0.0544 datenum('mar 05 1998') 72 0.0529 0.0527 0.0540]; dates = datetime(TBill(:,1), 'ConvertFrom', 'datenum','Locale','en_US'); data = TBill(:,2:end); t=[table(dates) array2table(data)]; [TBond, Settle] = tbl2bond(t)
TBond=3×5 table
CouponRate Maturity Bid Asked AskYield
__________ ___________ ______ ______ ________
0 02-Jan-1998 99.854 99.855 0.053
0 05-Feb-1998 99.344 99.349 0.0544
0 05-Mar-1998 98.942 98.946 0.054
Settle = 3×1 datetime
22-Dec-1997
22-Dec-1997
22-Dec-1997
Input Arguments
Treasury bill parameters, specified as a 5-column table or a
N-by-5 matrix of bond
information where the table columns or matrix columns contains:
Maturity(Required) Maturity date of Treasury bills, specified as a datetime, string, date character vector, or serial date number when using a matrix. If the inputTBillMatrixis a table, theMaturitydates can be a datetime array, string array, date character vectors, or serial date numbers. You can usedatetimeto convert serial date numbers to datetime arrays.DaysMaturity(Required) Days to maturity, specified as an integer. Days to maturity are quoted on a skip-day basis; the actual number of days from settlement to maturity isDaysMaturity + 1.Bid(Required) Bid bank-discount rate (the percentage discount from face value at which the bill could be bought, annualized on a simple-interest basis), specified as a decimal fraction.Asked(Required) Asked bank-discount rate, specified as a decimal fraction.AskYield(Required) Asked yield (the bond-equivalent yield from holding the bill to maturity, annualized on a simple-interest basis and assuming a 365-day year), specified as a decimal fraction.
Data Types: double | char | string | datetime | table
Output Arguments
Treasury bond parameters, returned as a table or matrix depending on
the TBillMatrix input.
When TBillMatrix is a table,
TBondMatrix is also a table, and the variable
type for the Maturity dates in
TBondMatrix (column 1) matches the variable type
for Maturity in TBillMatrix. For
example, if Maturity dates are datetime arrays in
TBillMatrix, they will also be datetime arrays
in TBondMatrix.
When TBillMatrix input is a
N-by-5 matrix, then each row
describes a Treasury bond.
The parameters or columns returned for TBondMatrix
are:
CouponRate(Column 1) Coupon rate, which is always0since the Treasury bills are, by definition, a zero coupon instrument..
Maturity(Column 2) Maturity date for each bond. The format of the dates matches the format used forMaturityinTBillMatrix(datetime array, string array, date character vector, or serial date number).Bid(Column 3) Bid price based on $100 face value.Asked(Column 4) Asked price based on $100 face value.AskYield(Column 5) Asked yield to maturity: the effective return from holding the bond to maturity, annualized on a compound-interest basis.
Settlement dates implied by the maturity dates and the number of days
to maturity quote, returned as a
N-by-5 vector containing serial
date numbers, by default. Use the function datetime to convert serial
date numbers to formatted datetime arrays. Settle is
returned as a datetime array only if the input
TBillMatrix is a table containing datetime arrays
for Maturity in the first column.
Version History
Introduced before R2006a
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.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- 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)