Main Content

yldtbill

Yield of Treasury bill

Description

Yield = yldtbill(Settle,Maturity,Face,Price) returns the yield for a Treasury bill.

example

Examples

collapse all

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.

Yield = yldtbill('2/10/2000', '8/6/2000', 1000, 981.36)
Yield = 
0.0384

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.

Yield = yldtbill(datetime(2000,2,10), datetime(2000,8,6), 1000, 981.36)
Yield = 
0.0384

Input Arguments

collapse all

Settlement date of the Treasury bill, specified using a datetime array, string array, or date character vectors. The Settle date must be before the Maturity date.

To support existing code, yldtbill also accepts serial date numbers as inputs, but they are not recommended.

Data Types: char | string | datetime

Maturity date of the Treasury bill, specified using a datetime array, string array, or date character vectors.

To support existing code, yldtbill also accepts serial date numbers as inputs, but they are not recommended.

Data Types: char | string | datetime

Redemption value (par value) of the Treasury bill, specified as a scalar or vector using numeric values.

Data Types: double

Price of the Treasury bill, specified as a scalar or vector using numeric values.

Data Types: double

Output Arguments

collapse all

Yield for Treasury bill, returned as a scalar or vector of numeric values.

References

[1] Bodie, Kane, and Marcus. Investments. McGraw-Hill Education, 2013.

Version History

Introduced before R2006a

expand all