Video Tutorial (shows how to build from scratch):
If you have multiple principal and interest loans (not interest only debt) and you know you will have some extra cash flow to try and pay that debt back faster, you may want to know where to allocate this extra principal so that it saves you the most interest over time.
What this model does is rank your loans in two different ways (you can toggle the ranking style to see how they effect your total repayment). The first way you can define the extra payment allocation is by having the model apply it according to the total lifetime interest of each loan. That means it starts at the loan with the greatest interest and once that loan gets paid back, the allocation automatically starts effecting the next highest loan and so on.
If a loan ends up already getting paid back by the time the loan ahead of it is paid back, the allocation knows to skip to the next available loan. This goes on until everything is paid back.
The other ranking style is by highest interest rate. Because the loans can have different terms, the highest interest rate doesn’t always mean the most effective to payoff first. This is what makes the optimization so difficult to automate.
Finally, you will see a monthly summary of debt service with no extra payment vs. debt service with extra payment, the amount of days ahead of time you pay back all the loans, and the total savings when you do apply extra principal in this optimized way.