Documentation

tbillprice

Price Treasury bill

Syntax

Price = tbillprice(Rate, Settle, Maturity, Type)

Arguments

Rate

Bond-equivalent yield, money-market yield, or discount rate in decimal.

Settle

Settlement date, specified as a serial date number, date character vector, or datetime array. Settle must be earlier than Maturity.

Maturity

Maturity date, specified as a serial date number, date character vector, or datetime array.

Type

(Optional) Rate type. Determines how to interpret values entered in Rate. 1 = money market (default). 2 = bond-equivalent. 3 = discount rate.

All arguments must be a scalar or some Treasury bills (NTBILLS-by-1 ) or (1-by-NTBILLS) vector.

    Note   The bond-equivalent yield basis is actual/365. The money-market yield basis is actual/360. The discount rate basis is actual/360.

Description

Price = tbillprice(Rate, Settle, Maturity, Type) computes the price of a Treasury bill given a yield or discount rate.

Price is an NTBILLS-by-1 vector of T-bill prices for every $100 face.

Examples

Example 1. Given a Treasury bill with these characteristics, compute the price of the Treasury bill using the bond-equivalent yield as input.

Rate = 0.045;
Settle = '01-Oct-02';
Maturity = '31-Mar-03';

Type = 2;

Price = tbillprice(Rate, Settle, Maturity, Type)
Price =

   97.8172

Example 2. Use tbillprice to price a portfolio of Treasury bills.

Rate = [0.045; 0.046];
Settle = {'02-Jan-02'; '01-Mar-02'};
Maturity = {'30-June-02'; '30-June-02'};
Type = [2 3];

Price = tbillprice(Rate, Settle, Maturity, Type)
Price =

   97.8408
   98.4539

Example 3. Use tbillprice to price a portfolio of Treasury bills using datetime input.

Rate = [0.045; 0.046];
Type = [2 3];

Settle = datetime({'02-Jan-2002'; '01-Mar-2002'},'Locale','en_US');
Maturity = datetime({'30-June-2002'; '30-June-2002'},'Locale','en_US');
Price = tbillprice(Rate, Settle, Maturity, Type)
Price =

   97.8408
   98.4539

Related Examples

References

This function adheres to SIA Fixed Income Securities Formulas for Price, Yield, and Accrued Interest, Volume 1, 3rd edition, pp. 44 - 45 (on Treasury bills), and Money Market and Bond Calculation by Stigum and Robinson.

Introduced before R2006a

Was this topic helpful?