YIELD Function return a strange number

Copper Contributor

Assumptions:

  • settlement: Jul 31st, 2020
  • maturity: Sep 30th, 2020
  • rate: 2%
  • pr: 100.163338941426
  • yld: 1%
  • redemption: 100
  • frequency: 4
  • basis: 2

Based on the above assumptions:

  • PRICE(settlement, maturity, rate, yld, redemption, frequency, [basis])=100.163338941426
  • YIELD(settlement, maturity, rate, pr, redemption, frequency, [basis])=1.01125545674913%

Question:

  • The YIELD function must return 1%, but it actually returns 1.01125545674913%.
  • The difference 1% and 1.01125545674913% is too large if the difference is caused by using floating point numbers.
  • It seems that the YIELD function doesn't work.  Is this a bug?
2 Replies

@massanpc 

Perhaps that's http://westclintech.com/Blog/tabid/132/EntryId/74/Calculate-the-PRICE-of-a-bond-with-a-monthly-coupo... the reason. Jul31 and Sep30 are within one quarter, if take Jun30 result is more reliable

@Sergei Baklan 

Thank you for the reply.

 

It makes sense.  On YIELD function - Office Support, the following remarks are posted:

  • If there is one coupon period or less until redemption, YIELD is calculated as follows:
    566caee5-809e-410b-9459-9b148525f490

I've just calculated the above equation with the following numbers:

  • par seems to be a typo in price/pr, and it is 100.163338941426
  • A is equal to COUPDAYBS(settlement,maturity,frequency,[basis])=31
  • E is equal to COUPDAYS(settlement,maturity,frequency,[basis])=90
  • DSR=E-A=90-31=59

equation.gif

The YIELD function must return 0.0100000000000147891680, which is almost 1%.

I've also checked the calculation using Wolfram Alpha.

 

It seems that the YIELD function does not calculate as defined and the function is not reliable.