Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions numpy_financial/_financial.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,10 @@ def pmt(rate, nper, pv, fv: Any = 0, when: _When = 'end'):
nper : array_like
Number of compounding periods
pv : array_like
Present value
Present value. For a loan, the amount received is positive.
fv : array_like, optional
Future value (default = 0)
Future cash balance (default = 0). For a loan with positive `pv`,
use a negative value for a balance that remains to be repaid.
when : {{'begin', 1}, {'end', 0}}, {string, int}
When payments are due ('begin' (1) or 'end' (0))

Expand Down Expand Up @@ -377,6 +378,13 @@ def pmt(rate, nper, pv, fv: Any = 0, when: _When = 'end'):
today, a monthly payment of $1,854.02 would be required. Note that this
example illustrates usage of `fv` having a default value of 0.

For a $100 loan with no interest, ten payments of $8 leave $20 owed.
Use ``fv=-20`` for this remaining debt; payments are negative because
they represent money paid out:

>>> float(npf.pmt(0, 10, 100, fv=-20))
-8.0

"""
when = _convert_when(when)
(rate, nper, pv, fv, when) = map(np.array, [rate, nper, pv, fv, when])
Expand Down