Change language

numpy.pv () in Python

|

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. 

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 

Code 1: Working

## Python program explaining the pv () function

 

import numpy as np

"" "
Question:

 
What is the current value (eg initial investment)
investment that should be $ 15692.93 after 10
years of saving $ 100 each month?
Pre Let’s assume the interest rate is 5% (per annum) monthly.
"" "

  
# evaluate np pmt fv

Solution = np.pv ( 0.05 / 12 , 10 * 12 , - 100 , 15692.93 )

 

print ( "present value (fv):" , Solution)

Output:

 p resent value (fv): -100.000671316 

Link:
https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.pv.html

Shop

Learn programming in R: courses

$

Best Python online courses for 2022

$

Best laptop for Fortnite

$

Best laptop for Excel

$

Best laptop for Solidworks

$

Best laptop for Roblox

$

Best computer for crypto mining

$

Best laptop for Sims 4

$

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers

News


Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method