HP Forums
Time Value of Money - The Power of Compound Interest. - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: HP Prime Software Library (/forum-15.html)
+--- Thread: Time Value of Money - The Power of Compound Interest. (/thread-4355.html)



Time Value of Money - The Power of Compound Interest. - TechAlex - 07-14-2015 02:40 AM

// Time Value of Money - The Power of Compound Interest.
// Alex Rodriguez - 2015
// The powerful HP solver is called up to solve for any unknown variable
// This program is basically two equations linked by the "+" sign just before the "deposit" variable.
// This variable can be left with a value of 0, and the rest of the equation works just fine.
EXPORT pv, fv, %R, years, deposit, comp;
EXPORT TVM()
BEGIN
STARTAPP("Solve");
"fv=pv*(1+((%R/100)/comp))^(comp*years)+deposit*((1+((%R/100)/comp))^(comp*years)-1)/((%R/100)/comp)"▶E1;
PRINT();
PRINT("NOTE: This Program Will Solve for Any Unknown Variable.");
PRINT(" ");
PRINT("pf = Present Value");
PRINT("fv = Future Value");
PRINT("%R = Interest Rate");
PRINT("years = Numbers of Years");
PRINT("comp = Compounds per Year, 1=yearly, 12=montly, 4=quaterly, etc.");
PRINT("deposit= Payment or deposit, 0 if none.");
PRINT(" ");
PRINT("Press ENTER ↲ to Continue...");
// Display Solver
CHECK(1);
STARTVIEW(2,1);
END;