Present Value
Overview
Future Value Calculations
Supposing we have an amount of money {% P_0 %} today, the amount of money we will have after n periods, given that
we can invest the money at an interest rate of r, is
{% P_n = P_0(1+r)^n %}
The above equation can be implemented simply using standard javascript utilities.
let futureValue = 100 * Math.pow(1.1, 10);
Try it!
The calculations can also be done using the present-value library. Given that present value calculations are so simple,
the only advantage to using the library is poosibly for readibility.
let pv = await import('/lib/finance/fixed-income/present-value/v1.0.0/present-value.mjs');
let futureValue = pv.value(100, 10, 0.03);
//alternate computation
let futureValue2 = pv.value({
value:100,
periods:10,
rate:0.03
});
Try it!
Present Value Calculations
The present value is the opposite of future value. Instead of asking how much money will I have in the future, the question
now becomes, how much do I need to invest today to get the specified future value. An alternate way to think about it
would be, suppose you will receive a specified amount of money in future. How much can you borrow from the bank today
such that when the future amount is received, you can pay off the loan from the bank. This is the origin of the terms
"present" value and "future" value. If the bank is available, you can "transform" an amount of money at any point in time
to an amount of money at some other point.
{% P_0 = P_n(1+r)^{-n} %}
let presentValue = 100 * Math.pow(1.1, -10);
Try it!
let pv = await import('/lib/finance/fixed-income/present-value/v1.0.0/present-value.mjs');
let presentValue = pv.value(100, -10, 0.03);
//alternate computation
let presentValue2 = pv.value({
value:100,
periods:-10,
rate:0.03
});
Try it!