numpy.pv() in Python
Last Updated :
29 Nov, 2018
numpy.fv(rate, nper, pmt, fv, when = ‘end’) : This financial function helps user to compute future values.
Parameters :
rate : [array_like] Rate of interest as decimal (not per cent) per period
nper : [array_like] total compounding periods
pmt : [array_like] fixed payment
fv : [array_like, optional] future value. Default = 0.0
when : at the beginning (when = {‘begin’, 1}) or the end (when = {‘end’, 0}) of each period. Default is {‘end’, 0}
Return :
present value as per given parameters.
Equation being solved :
fv + pv*(1 + rate)**nper +
pmt*(1 + rate*when)/rate*((1 + rate)**nper - 1) = 0
or when rate == 0
fv + pv + pmt * nper = 0
Code 1 : Working
import numpy as np
Solution = np.pv( 0.05 / 12 , 10 * 12 , - 100 , 15692.93 )
print ( "present value (fv) : " , Solution)
|
Output :
present value (fv) : -100.000671316
Reference :
https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.pv.html
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...