Calculate the yield of a security with an odd last period.

`=ODDLYIELD(sd, md, ld, rate, pr, redem, freq, [basis], [na])`

- Basis - required argument for the basis of the yield
- Frequency - required argument for the frequency of the yield
- Redemption - required argument for the redemption of the yield
- Issue - required argument for the issue of the yield
- Maturity - required argument for the maturity of the yield
- Settlement - required argument for the settlement of the yield
- Pr - required argument for the price of the yield

`=ODDLYIELD(DATE(2018,2,5),DATE(2018,6,15),DATE(2017,10,15),0.05,99.5,100,2,0)`

For example, to calculate the yield of a bond that was purchased on February 5, 2018, matures on June 15, 2018, was issued on October 15, 2017, has an interest rate of 5%, a price of 99.5, a redemption value of 100, pays interest twice a year, and uses a day count basis of 0, the formula would be the same as above. This example returns an answer of 6.32%.

The ODDLYIELD function is used to calculate the yield of a security with an odd last period. It requires settlement, maturity, last_interest, rate, pr, redemption, frequency, and basis arguments. It is an easy and reliable way to get the yield of a security with an odd last period.

- The ODDLYIELD function returns the yield of a security with an odd last period as a percentage.
- It can take an optional basis argument, which controls how days are counted.

The ODDLYIELD function is a mathematical function that calculates the yield of a security with an odd last period.

The syntax of the ODDLYIELD function is

`ODDLYIELD(settlement, maturity, issue, first_interest, rate, pr, basis).`

`settlement`

- the security's settlement date`maturity`

- the security's maturity date`issue`

- the security's issue date`first_interest`

- the security's first interest date`rate`

- the security's coupon rate`pr`

- the security's price`basis`

- the security's day count basis

The output of the ODDLYIELD function is the yield of a security with an odd last period.

- Make sure all dates and times are properly formatted.
- Check the order of the parameters.