'BNDYIELD 'is a function that calculates the yield to maturity for a fixed-income security. Let's take an IBM bond as an example. The CUSIP '459200JG7' refers to a (almost 10 year to maturity from today) IBM corporate bond with the following characteristics:
Coupon: 3.45% Maturity: 02/19/2026 Day Count: 30/360 Coupon Frequency: Semi-Annual No Odd Coupons (Last or First)
Let's say that I'm purchasing this bond today for a settlement Date (t+3) of May 10th, 2016. Let's say that I am purchasing this Bond at a price of $106.8125 and assuming a redemption (par) amount of $100, I would like to know what is the yield of maturity I am getting.
If I use the bndyield formula in MATLAB:
Yield = bndyield(106.8125,0.0345,'05/10/2016','02/19/2026','Period',2,'Basis',1)
I get a result of 0.026530631026615 or 2.6531% yield (rounded up)
Using an Excel formula of YIELD…
=YIELD("5/10/2016","02/19/2026",0.0345,106.8125,100,2,0)
…and using the same inputs, I get the following result:
0.0265385150 or a yield of 2.6539%.
The 'BNDYIELD' in MATLAB and YIELD function in Excel generate different values for same set of parameters.
Best Answer