beytbill
Bond equivalent yield for Treasury bill
Description
Examples
Find the Bond Equivalent Yield for a Treasury Bill
This example shows how to find the bond equivalent yield for a Treasury bill that has a settlement date of February 11, 2000, a maturity date of August 7, 2000, and a discount rate is 5.77.
Yield = beytbill('2/11/2000', '8/7/2000', 0.0577)
Yield = 0.0602
Find the Bond Equivalent Yield for a Treasury Bill Using datetime Inputs
This example shows how to use datetime
inputs to find the bond equivalent yield for a Treasury bill that has a settlement date of February 11, 2000, a maturity date of August 7, 2000, and the discount rate is 5.77.
Yield = beytbill(datetime('11-Feb-2000','Locale','en_US'), datetime('7-Aug-2000','Locale','en_US'),... 0.0577)
Yield = 0.0602
Input Arguments
Settle
— Settlement date of Treasury bill
serial date number | date character vector | datetime
Settlement date of the Treasury bill, specified as a scalar or a
NTBILLS
-by-1
vector of serial
date numbers, date character vectors, or datetime arrays.
Settle
must be earlier than
Maturity
.
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 a scalar or a
NTBILLS
-by-1
vector of serial
date numbers, date character vectors, or datetime arrays.
Data Types: double
| char
| datetime
Discount
— Discount rate of Treasury bill
decimal
Discount rate of the Treasury bill, specified as a scalar of a
NTBILLS
-by-1
vector of decimal
fraction values.
Data Types: double
Output Arguments
Yield
— Treasury bill yield
decimal
Version History
See Also
Ouvrir l'exemple
Vous possédez une version modifiée de cet exemple. Souhaitez-vous ouvrir cet exemple avec vos modifications ?
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
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.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)