A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
= YIELD ( 30/03/2023, 30/09/2025, 6%, 85,100,2,0)
[....]
= XIRR (CF row, dates row)
[....]
Interest is calculated as =6%*100*YEARFRAC(30/3/23,30/9/23,3)
I will have to double-check some details. I'm a little busy at the moment. But some general comments:
- For freq=2 or 4 (sub-annual), one major difference is how the coupon return is annualized. By convention, YTM is a nominal rate. In contrast, XIRR returns a compounded rate. When a compounded bond yield is stated, it should be called the "effective annual yield" (EAY). Refer to investopedia articles (click here and click here). Unfortunately, many people -- even knowledgeable people -- fail to make that distinction.
- Historically, both Excel YIELD and XIRR functions were contributed by third-parties. They were part of the ATP until Excel 2010. When these functions were mainstreamed, it appears that MSFT did not make any effort to make the internal algorithms similar to other financial functions. Just comparing Excel IRR (implemented by MSFT) and XIRR, we can infer that there are differences in the implementation. The same is probably true of the YIELD and XIRR implementations. Take this comment with a grain of salt; it is speculative, and it is not based on any internal knowledge.
More details to follow later.
exceluser133 wrote later:
what would be the underlying mathematical formula for the YIELD formula?
According to the YIELD help page (click here)....
[ERRATA.... I copy-and-pasted the wrong formula previously. Corrected below.]
AFAIK, MSFT does not document the details of the YIELD algorithm where there are multiple coupon periods. The help page says only:
But according to an investopedia (see "click here" above), YIELD should use an IRR algorithm based on the following formula:
And in my experience, simple Excel IRR does indeed calculate results similar to Excel YIELD, at least when the settlement date corresponds to the beginning of the first coupon period, as in your example.
But I have not vetted that formula in detail. With other bond functions, I have found that the documented formula is not exactly the same as the internal implementation.
(FYI, it is not uncommon for MSFT documentation to be inaccurate, at least in detail and sometimes blatantly.)