adamsaghy commented on code in PR #6514:
URL: https://github.com/apache/fineract/pull/6514#discussion_r4207167098
##########
fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/calc/ProjectedAmortizationScheduleModel.java:
##########
@@ -93,6 +93,15 @@ public final class ProjectedAmortizationScheduleModel {
*/
public static final int MAX_CALCULABLE_TOTAL_DAYS = 100_000;
+ /**
+ * Cap on the calculated annual EIR, as a percentage. A schedule whose
payments repay the balance in a handful of
+ * days earns its whole discount fee over that handful of days, and
compounding that daily return over the day count
+ * produces a rate of astronomical magnitude - 5.8E+55 % for a 100 balance
against a 150 fee repaid in five days.
+ * Beyond this cap the rate carries no business meaning, so such a
schedule is rejected with the ordinary "not
+ * calculable" error every entry point already handles - both feasibility
pre-checks run the same solve.
+ */
+ public static final BigDecimal MAX_CALCULABLE_ANNUAL_EIR = new
BigDecimal("999999");
Review Comment:
Seems i was wrong here and we need a much higher amount here... reversed to
DECIMAL(19,6) maximum. my bad
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]