Accuracy of HP Financial Calculators - Canadian mortgage - 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: Accuracy of HP Financial Calculators - Canadian mortgage ( /thread-361.html)Pages: 1 2 |

Accuracy of HP Financial Calculators - Canadian mortgage - Jeff_Kearns - 01-08-2014 03:20 AM
Having recently adapted an 'accurate' (relative term) TVM routine for the HP-15C thanks to Karl Schneider's MISO Technique using indirect addressing, I decided to compare the results for a Canadian mortgage monthly payment with other HP calculator models. For all non-Canadians, interest on mortgages in Canada is compounded semi-annually, but payments are made monthly. One therefore has to convert the nominal annual interest rate (based on semi-annual compounding) to an effective annual interest rate and then convert it again to an equivalent nominal rate for calculating monthly payments (based on monthly compounding). If you have an HP-12C, the following procedure can be used to obtain the Canadian mortgage factor (from the Owner's Handbook): The keystrokes to calculate the Canadian Mortgage factor (on the 12C) are: Press [f ], CLEAR [FIN ], [g ], then END . Key in 6 and press [n ]. Key in 200 and press ENTER , then PV . Key in the annual interest rate as a percentage and press [+ ], CHS , then FV . Press [i ]. The Canadian mortgage factor is now stored in [i ] for future use. I have a short routine of the above procedure for the 12C and equivalent SOLVER routines for the 17BII and 19BII. The 30b has a built-in Canadian TVM function that does the same with appropriate mode settings. The results from different models (both scientific and financial) are interesting and I welcome any insight as to why they differ the way they do and which is the most 'correct': Variables n: 300 months (#payments) i: 3% (nominal annual interest rate) PV: $450,000 (mortgage amount) PMT: UNKNOWN FV: 0 (fully paid off after 300 months) Results for monthly payment: - HP-15C: $2,129.604821
- HP-12C: $2,129.604744
- HP-32SII: $2,129.60474211
- HP-42S: $2,129.60474211
- HP-30B: $2,129.60474341
- HP-19BII: $2,129.60474211
- HP-17BII: $2,129.60474211
The 15C results are not surprising considering it has less precision. It gives a monthly nominal rate of 0.248451700% whereas the 12C gives 0.248451673 and the HP-32Sii and HP-42S both give 0.248451672% (and so does the 50G). The difference in precision in the 15C likely stems from taking the 12th root of the effective rate when converting to monthly. What surprises me is the HP-30B... Why does it give a different result from the other high-end financial models? And isn't is surprising how accurate the routine is for the pioneer models 32sii and 42S? How does the WP-34S compare? Jeff RE: Accuracy of HP Financial Calculators - Canadian mortgage - Gene - 01-08-2014 04:56 AM
HP-30B: $2,129.60474341 What surprises me is the HP-30B... Why does it give a different result from the other high-end financial models? And isn't is surprising how accurate the routine is for the pioneer models 32sii and 42S? How does the WP-34S compare? Gene: The 30B result matches Excel's calculations of $2,129.60474341 366 as far as the 30B goes. As I recall, the 30B has greater internal accuracy in its financial routines. RE: Accuracy of HP Financial Calculators - Canadian mortgage - Terje Vallestad - 01-08-2014 11:16 AM
(01-08-2014 04:56 AM)Gene Wrote: HP-30B: $2,129.60474341 For what it is worth; the Prime provides the same result as the 30b 2129.60474341 Cheers, Terje RE: Accuracy of HP Financial Calculators - Canadian mortgage - Jeff_Kearns - 01-08-2014 11:34 AM
Terje Vallestad wrote: "For what it is worth; the Prime provides the same result as the 30b 2129.60474341" The 50G gives the same result as the 19BII and Pioneers: 2129.60474211 Jeff RE: Accuracy of HP Financial Calculators - Canadian mortgage - Werner - 01-08-2014 11:42 AM
To convert from a nominal Canadian annual rate to the effective nominal rate, use: 200 / LN1+X 6 / E^X-1 100 * Then, the HP42S gets the monthly rate as 0.248451672465 and the PMT as -2,129.60474341, just like the 30b Cheers, Werner RE: Accuracy of HP Financial Calculators - Canadian mortgage - Gerson W. Barbosa - 01-08-2014 12:19 PM
(01-08-2014 04:56 AM)Gene Wrote: Gene: The 30B result matches Excel's calculations of $2,129.60474341 366 as far as the 30B goes. HP 200LX: $2,129.604743413646 RE: Accuracy of HP Financial Calculators - Canadian mortgage - DMaier - 01-10-2014 01:02 AM
The WP-34S matches the HP-30B and the 42S: 2129.60474341. The effective interest rate is: 0.24845167247 (Werner's method gives 0.2484516724648725, so there's that.) The same result, by the way, using either the original 2 step 12C method, or by setting: I=3 NP=12 NI=2 RE: Accuracy of HP Financial Calculators - Canadian mortgage - Jeff_Kearns - 01-10-2014 01:39 AM
Your statement: (01-10-2014 01:02 AM)DMaier Wrote: The effective interest rate is: 0.24845167247is incorrect. I am not a financial type - I am an engineer. But I think it is important to make a note on terminology. That value: 0.24845167247%, is actually the 'nominal' monthly rate, not the 'effective' interest rate. If you multiply it by 12, you get 2.98142007%, the nominal annual rate for monthly payment calculations. The stated 'nominal' annual rate for Canadian mortgages is based on a semi-annual compounding period - and is 3% in this particular example. This translates into an 'effective' annual interest rate of 3.0225%. The 'effective' interest rate is always greater than the nominal rate. There are in fact, three 'rates' at play here... > The posted 'nominal' rate of 3%, based on semi-annual compounding; > The 'effective' annual interest rate of 3.0225%; and > The 'nominal' rate of 2.98142007%, used for the calculation of monthly payments. Effective Annual Interest Rate Explained Regards, Jeff RE: Accuracy of HP Financial Calculators - Canadian mortgage - solwarda - 04-07-2014 02:12 AM
The nominal monthly rate for Canadian mortgages can be calculated as follows: 3%/200 + 1 =1.015^(1/6)=1.0024845167 2464872638 - 1. The Formula for the monthly payment is: $450,000 x .0024845167 2464872638 x (1.0024845167 2464872638)^300/((1.0024845167 2464872638^300) - 1)= $2129.6047434136 4549091198. As can be seen from these extended precision calculations, it all depends on how many decimal places is the calculation carried out internally inside each calculator. RE: Accuracy of HP Financial Calculators - Canadian mortgage - Thomas Klemm - 04-07-2014 03:31 AM
(04-07-2014 02:12 AM)solwarda Wrote: 3%/200 + 1 =1.015^(1/6)=1.0024845167 2464872638 - 1.ಠ_ಠ That's not how equations work. RE: Accuracy of HP Financial Calculators - Canadian mortgage - solwarda - 04-07-2014 04:39 AM
Thomas Klemm: I don't quite understand your objection. I'm simply converting 3% nominal annual rate compounded semi-annually into a monthly nominal rate for the purpose of calculating the requisite monthly payment. You can do this in a number of ways. For example, you can compound 3% semi-annual rate into "effective" annual rate as follows: 3/200=.015 +1=1.015^2=1.030225-1 x 100=3.0225, which is the effective annual rate. Then you can take the 12th root of that, which will give you the above nominal monthly rate. RE: Accuracy of HP Financial Calculators - Canadian mortgage - Thomas Klemm - 04-07-2014 05:19 AM
(04-07-2014 04:39 AM)solwarda Wrote: Thomas Klemm: I don't quite understand your objection.Equality is a transitive relation. By chaining the calculations you create equations that don't hold. You just have to split them: 3%/200 + 1 = 1.015 1.015^(1/6) = 1.0024845167 2464872638 1.0024845167 2464872638 - 1 = 0.0024845167 2464872638 So nothing wrong with the calculation. Just with the use of the = sign. Cheers Thomas RE: Accuracy of HP Financial Calculators - Canadian mortgage - Dieter - 04-07-2014 07:06 PM
(04-07-2014 02:12 AM)solwarda Wrote: The Formula for the monthly payment is... ...missing some brackets. Otherwise the two identical powers cancel down to 1. ;-) Quote:0.0024845167 2464872638 The true value is ...639. Or ...638916... to be precise. Using ln1+x and e^x–1 ensures the required accuracy here. Quote:$2129.6047434136 4549091198. The WP34s in DP mode returns 2.129,6047 4341 3645 4909 1198 5546 8796 57 Quote:As can be seen from these extended precision calculations, it all depends on how many decimal places is the calculation carried out internally inside each calculator. You bet. ;-) Dieter RE: Accuracy of HP Financial Calculators - Canadian mortgage - Dieter - 04-07-2014 07:49 PM
(01-08-2014 03:20 AM)Jeff_Kearns Wrote: Both the 42s and the 50G feature ln1+x and e^x-1, so they are able to obtain the correct 12-digit interest rate as 0,248451672465%. This again leads to the correct result, which in the above list is exclusively returned by the 30B. So if the 12-digit machines don't get it right it's not their fault. It's sloppy programming in case of the 42s and 50G. Calculators that do not offer ln1+x need a workaround to get similar accuracy. Quote:What surprises me is the HP-30B... Why does it give a different result from the other high-end financial models? While most HPs internally use three additional guard digits (for internal calculations, that is - not in a TVM user program), the 30B IIRC internally uses much more digits. On the other hand the correct result can be obtained with simple 12-digit accuracy (e.g.42s, 50G) - careful programming provided: Code: ` 3 [ENTER] 200 [/] => 0,015` Edit: I now see that Werner already mentioned this point in his post. ;-) Users with hyperbolic functions, but without ln1+x and e^x-1 may do it this way: Code: ` 3 [ENTER] 200 [/] => 0,015` Compare this with the result of less careful evaluation: Code: ` 1,015 [ENTER] 6 [1/x] [y^x] => 1,00248451672 (maybe ...673)` Which means that three valuable digits are lost! Quote:And isn't is surprising how accurate the routine is for the pioneer models 32sii and 42S? I do not think that nine out of twelve digits is particulary accurate. But again: that's not the fault of the calculator. Quote:How does the WP-34S compare? With 16 or even 34 digit precision (and careful programming) you can expect accuracy far beyond the previous examples: i% = 0,2484 5167 2464 8726 3891 6130 7363 4707 27 PMT = 2.129,6047 4341 3645 4909 1198 5546 8796 57 Dieter RE: Accuracy of HP Financial Calculators - Canadian mortgage - Thomas Klemm - 04-07-2014 08:42 PM
(01-08-2014 03:20 AM)Jeff_Kearns Wrote: The 15C results are not surprising considering it has less precision.Using Werner's method to calculate i% directly and using the improved version of your TVM program I got the same result for PMT as with the HP-12C. Cheers Thomas RE: Accuracy of HP Financial Calculators - Canadian mortgage - Thomas Klemm - 04-07-2014 09:06 PM
(04-07-2014 07:49 PM)Dieter Wrote:In this case you don't gain anything but loose accuracy compared to: Code: ` 3 [ENTER] 200 [/] 1 [+] => 1.015` Cheers Thomas RE: Accuracy of HP Financial Calculators - Canadian mortgage - solwarda - 04-07-2014 09:14 PM
Dieter: If you want the final answer accurate to 100 digits!, here it is: $2,129.6047434136 4549091198 5546879656 9409506602 5105604773 4028771274 1867975760 1238046591 3606995240 188946. PS: I can give it to you up to a million digits!. Cheers!, Sol RE: Accuracy of HP Financial Calculators - Canadian mortgage - Jeff_Kearns - 04-07-2014 09:20 PM
(04-07-2014 07:49 PM)Dieter Wrote: Both the 42s and the 50G feature ln1+x and e^x-1, so they are able to obtain the correct 12-digit interest rate as 0,248451672465%. This again leads to the correct result, which in the above list is exclusively returned by the 30B. Thank you for this excellent reply! Although it has been 3 months since my original post, I have learned something valuable about calculator precision and the use of ln1+x, e^x-1, and hyperbolic workarounds to get the most out my calculators. The HP-15C result is now the same as that of the 12C (to ten digits), the 42s correct to 12 digits, and the 32sII correct to 11 digits. My programming will be just a little less sloppy from here on in! Jeff Kearns RE: Accuracy of HP Financial Calculators - Canadian mortgage - Dieter - 04-07-2014 10:03 PM
(04-07-2014 09:06 PM)Thomas Klemm Wrote: In this case you don't gain anything but loose accuracy ... Sure. The correct ln(1+x) result is no problem if 1+x can be given exactly, i.e. here 1,015 = 1,01500000000. Now try this with the same 12 digits for i = 4/3% or 1/7% . ;-) Dieter RE: Accuracy of HP Financial Calculators - Canadian mortgage - Thomas Klemm - 04-07-2014 11:16 PM
But it's still good to know when you better avoid it. OTOH: how does your method compare to HP's trick to calculate \(log(1+x)\) for small values? Cheers Thomas |