freq - Coupon payments per year (annual = 1, semiannual = 2; quarterly = 4).
basis - [optional] Day count basis (see below, default =0).
Some bonds have an irregular first or last period, so interest payments don't fit a normal schedule. To calculate the yield of a bond with an irregular first period, you can use the ODDFYIELD function. The ODDFYIELD Function returns the yield (as a percentage) of a security with a short or long first period.
In the example shown, we want to calculate the yield of a bond with a settlement date of 1-Feb-2019. The bond matures on 15-Feb-2022, and pays a coupon rate of 5%, with the first coupon paid on 15-Feb-2019. Payments are semi-annual, the day count basis is US 30/360, and the redemption value is $100. In the example shown, the formula in F5 is:
With these inputs, the ODDFYIELD function returns a yield of 6.10%, with percentage number format applied.
In Excel, dates are serial numbers. Generally, the best way to enter valid dates is to use cell references, as shown in the example. To enter valid dates directly inside a function, the DATE function is the best option. To illustrate, the formula below has all values hardcoded, with the DATE function used for each of the four required dates:
The basis argument controls how days are counted. The ODDFYIELD function allows 5 options (0-4) and defaults to zero, which specifies US 30/360 basis. This article on wikipedia provides a detailed explanation of available conventions.
The Excel ODDLYIELD function returns the yield of a security with an odd (irregular) last period.
Excel Formula Training
Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.