Future Value (FV)

Compute the future value. 
 syse.fv(rate, nper, pmt, pv, when='end')
Compute the future value.
 Given:
a present value, pv
an interest rate compounded once per period, of which there are
nper total
a (fixed) payment, pmt, paid either
at the beginning (when = {‘begin’, 1}) or the end (when = {‘end’, 0}) of each period
 Returns:
the value at the end of the nper periods
 Parameters:
rate (scalar or array_like of shape(M, )) – Rate of interest as decimal (not per cent) per period
nper (scalar or array_like of shape(M, )) – Number of compounding periods
pmt (scalar or array_like of shape(M, )) – Payment
pv (scalar or array_like of shape(M, )) – Present value
when ({{'begin', 1}, {'end', 0}}, {string, int}, optional) – When payments are due (‘begin’ (1) or ‘end’ (0)). Defaults to {‘end’, 0}.
 Returns:
Future values. If all input is scalar, returns a scalar float. If any input is array_like, returns future values for each input element. If multiple inputs are array_like, they all must have the same shape.
 Return type:
ndarray
Note
 The future value is computed by solving the equation::
fv + pv*(1+rate)**nper + pmt*(1 + rate*when)/rate*((1 + rate)**nper  1) == 0
 or, when
rate == 0
:: fv + pv + pmt * nper == 0
Example 1:
You invest $20,000 in a retirement account and expect to earn a 10% annual return. How much do you expect to be in the account after 20 years?
import numpy as np import syse as syse account_value = syse.fv(0.1,20,0,20000) print(f"Account Value = ${abs(account_value):,.2f}") Account Value = $134,550.00
Example 2:
You are planning for your retirement and will be investing $250/month into an IRA. You expect a monthly return of 1% and are 45 years from your expected retirement date. Given this information, how much do you expect to be in your retirement account when you retire?
import numpy as np import syse as syse ira_value = syse.fv(0.01,12*45,250,0) print(f"IRA Value = ${abs(Q5):,.2f}") IRA Value = $5,363,673.26