Skip to content

DOC: correct MIRR formula and period count - #171

Open
milliondreamsblog wants to merge 1 commit into
numpy:mainfrom
milliondreamsblog:docs/correct-mirr-formula
Open

milliondreamsblog wants to merge 1 commit into
numpy:mainfrom
milliondreamsblog:docs/correct-mirr-formula

Conversation

@milliondreamsblog

Copy link
Copy Markdown

The MIRR Notes formula multiplies by an extra reinvestment factor even though its FV_positive definition already includes reinvestment. Remove that factor, use the magnitude of the negative-flow present value, and define the exponent using the elapsed number of periods, N = len(values) - 1 for one cash-flow series.

Use single backslashes for the LaTeX commands inside the raw docstring so MathJax can render the equation correctly.

For [-120000, 39000, 30000, 21000, 37000, 46000] with finance rate 0.10 and reinvestment rate 0.12, the corrected formula agrees with the function at 12.6094%; the extra factor gives 26.1225%.

This changes only the docstring. Validation: the native package builds on Python 3.13/Linux; all 118 package tests and doctests pass; the Sphinx HTML build passes with -W --keep-going; and the generated MIRR equation and explanation were checked. An AST comparison confirms no executable code changed.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant