This example shows how to return the yield for a Treasury bill, given the settlement date of a Treasury bill is February 10, 2000, the maturity date is August 6, 2000, the par value is $1000, and the price is $981.36.
This example shows how to use datetime inputs to return the yield for a Treasury bill, given the settlement date of a Treasury bill is February 10, 2000, the maturity date is August 6, 2000, the par value is $1000, and the price is $981.36.
Settle — Settlement date of Treasury bill serial date number | date character vector | datetime
Settlement date of the Treasury bill, specified as serial date
numbers, date character vectors, or datetime arrays. The
Settle date must be before the
Maturity date.
Data Types: double | char | datetime
Maturity — Maturity date of Treasury bill serial date number | date character vector | datetime
Maturity date of the Treasury bill, specified as serial date numbers,
date character vectors, or datetime arrays.
Data Types: double | char | datetime
Face — Redemption value of Treasury bill numeric
Redemption value (par value) of the Treasury bill, specified as a
numeric value.
Data Types: double
Price — Price of Treasury bill numeric
Price of the Treasury bill, specified as a numeric value.
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.