(12C) Actuarial Calculations
|
05-12-2018, 05:41 AM
(This post was last modified: 05-12-2018 06:33 AM by Gamo.)
Post: #1
|
|||
|
|||
(12C) Actuarial Calculations
Since HP 12C always calculate [n] as an Integer with rounding up result.
Program below help solve this problem to get result with fractional part and [n] can be input with fractional part by using the Actuarial Method. *Program to calculate [i] and use fractional [n] Code:
Example of calculating interest rate required for growth: A savings account has a balance of $1000. What annual interest rate is required to double the money in 5½ years? Store 0 in register 0 for END mode; store 1 in register 0 for BEGIN mode. 0 STO 0 > 0 // Set END mode 1000 CHS [PV] > -1000.00 2000 [FV] > 2000.00 5.5 [n] > 5.50 0 [PM]T > 0.00 R/S > 13.43 // Answer *Program to calculate [n] Code:
Example of calculating compound interest: A deposit of $150 is made each month in an account paying 6.5 percent, compounding monthly. How long will it take to accumulate $20,000? Assume END mode. Store 0 in register 0 for END mode; store 1 in register 0 for BEGIN mode. 0 [STO] 0 > 0.00 6.5 g [i] > 0.54 0 [PV] 150 [CHS] [PMT] > -150.00 20000 [FV] > 20000.00 [R/S] > 100.63 This program is from HP Support website. https://support.hp.com/us-en/document/bpia5043 Remark: All calculations above work on HP 15C using TVM program from the Advance Functions Handbook. For HP-12C these two program together use about 95 steps this can enhance 12C TVM functions. Gamo |
|||
05-12-2018, 07:00 PM
Post: #2
|
|||
|
|||
RE: (12C) Actuarial Calculations
(05-12-2018 05:41 AM)Gamo Wrote: *Program to calculate [i] and use fractional [n] This seems to be a Newton-style solver that calculates the interest rate iteratively. This requires the usual convergence check: exit if the absolute value of the last change in i is less than 1E–8. Now take a look at line 53...56: here the HP programmer found a nice way to determine the absolute value of x. Code: 53 ENTER Compared with the common method (calculate √x²) this has three advantages: there are no roundoff errors, LastX is preserved and it also works for x ≥ 1E+50. (05-12-2018 05:41 AM)Gamo Wrote: Remark: Just to be clear – I assume what you want to say is this: Unlike the 12C, the TVM program in the 15C Advanced Functions Handbook does not round n to the next higher integer, it directly returns a fractional results if required. So the above programs are not needed there. Dieter |
|||
06-11-2019, 02:40 PM
Post: #3
|
|||
|
|||
RE: (12C) Actuarial Calculations
(05-12-2018 05:41 AM)Gamo Wrote: Since HP 12C always calculate [n] as an Integer with rounding up result. Gamo As far as I can make out the HP12C does use non-integer n for i calculation. The only difficulty is calculating a non-integer n. I tried it on mine and got the correct i value for a non-integer n. For example: PV = -100 FV = 111.10 (PMT=0) n = 1.1 i calculates as 10% which is correct But: PV = -100 FV = 111.10 (PMT=0) i = 10% n calculates as 2 which is the problem. The TI BAII Plus (other permitted CFA calculator) does calculate n correctly for these TVM inputs. As far as I can make out the first program (and longer one) isn't required but the second one is useful and I'll try it now. Joe |
|||
06-11-2019, 02:50 PM
Post: #4
|
|||
|
|||
RE: (12C) Actuarial Calculations
Thanks Gamo,
That works fine (I'll probably change the registers where the interim values are stored so as not to affect a cashflow already in the calculator). The n value before calling the program needs to be lower than the calculated value or it overflows. Setting it to zero is the best bet before calling the program. Joe |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)