What is the present value (e.g., the initial investment)
of an investment that needs to total $15692.93
after 10 years of saving $100 every month? Assume the
interest rate is 5% (annually) compounded monthly.

>>> np.pv(0.05/12,10*12,-100,15692.93)-100.00067131625819

By convention, the negative sign represents cash flow out
(i.e., money not available today). Thus, to end up with
$15,692.93 in 10 years saving $100 a month at 5% annual
interest, one’s initial deposit should also be $100.

If any input is array_like, pv returns an array of equal shape.
Let’s compare different interest rates in the example above: