Add CUMPRINC and CUMIPMT functions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 409
- Forks
- 98
- Avg merge
- 10h 43m
- Merged PRs (30d)
- 12
Description
The Open Document Format for Office Applications (OpenDocument)v1.2 on which numpy-financial is based specifies two functions which are currently not implemented: CUMPRINC and CUMIPMT. These functions calculate the cumulative principal and interest paid down in an installment loan after a number of payment periods.
To implement these, one could simply call npf.ppmt/npf.ipmt with a 1-D array for the per argument and then sum over rows.
I'd be happy to contribute code and submit a pull request.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing npf.ppmt and npf.ipmt entry points and their tests. Review how payment-period arrays are handled, then add CUMPRINC and CUMIPMT with coverage for cumulative principal and interest over multiple periods; done means both functions match the OpenDocument v1.2 behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- fintech-quant
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100