numpy.fv() in Python
numpy.fv(rate, nper, pmt, pv, when = ‘end’) : This financial function helps user to compute future values.
Parameters :
rate : [scalar or (M, )array] Rate of interest as decimal (not per cent) per period
nper : [scalar or (M, )array] total compounding periods
pmt : [scalar or (M, )array] fixed payment
pv : [scalar or (M, )array] present value
when : at the beginning (when = {‘begin’, 1}) or the end (when = {‘end’, 0}) of each period. Default is {‘end’, 0}
Return :
value at the end of nper periods
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
# Python program explaining fv() function import numpy as np ''' Question : Future value after 10 years of saving $100 now, with an additional monthly savings of $100. Assume the interest rate is 5% (annually) compounded monthly ? ''' # rate np pmt pv Solution = np.fv(0.05/12, 10*12, -100, -100) print("Solution : ", Solution) |
Output :
Solution : 15692.9288943
References :
https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.fv.html#numpy.fv
.
Recommended Posts:
- Important differences between Python 2.x and Python 3.x with examples
- Python | Index of Non-Zero elements in Python list
- Reading Python File-Like Objects from C | Python
- Python | Merge Python key values to list
- Python | Convert list to Python array
- Python | Add Logging to a Python Script
- Python | Add Logging to Python Libraries
- Python | Set 4 (Dictionary, Keywords in Python)
- Python | Sort Python Dictionaries by Key or Value
- Python | Visualizing O(n) using Python
- JavaScript vs Python : Can Python Overtop JavaScript by 2020?
- max() and min() in Python
- SHA in Python
- bin() in Python
- gcd() in Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



