HP 12C bond calculation - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: General Forum (/forum-4.html) +--- Thread: HP 12C bond calculation (/thread-7488.html) HP 12C bond calculation - Randall - 12-29-2016 09:09 PM The yield to maturity value from my 12c's do not agree with the brokerage firm, my 17bii+, or financial software running on my 50g. Any thoughts would be appreciated. I bought a municipal bond through my brokerage firm: Settlement date 12/23/2016 Maturity date 2/15/2017 Price 100.628 Coupon 5% Call 100 30/360 semiannual Brokerage firm Yield to maturity .637% I have 2 HP 12c platinum calculators with a single battery. One of them is a 25th anniversary. Both calculators are set to rpn and show a ytm of .7035%. I also have a 17Bii+. Using the bond menu it returns a ytm of .63698%. I also have a 50g using Financial Applications software written by Don Phillips. It returns a ytm of .637%. Since the 17bii+ and the 50g closely agree with the brokerage firm value I believe them to be correct. The 12c manual mentions solutions to iterative problems may not exist or there may be multiple roots. I did not see a way to input a starting value. Or, I may be using the 12c's incorrectly. Any thoughts as to why the 12c answer does not agree with the others would be much appreciated. Thanks Randy RE: HP 12C bond calculation - Nick - 12-29-2016 11:40 PM I'm not fluent with bonds but this might help: The HP-12C Bonds formulae used are listed on p188 of the User's Guide (2005). The guide also lists program code for alternate bond calculations throughout. Yip, Nick RE: HP 12C bond calculation - Gene - 12-30-2016 01:31 AM (12-29-2016 09:09 PM)Randall Wrote:  30/360 semiannual Randy Hi Randy. I suspect there's your problem. The 12c does not compute 30/360 bonds built-in. It does Annual / Actual. You have to program the 12c to do 30/360. RE: HP 12C bond calculation - Nick - 12-30-2016 01:53 AM (12-30-2016 01:31 AM)Gene Wrote:  You have to program the 12c to do 30/360. The "30/360 Day Basis Bonds" listing is on pages 163 - 165. RE: HP 12C bond calculation - Nick - 12-30-2016 02:10 AM I ran this on the 12C classic (no idea if I entered the parameters correctly) and returned: Code: `0.6377047932` I re-read your post that you were referring to the 12C Platinum. The 12C Platinum User's Guide (2005) p 217 - 221 has the listing for "30/360 Day Basis Bonds". RE: HP 12C bond calculation - Randall - 12-30-2016 02:41 AM I am by no means a bond expert but learning. Thanks for the references to the manual. I used the example key strokes on the back of the calculator. The manual says the built-in functions calculate using actual/actual basis and is typically used for treasury bonds and notes. Looks like I used the wrong model. The manual lists a program for municipal bonds using a 30/360 basis. That appears to be the model I need to use. I will need to review program basics but will give it a try. Thanks Randy RE: HP 12C bond calculation - Gene - 12-30-2016 02:21 PM Here's a very sweet program written by Tony Hutchins for the Datafile publication from the user's group centered in the UK. It handles all sorts of bonds for the 12c. Might be the best option to have in the 12c. PDF is here: [attachment=4326] RE: HP 12C bond calculation - Randall - 12-30-2016 04:14 PM Thanks for the bonds galore program. I entered the 30/360 program from the 12c manual. The yield to maturity calculation matched the example but the bond price and accrued value did not match the example. Other yield to maturity examples also worked ok. I even found an alg version of the program which gave the same results as the rpn version. Even though I don't have a complete bond solution, I am fairly sure my initial yield to maturity problem was due to not using the 30/360 method. The bonds galore program seems to have a lot of features. I will give it a try. Thanks Randy RE: HP 12C bond calculation - Randall - 01-05-2017 06:55 PM I confirmed my bond model I was trying to use (as mentioned by Gene) was incorrect. I entered the Bonds Galore program by Tony Hutchins. It packs a LOT of functions into only 80 steps. And, once a bond model and bond data is inputted, a wealth of data is available. I've worked through several examples with known answers and they all match. The downside is that the 12C programming language doesn't allow the luxury of labels or menus. In fact, one 12c related author recommended to not use the 12c for complex programming due to this difficulty. But I'm going to keep my shorthand user notes handy and give it a try. Thanks Randy RE: HP 12C bond calculation - Randall - 01-05-2017 06:55 PM I confirmed my bond model I was trying to use (as mentioned by Gene) was incorrect. I entered the Bonds Galore program by Tony Hutchins. It packs a LOT of functions into only 80 steps. And, once a bond model and bond data is inputted, a wealth of data is available. I've worked through several examples with known answers and they all match. The downside is that the 12C programming language doesn't allow the luxury of labels or menus. In fact, one 12c related author recommended to not use the 12c for complex programming due to this difficulty. But I'm going to keep my shorthand user notes handy and give it a try. Thanks Randy RE: HP 12C bond calculation - Gene - 01-05-2017 07:34 PM Great! Tony Hutchins is a marvel on the 12c. Probably a marvel period, but on the 12c, certainly. :-)