Moneylender’s Loan Calculation Engines

The loan calculation system in Moneylender is built to be expandable and adaptable. Each engine has a set of Modules that run in a specific order. Each module is responsible for only one type of setting on a loan. For example, the Principal module is responsible for creating any transactions that should be generated because principal was disbursed to the borrower. Most engines use the same modules, but run in a slightly different order, with one or two modules different from the rest.

Amortized Engine

(this engine runs when the loan’s engine is set to Amortized, Amortized with Suspense Account, or Payday Loan is chosen as the engine)

This is by far the most commonly used loan engine in Moneylender. It is built to facilitate any loan that has interest on some kind of schedule, payments on a schedule, and may or may not have an escrow account. If a loan does not specifically require one of the other engines, then this engine should be chosen. All of the other engines are similar to the Amortized engine, but remove a specific system from the process.

The engine performs steps in this order for each day:

If the “Use Moneylender 2 style daily interest” box is checked...

If the “Use Moneylender 2 style daily interest” box is checked on the loan, the steps occur in a modified order to attempt to match the math as it was done in the previous version of Moneylender. The mechanisms were built for normal operation, and some functionality is affected by this change. Only use this setting if it is necessary to get the desired result.

  • Amount due is determined
  • Principal is disbursed
  • Interest is earned
  • Fees are applied
  • Escrow due is determined
  • Escrow is disbursed
  • Late fees are applied
  • Adjustments are applied
  • Payments are applied
  • Overpayment is adjusted

Amortized with Daily Interest

All steps run the same as the amortized engine with the exception that interest is triggered by any event that might affect the interest-bearing balance. When interest is triggered, the number of days since the last interest is determined, then the basis is multiplied by the daily interest rate and the number of days elapsed. The details (rate, basis and days) are noted in the transaction description for each interest charge on the loan. All other functions behave the same as the amortized loan engine.

Line of Credit (Daily and Average Daily Balance methods)

With daily interest, this engine is the same as the Amortized with Daily Interest but omits the functionality for tracking an Escrow account. With the Average Daily Balance, the interest is computed by averaging the interest-bearing balance of the loan at the end of each day in the cycle and multiplying that times the periodic interest rate. Interest amounts will mimic the interest figures you would see on an amortized loan when there are no draws to the account in a cycle.


This engine omits much of the mechanisms found in an amortized loan. Since there is no schedule to the repayment, the is no management of the amount due or regular payment. It runs the following daily steps:


This engine performs a single interest step at the beginning of the loan, and no further interest is added to the loan. As such, the interest only happens once, and is not a part of the daily process. Interest is determined by adding up the total scheduled payments on a loan and subtracting the total principal disbursed from it. The difference is added to the loan in a single transaction as precomputed interest. When a loan is closed, and as part of the payoff calculator, if the Rule of 78s is selected on the loan, a reduction in the payoff amount in accordance with the rule of 78s is applied to the loan.

Fixed Scheduled without Specific Amount Due (deprecated)

This loan type is included only as a carry-over from Moneylender 2. In version 3, use the informal loan engine for loans without scheduled payments. This engine behaves like the Amortized engine, but the regular payments are forced to be zero, so the loan will always appear paid current for a year into the future.