Day 3 : YIELDDISC
The YIELDDISC
function in Power BI DAX is used to calculate the yield of a discount security, assuming that the security is issued at par. It takes into account the security's settlement date, maturity date, coupon rate, and price.
YIELDDISC(settlement, maturity, rate, price)
Parameters:
- settlement: The settlement date of the security.
- maturity: The maturity date of the security.
- rate: The coupon rate of the security.
- price: The price of the security.
Example:
Suppose you have a discount security with the following characteristics:
- Settlement date: October 15, 2024
- Maturity date: December 31, 2024
- Coupon rate: 0% (since it's a discount security)
- Price: $95
To calculate the yield of this security, you would use the following DAX formula:
YIELDDISC(DATE(2024, 10, 15), DATE(2024, 12, 31), 0, 95)
This formula would return a result of approximately 5.59%. This means that the investor would earn a 5.59% return on their investment if they held the security until maturity.
Explanation:
The YIELDDISC
function calculates the yield by comparing the price of the security to its par value (which is assumed to be 100). The difference between the price and the par value is the discount. The yield is then calculated as the discount divided by the price, multiplied by the number of days between the settlement date and the maturity date, and then annualized.
In the example above, the discount is $5 (100 - 95). The number of days between the settlement date and the maturity date is 77. Therefore, the yield is calculated as follows:
Yield = (5 / 95) * (365 / 77) = 5.59%
It's important to note that the YIELDDISC
function assumes that the security is issued at par. If the security is not issued at par, you will need to use a different function, such as YIELD
.
Function Returns a Scaler Value
Comments
Post a Comment