numpy / numpy/numpy-financial

Add CUMPRINC and CUMIPMT functions

Open Beginner friendly
#38 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement sustain-2026
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.