# tbl2bond

Treasury bond parameters given Treasury bill parameters

## Syntax

``[TBondMatrix,Settle] = tbl2bond(TBillMatrix)``

## Description

````[TBondMatrix,Settle] = tbl2bond(TBillMatrix)` 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.```

example

## Examples

collapse all

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 = 3x1 datetime 22-Dec-1997 22-Dec-1997 22-Dec-1997 ```

## Input Arguments

collapse all

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 input `TBillMatrix` is a table, the `Maturity` dates can be a datetime array, string array, date character vectors, or serial date numbers. You can use `datetime` to 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 is ```DaysMaturity + 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

collapse all

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 always `0` since 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 for `Maturity` in `TBillMatrix` (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