beytbill
Bond equivalent yield for Treasury bill
Description
Examples
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(datetime(2000,2,11),datetime(2000,8,7), 0.0577)
Yield = 0.0602
Input Arguments
Settlement date of the Treasury bill, specified as a scalar or a
NTBILLS-by-1 vector using a
datetime array, string array, or date character vectors.
Settle must be earlier than
Maturity.
To support existing code, beytbill also
accepts serial date numbers as inputs, but they are not recommended.
Data Types: char | string | datetime
Maturity date of the Treasury bill, specified as a scalar or a
NTBILLS-by-1 vector using a
datetime array, string array, or date character vectors.
To support existing code, beytbill also
accepts serial date numbers as inputs, but they are not recommended.
Data Types: char | string | datetime
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
Version History
Introduced before R2006aAlthough beytbill supports serial date numbers,
datetime values are recommended instead. The
datetime data type provides flexible date and time
formats, storage out to nanosecond precision, and properties to account for time
zones and daylight saving time.
To convert serial date numbers or text to datetime values, use the datetime function. For example:
t = datetime(738427.656845093,"ConvertFrom","datenum"); y = year(t)
y =
2021
There are no plans to remove support for serial date number inputs.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.
Amerika
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)