Repository navigation
Conversation
Solve the PMT equation for the number of payments and round to the nearest whole payment. Add regressions for zero/non-zero rates, both payment timings and non-zero future value. Research and correction: Xamit Kadirbekov / GERO Research. https://issues.apache.org/jira/browse/FINERACT-2809
|
Hello Adam and the Fineract team, Thank you for reviewing and merging the inverse-helper correction. I would like to continue contributing useful calculation checks. My broader Fineract case study is here: https://www.gero.uz/research/fineract-calculation-contracts/ My background is applied mathematics and mechanics. I would welcome ongoing remote collaboration on day-count rules, repayment schedules, rounding and boundary cases, starting with one calculation family the team wants validated. I can supply independent expected results and focused regression tests through your normal JIRA/PR process. Xamit Kadirbekov / GERO |
Thank you for sharing these. If you could raise stories to cover them one by one, that would be the best for everybody. We are looking forward to your contributions. |
Description
For
pmt(0.01, 12, 1000, 0, false),FinanicalFunctions.nop()currently returns 7 instead of 12. Replace its non-zero-rate expression with the algebraic inverse ofpmt()and document rounding to the nearest whole payment, including the zero-rate branch.https://issues.apache.org/jira/browse/FINERACT-2809
The inverse supports both payment timings and a non-zero future value. The three regression tests cover those cases and zero interest. A separate 33-case round-trip harness passes 33/33 with the correction, versus 8/33 on the original source.
Validation on develop
e4474a0f4a4c65a75e7758e47db1fd277e5fcfef, JDK 25:./gradlew :fineract-loan:test --tests '*FinanicalFunctionsTest' \ :fineract-loan:spotlessCheck \ :fineract-loan:checkstyleMain :fineract-loan:checkstyleTestNo production call site for
nop()was found in the checked Java sources. This is a helper correctness fix; no production loan impact is claimed.Research and proposed correction: Xamit Kadirbekov / GERO Research, following the discussion with Adam Saghy on the developer mailing list.
Checklist
There are no REST API changes. Full integration CI has not been run locally.