This library contains 5g functions for modeling debt.
URL: https://gist.github.com/CHatmaker/28031fac3d3e91dc5997c80fd4a180ec
PMTAλ Determine monthly payment amount for commercial loans
GetBalanceλ Determine debt with accrued interest when debt payments start
TLAλ Term Loan A Debt Schedule
TLAActλ Term Loan A Debt Schedule with Actuals
TLBλ Term Loan B Debt Schedule (Balance due at maturity)
TLBActλ Term Loan B Debt Schedule (Balance due at maturity) with Actuals
Installmentλ Installment loan where debt repayment + interest payment remains constant.
These functions create separate lines which can be 'plugged' into our financial statements. Here are the labels created by InstallmentDebtLabelsλ() and suggestions on where each line should go in various financial statements:
Debt Opening – Appears as the beginning balance of liabilities under "Long-Term Debt" or "Short-Term Debt."
Debt Draw – Increases liabilities (new borrowing recorded under "Debt Payable").
Debt Repayment – Reduces liabilities (decrease in "Debt Payable").
Debt Extra Payment – Also reduces liabilities but may be categorized separately if it includes prepayment penalties.
Debt Closing – Ending balance of liabilities under "Long-Term Debt" or "Short-Term Debt."
Interest Opening – Beginning balance of accrued interest (if applicable).
Interest Charge – Increases accrued interest liability.
Interest Payment – Reduces accrued interest liability.
Interest Closing – Ending balance of accrued interest.
Points Charge & Fees Charge – May be capitalized as part of loan costs in assets or recorded as an expense depending on accounting treatment.
Debt Draw – Reported under "Financing Activities" as an inflow.
Debt Repayment & Debt Extra Payment – Reported under "Financing Activities" as an outflow.
Interest Payment – Reported under "Operating Activities" (or sometimes Financing Activities under IFRS).
Points and Fees Payment – Reported under "Financing Activities" (if capitalized) or "Operating Activities" (if expensed).
Interest Charge – Recorded as an expense under "Interest Expense."
Points Charge & Fees Charge – If expensed, they appear under "Other Expenses" or "Financing Costs."
Total Payments – Only the interest portion and any expensed fees affect the P&L, while principal repayments do not.