Jump to content
Sign in to follow this  
MortgageLender

Can I solve this a better way?

Recommended Posts

I've got to tabulate the daily interest charges on Loans from Loan inception to current date.

I've got a PRINCIPAL_ACCOUNTS table.  Each transaction in that table has a date and an amount of increase or decrease in the principal balance, and the updated outstanding balance as fields.

Ive got a similar INTEREST_RATE changes table to track each time the user changes his/her borrower's rate including date of change and what the new rate is as fields.

Ive got a DAILY INTEREST CHARGES TABLE that captures the outstanding principal balance, the RATE in effect, and has calc field for the calculated daily interest charge for each day based on BALANCE and RATE in effect for that day.  Each record in this table represents each day since loan was funded.

CURRENTLY---I run a script to update the DAILY INTEREST CHARGES table records for each loan.  It deletes all records in the DAILY INTEREST CHARGES table for the loan (or all loans).  It loops through the PRINCIPAL ACCOUNTS and INTEREST RATE CHANGES tables grabbing values of RATE and BALANCE for each day, and repopulates the DAILY INTEREST CHARGES table for each loan through the current date.

THIS TAKES A LONG TIME.  Is there a more clever way?  

 

Thanks for any ideas!!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.