Dax Function: ODDFPRICE
Category: Financial Functions
The ODDFPRICE function in Power BI is a financial function that calculates the price of a bond with an odd (irregular) first period, considering the bond’s yield, coupon rate, settlement date, and maturity date.
Purpose
Determines the price investors would pay for a bond when the first interest payment period is irregular.
Accounts for unusual first periods that may differ in length from standard intervals.
Type of Calculations
Calculates bond pricing for non-standard cash flows.
Adjusts for the irregularity in the first period while considering other bond parameters like yield and frequency.
Practical Use Cases
Bond Trading: Evaluate bond prices with non-standard first payment periods for trading or investment.
Portfolio Valuation: Accurately determine bond values in portfolios containing irregular cash-flow bonds.
What-If Scenarios: Simulate the impact of varying coupon rates or yields on irregular-period bonds.
ODDFPRICE(settlement, maturity, issue, first_coupon, rate, yield, redemption, frequency, [basis])
| Parameter | Type | Description |
|---|---|---|
settlement | Scalar | The bond’s settlement date. This is the date after issuance when the bond is traded to the buyer. Must be a valid date. |
maturity | Scalar | The bond’s maturity date. The date when the principal is due. Must be a valid date. |
issue | Scalar | The bond’s issue date. The date when the bond was first issued. Must be a valid date. |
first_coupon | Scalar | The first coupon date. The date when the first interest payment is made. Must be a valid date. |
rate | Scalar | The bond’s annual coupon rate. Expressed as a decimal (e.g., 5% = 0.05). |
yield | Scalar | The bond’s annual yield. Expressed as a decimal (e.g., 4% = 0.04). |
redemption | Scalar | The bond’s redemption value per $100 face value. For example, 100 = par, 105 = premium. |
frequency | Scalar | The number of coupon payments per year: 1 = annual, 2 = semi-annual, 4 = quarterly. |
[basis] | Scalar | (Optional) The day count basis: 0 = 30/360 (default), 1 = actual/actual, 2 = actual/360, 3 = actual/365, 4 = 30E/360. |
How Does ODDFPRICE Dax Function Works
Mathematical Formula
The ODDFPRICE function computes the bond price by:
Adjusting the discounting formula to account for an irregular first period.
Factoring in the bond’s coupon payments, redemption value, and yield.
Incorporating the day count convention specified by the basis parameter.
The formula includes two main parts:
Discounting of the irregular first-period cash flows.
Regular discounting for subsequent periods.
What Does It Return?
Scalar Value: Returns the bond price as a numeric value.
The value represents the price per $100 face value of the bond, accounting for the irregular first period.
When Should We Use It?
Irregular Bonds: For bonds issued with a first coupon period that differs from regular intervals.
Portfolio Diversification: Valuing non-standard bonds in a diversified portfolio.
Pricing Irregular Bonds: Ensuring accurate pricing in bond trading platforms.
Examples
Basic Usage :
Calculate the price of a bond with the following parameters:
Settlement Date:
2025-01-01Maturity Date:
2030-01-01Issue Date:
2024-06-01First Coupon Date:
2024-12-01Coupon Rate: 6% (0.06)
Yield: 5% (0.05)
Redemption Value: 100
Frequency: 2 (Semi-annual)
ODDFPRICE(DATE(2025, 1, 1), DATE(2030, 1, 1), DATE(2024, 6, 1), DATE(2024, 12, 1), 0.06, 0.05, 100, 2)
Result: 102.50 (approximate bond price).
Column Usage
Evaluate multiple bonds with varying parameters:
| BondID | Settlement | Maturity | Issue | FirstCoupon | Rate | Yield | Redemption | Frequency |
|---|---|---|---|---|---|---|---|---|
| 1 | 2025-01-01 | 2030-01-01 | 2024-06-01 | 2024-12-01 | 0.06 | 0.05 | 100 | 2 |
| 2 | 2025-02-01 | 2035-02-01 | 2024-09-01 | 2025-03-01 | 0.07 | 0.06 | 100 | 1 |
Add a calculated column:
BondPrice = ODDFPRICE(Bonds[Settlement], Bonds[Maturity], Bonds[Issue], Bonds[FirstCoupon], Bonds[Rate], Bonds[Yield], Bonds[Redemption], Bonds[Frequency])
Advanced Usage
Combine ODDFPRICE with other financial DAX functions for scenario analysis:
PriceDifference =
ODDFPRICE(Bonds[Settlement], Bonds[Maturity], Bonds[Issue], Bonds[FirstCoupon], Bonds[Rate], Bonds[Yield1], Bonds[Redemption], Bonds[Frequency]) -
ODDFPRICE(Bonds[Settlement], Bonds[Maturity], Bonds[Issue], Bonds[FirstCoupon], Bonds[Rate], Bonds[Yield2], Bonds[Redemption], Bonds[Frequency])
Compares bond prices under two different yield scenarios.
Tips and Tricks
Always use consistent date formats.
Ensure the day count basis aligns with the bond’s terms.
Invalid Dates: Ensure all date parameters are valid and correctly formatted.
Rate and Yield Units: Express these as decimals (e.g., 5% = 0.05).
Performance Impact of ODDFPRICE DAX Function:
Efficient for small to moderate datasets.
For large-scale bond datasets, optimize calculations by pre-aggregating data.
Related Functions You Might Need
| Function | Description |
|---|---|
ODDFYIELD | Calculates the yield of a bond with an odd first period. |
PRICE | Computes the price of a bond with regular periods. |
YIELD | Determines the yield to maturity for a bond with standard payment periods. |
Want to Learn More?
For more information, check out the official Microsoft documentation for ODDFPRICE You can also experiment with this function in your Power BI reports to explore its capabilities.
Unlock the full capabilities of Power BI and elevate your data insights with our specialized consulting services. Whether you need guidance on advanced DAX functions like those highlighted here, support in designing interactive dashboards, or expertise in optimizing data models for enhanced performance, our experienced Power BI consultants are equipped to deliver customized solutions for your business. Explore our Power BI Consulting Services page to discover how we can help your organization make smarter, data-driven decisions.
The ODDFPRICE function calculates the price of a bond with an irregular first period based on specified parameters like settlement, maturity, coupon rate, and yield.
No, ODDFPRICE is specifically designed for bonds with irregular first periods. Use the PRICE function for regular-period bonds.
The function defaults to a 30/360 day count basis if the basis parameter is omitted.
Set the frequency parameter to 2 for semi-annual coupon payments.
ODDFPRICE accounts for an irregular first period, while PRICE is used for bonds with standard periodic payments.