I recently switched to gnucash and had trouble setting up my mortgage account because I had made extra principle payments in the past. I search of this board revealed others have had the same problem. So I wrote some scheme functions that take care of the problem. This works for situations where one is paying a constant amount each month, but that amount may be different from the original monthly payment and/or the principle left is off schedule.
Problem review: gnucash is setup to deal with loans where payments are made according to the original amoritization schedule. But if the principle ever gets out a whack with respect to whatever is determined by that schedule, gnucash does not correctly compute how a payment gets divided into principle and interest because the existing gnucash functions assume the balance at any point are what the original schedule would have, not what the now adjusted balance is. There are four "variables in loan calculations: starting principle, interest rate, term (number of payments), and monthly payment. Given any 3, the fourth can be computed. Given those four values, one can compute how any month's payment will be split between interest and principle. I put into my "home" directory the file "config.user" below with the necessary functions. I then used the mortgage assistant to create the loan account. I specified the balance as the balance currently and the term as the number of months left required to pay off the loan. I then went to Actions->ScheduledTransactions->ScheduledTranasactionsEditor, highlighted the loan, and clicked on Schedlued->Edit=>TemplateTransaction. I adjusted the formulas there accordingly: pmt( 0.03 / 12.000000 : 110 : 150000.00 : 0 : 0 ) became (added the "i" and 1950 arguments) pmtFixed( 0.03 / 12.000000 : i : 110 : 150000.00 : 0 : 0 : 1950) ppmt( 0.03 / 12.000000 : i : 110 : 150000.00 : 0 : 0 ) became (added the 1950 argument) ppmtFixed( 0.03 / 12.000000 : i : 110 : 150000.00 : 0 : 0 : 1950) ipmt( 0.03 / 12.000000 : i : 110 : 150000.00 : 0 : 0 ) became (added the 1950 argument) ipmtFixed( 0.03 / 12.000000 : i : 110 : 150000.00 : 0 : 0 : 1950) An item of note (from the comment in config.user). ;; In real life, mortgage payments are made in distinct monthly payment. In gnucash ;; those payments are processed with a precision to the nearest penny. In math, ;; they are processed with greater precision. This can cause function using pure ;; math to get out of sync (by a penny at a time) with what happens in a gnucash ;; register. These differences can be resolved by adjusting the results of the ;; functions below to the nearest penny and using the recursive function below ;; to compute the balance at any point (and not the non-recursive one). BUT, ;; I appear to have found a bug in gnucash. When one uses the schedule editor, ;; the editor complains about parsing the functions when recursion is included. ;; So the solution below uses the non-recursive function for computing balance ;; after 'payNum' payments. It has been my experieince (limited) that after getting ;; everything setup in the schedule editor, I can change config.user to use the ;; recursive function and everything runs smoothly. Just set config.user back to ;; using balFixed2 temporarily if you ever need to go back into the schedule editor. config.user <http://gnucash.1415818.n4.nabble.com/file/n4692686/config.user> -- View this message in context: http://gnucash.1415818.n4.nabble.com/Loan-Mortgage-payments-with-adjusted-principle-eg-after-an-extra-principle-payment-SOLVED-tp4692686.html Sent from the GnuCash - User mailing list archive at Nabble.com. _______________________________________________ gnucash-user mailing list gnucash-user@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-user ----- Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.