Using bndyield function results in discrepancies with Excel and other calculation sources?

2 views (last 30 days)
Greetings,
bndyield is a funcion 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%.
Please note that the value of 1 for Basis in MATLAB pertains to 30/360 SIA, which is the 30/360 US (NASD) convention. Please note that the value of 0 for Basis in Excel pertains to 30/360 US (NASD) convention.
Furthermore, when I utilize Bloomberg as a tool to calculate the yield given the parameters for this particular bond...
=BDP("459200JG7 Corp","yld_cnv_bid","px_bid=106.8125","settle_dt=20160510")
I get a result of 2.65385150, which translates to a yield of 2.6539%, the same value obtained through the usage of the excel formula.
Perhaps I'm missing some additional Parameter in MATLAB or is there a calculation discrepancy that is taking place?
Please advice on this matter. Thanks in advance!

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!