ylddisc
Yield of discounted security
Description
Examples
Find the Yield of a Discounted Security
This example shows how to find the yield of the following discounted security.
Settle = '10/14/2000'; Maturity = '03/17/2001'; Face = 100; Price = 96.28; Basis = 2; Yield = ylddisc(Settle, Maturity, Face, Price, Basis)
Yield = 0.0903
Find the Yield of a Discounted Security Using datetime Inputs
This example shows how to use datetime
inputs to find the yield of the following discounted security.
Settle = '10/14/2000'; Maturity = '03/17/2001'; Face = 100; Price = 96.28; Basis = 2; Settle = datetime(Settle,'Locale','en_US'); Maturity = datetime(Maturity,'Locale','en_US'); Yield = ylddisc(Settle, Maturity, Face, Price, Basis)
Yield = 0.0903
Input Arguments
Settle
— Settlement date of security
serial date number | date character vector | datetime
Settlement date of the security, 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 security
serial date number | date character vector | datetime
Maturity date of the security, specified as serial date numbers, date character vectors, or datetime arrays.
Data Types: double
| char
| datetime
Face
— Redemption value of security
numeric
Redemption value (par value) of the security, specified as a numeric value.
Data Types: double
Price
— Discount price of security
numeric
Discount price of the security, specified as a numeric value.
Data Types: double
Basis
— (Optional) Day-count basis
0
(actual/actual) (default) | integers of the set [0...13]
| vector of integers of the set [0...13]
Day-count basis for the security, specified using the following values:
0 = actual/actual
1 = 30/360 (SIA)
2 = actual/360
3 = actual/365
4 = 30/360 (PSA)
5 = 30/360 (ISDA)
6 = 30/360 (European)
7 = actual/365 (Japanese)
8 = actual/actual (ICMA)
9 = actual/360 (ICMA)
10 = actual/365 (ICMA)
11 = 30/360E (ICMA)
12 = actual/365 (ISDA)
13 = BUS/252
For more information, see Basis.
Data Types: double
Output Arguments
Yield
— Yield of discounted security
numeric
Yield of discounted security, returned as a numeric value.
References
[1] Mayle, J. Standard Securities Calculation Methods. Volumes I-II, 3rd edition. Formula 1.
Version History
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
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.
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)