# yldtbill

Yield of Treasury bill

## Syntax

``Yield = yldtbill(Settle,Maturity,Face,Price)``

## Description

example

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

## 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('10-Feb-2000','Locale','en_US'), datetime('6-Aug-2000','Locale','en_US'), 1000, 981.36)`
```Yield = 0.0384 ```

## Input Arguments

collapse all

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 date of the Treasury bill, specified as serial date numbers, date character vectors, or datetime arrays.

Data Types: `double` | `char` | `datetime`

Redemption value (par value) of the Treasury bill, specified as a numeric value.

Data Types: `double`

Price of the Treasury bill, specified as a numeric value.

Data Types: `double`

## Output Arguments

collapse all

Yield for Treasury bill, returned as a numeric value.

## References

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