Showing posts with label future value annuity factor. Show all posts
Showing posts with label future value annuity factor. Show all posts

Sunday, January 24, 2021

HP 12C: Solving Two Actuarial Problems

 HP 12C: Solving Two Actuarial Problems


Solve for Interest and Number of Periods Given Present Value Annuity Factor and Future Value Annuity Factor


Given the following:


* Present Value Annuity Factor (PVAF)

* Future Value Annuity Factor (FVAF)


Solve for both:


*  the interest rate

*  the number of periods of the annuity


Keep in mind that present value and future value annuity factors are not the same of present value and future value, respectively.


Recall that:


PVAF = (1 - (1 + i)^-n) / i


FVAF = ((1 + i)^n - 1) / i


Note that:

FVAF = ( (1 + i)^n - 1 ) / i

FVAF = (1 + i)^n * (1 - (1+i)^-n) / i

FVAF= (1 + i)^n * PVAF


Then:

FVAF / PVAF = (1 + i)^n

ln (FVAF / PVAF) = ln (1 + i)^n

ln (FVAF / PVAF) = n * ln(1 + i)

ln (FVAF / PVAF) / ln(1 + i) = n



Also:

1 / FVAF + i 

= i / ((1 + i)^n - 1) + i

= i / ((1 + i)^n - 1) + (i * (1 + i)^n - 1)) / ((1+ i)^n - 1)

= (i + i * (1 + i)^n - i) / ((1 + i)^n - 1)

= (i * (1+i)^n) / ((1 + i)^n - 1)

= (1 + i)^n / (1 + i)^n * ( i / (1 - (1 + i)^-n)

= 1 * ( i / (1 - (1 + i)^-n)

= 1 / PVAF


Then:

1 / FVAF + i = 1 / PVAF

i = 1 / PVAF - 1 / FAVF


To summarize: 

i = 1 / PVAF - 1 / FAVF

n = ln (FVAF / PVAF) / ln(1 + i)


The following program solves for interest and number of payments. 


HP 12C (Classic) Program


Stack set up:

Y: PVAF

X:  FVAF


Step: Key: Code

01:  STO 1 :  44, 1

02:  x<>y :  34

03:  STO 2 :   44, 2

04:  1/x :   22

05:  x<>y :   34

06:  1/x :   22

07:  - :   30

08:  STO 3 :  44, 3

09:  ENTER :  36

10:  ENTER :  36

11:  1 :   1

12:  + :   40

13:   LN : 43, 23

14:  RCL 1 : 45, 1

15:  RCL 2 : 45, 2

16:  ÷  :  10

17:  LN :  43, 23

18:  x<>y : 34

19:  ÷  : 10

20:  STO 4 :  44, 4

21:  GTO 00 :  43, 33, 00


Example:


Input:

Y:  PVAF = 22.3965

X:  FVAF = 40.5681


Results:

Y:  i = 0.02   (2%)

X:  n = 30  (30 periods)


Present Value of an Annuity Due with an Effective Discount Rate


The problem determines the present value of an annuity due with an effective discount rate.  The effective discount rate is different from the interest rate (i).  Convert the effective discount rate to interest rate by:


i = d / (1 - d)   [i, d are in decimal form]



HP 12C (Classic) Program


Stack set up:

Clear TVM values

Store n:  [ n ]

Store payment: [ PMT ]

X:  discount rate (as a percentage.  Example: for 10%, enter 10)


Step: Key: Code

01:  BEG  : 43, 7

02:  ENTER  : 36

03:  CLx  :  35

04:  R↓   :  33

05:  1   :  1

06:  %  :  25

07:  1   :  1

08:  x<>y   :  34

09:  -  :  30

10:  LSTx  : 43, 36

11:  x<>y   :  34

12:  ÷  : 10

13:  1  :  1

14:  EEX  : 26

15:  2  :  2

16:  ×  :  20

17:  [ i ] :  12

18:  [ PV ]  :  13

19:  GTO 00  :  43,33,00


Example:


Input:

n = 36, PMT = -250.00

X:  d = 5%;  (5  [R/S])


Results:

X:  4211.10


Present Value:  $4,211.10


Source:


Finan, Marcel B.  A Basic Course in the Theory of Interest and Derivatives Markets:  A Preparation for the Actuarial Exam FM/2   Arkansas Tech University, 2017.  


Eddie


All original content copyright, © 2011-2021.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Wednesday, September 6, 2017

Fun with the TI-80

Fun with the TI-80


TI-80 Program D2DMS - Decimal to Degrees-Minutes-Seconds

Variables:

Decimal Format:
D = decimal

DMS Format:
H = degrees/hours, M = minute, S = seconds

INPUT “DEC:”,D
IPART D→H
IPART (60*FPART D)→M
60 * FPART (60 * FPART D)→S
DISP “H,M,S:”,H,M,S

TI-80 Program DMS2D - Degrees-Minutes-Seconds to Decimal

Variables:

Decimal Format:
D = decimal

DMS Format:
H = degrees/hours, M = minute, S = seconds

INPUT “H:”,H
INPUT “M:”,M
INPUT “S:”,S
H + M/60 + S/3600 → D
DISP “DEC:”,D

TI-80 Program QUADRAT - Quadratic Equation

Variables:

A, B, C are coefficients of the equation Ax^2 + Bx + C, where the discriminant D:

D = B^2 – 4*A*C
If D≥0, then the roots are real and stored in X and Y.

If D<0, then the roots are complex and are in the form of conjugates X ± Yi.  X is the real part, Y is the imaginary part.



DISP “AX^2+BX+C=0”
INPUT “A:”,A
INPUT “B:”,B
INPUT “C:”,C
B^2 – 4AC → D
DISP D 
-B / (2A) → E
IF D≥0
THEN
E + √D/(2A) → X
E - √D/(2A) → Y
DISP “R1:”,X
DIPS “R2:”,Y
ELSE
E → X
√-D / (2A) → Y
DISP “RE:”,X
DISP “IM :”,Y
END

Annuity Factors

Variables:
I = periodic interest rate
N = number of payments/periods/deposits

TI-80 Program USFV – Annuity Future Value Factor

INPUT “I:”,I
INPUT “N:”,N
( (1+.01)^N – 1)/(.01I) → F
DISP F

TI-80 Program USPV – Annuity Present Value Factor

INPUT “I:”,I
INPUT “N:”,N
(1 – (1 + .01I)^-N)/(.01I) → P
DISP P

Two Dimensional Vector Operations

Let two vectors be defined as V1 = [A, B] an V2 = [C, D].  The program calculates the dot product, stored in E, norm of V1, stored in F, norm of V2, stored in G, and the angle between V1 and V2 in degrees, stored in H.

TI-80 Program VECTOR2

DEGREE
DISP “V1:”
INPUT A
INPUT B
DISP “V2:”
INPUT C
INPUT D
AC + BD → E
√(A^2 + B^2) → F
√(C^2 + D^2) → G
COS^-1 (E /(F*G)) → H
DISP “NORM V1:”, F
DISP “NORM V2:”, G
PAUSE
DISP “DOT:”, E
DISP “ANGLE:”, H

Simplistic Logistic Regression

Fit data (x,y) to the equation:

Y = 1 / (A + B*e^(-X))


TI-80 Program SIMPLOG

INPUT “L1:”, L1
INPUT “L2:”, L2
e^-L1 → L1
1/L2 → L2
LINREG(aX+b) L1, L2
a→A: b→B
DISP “1/(B+Ae^X)”,A,B
PAUSE
DISP “CORR^2”,r^2





Eddie


This blog is property of Edward Shore, 2017

DM42 and HP 42S: Quadratic Equation, Characteristic Polynomial, and Eigenvalues

DM42 and HP 42S: Quadratic Equation, Characteristic Polynomial, and Eigenvalues The programs are listed for the Swiss Micros DM42 an...