Skip to content

DOC: clarify pmt cash-flow signs - #157

Merged
seberg merged 4 commits into
numpy:mainfrom
naseweisssss:codex/pmt-cash-flow-docs
Nov 4, 2026
Merged

seberg merged 4 commits into
numpy:mainfrom
naseweisssss:codex/pmt-cash-flow-docs

Conversation

@naseweisssss

@naseweisssss naseweisssss commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Add some documentations in relation to issues #130 to clarify the usage of signs on fv and pv

@InessaPawson InessaPawson left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this, @naseweisssss !
The zero rate example is a great idea, it's much easier to do the math. I checked against the implementation, and it's right.
A few small requests:

  1. Keep "Future value" as the term for fv. That is the terminology used throughout the API: pv, nper, ipmt, ppmt, rate - all document the fv parameter as “Future value”. Also, fv itself is defined as computing the future value. Renaming it only in pmt would introduce an inconsistency.
  2. Make the pv note perspective-independent, e.g., "Cash received is positive and cash paid out is negative. For a borrower, the loan amount is positive".
  3. ipmt, ppmt, nper, and fv share the same convention and descriptions. A short note in the module docstring explaining the convention would be nice. Also could be a follow-up PR.

@naseweisssss

Copy link
Copy Markdown
Contributor Author

Thanks for working on this, @naseweisssss ! The zero rate example is a great idea, it's much easier to do the math. I checked against the implementation, and it's right. A few small requests:

  1. Keep "Future value" as the term for fv. That is the terminology used throughout the API: pv, nper, ipmt, ppmt, rate - all document the fv parameter as “Future value”. Also, fv itself is defined as computing the future value. Renaming it only in pmt would introduce an inconsistency.
  2. Make the pv note perspective-independent, e.g., "Cash received is positive and cash paid out is negative. For a borrower, the loan amount is positive".
  3. ipmt, ppmt, nper, and fv share the same convention and descriptions. A short note in the module docstring explaining the convention would be nice. Also could be a follow-up PR.

Thanks for the comments,

  1. I have changed it back to Future value.
  2. Used the recommended wording
  3. add on top of the module docstring

@InessaPawson InessaPawson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick turnaround, @naseweisssss! All requests from my review are addressed, so it’s Approve from me.

@stefanv I believe this is ready to be merged.

@seberg seberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this seems sensible to me and I don't have thoughts on bikeshedding things more. The one thing I feel more generally, is that using kwargs might be clearer, but they don't even have that nice names :).

@naseweisssss

Copy link
Copy Markdown
Contributor Author

Thanks, this seems sensible to me and I don't have thoughts on bikeshedding things more. The one thing I feel more generally, is that using kwargs might be clearer, but they don't even have that nice names :).

Thanks, it doesnt look like I can merge this still.

@seberg
seberg merged commit 031ed55 into numpy:main Nov 4, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Review to Complete in NF Sustaining Open Source Series 2026 Nov 4, 2026
@seberg

seberg commented Nov 4, 2026

Copy link
Copy Markdown
Member

A maintainer needs to merge :). Thanks @naseweisssss!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

3 participants