+ Reply to Thread
Results 1 to 4 of 4

Loan Amortization Model broke

  1. #1
    Registered User
    Join Date
    11-04-2016
    Location
    San Diego
    MS-Off Ver
    2013
    Posts
    2

    Loan Amortization Model broke

    Hi all,

    I have a pretty large portfolio loan amortization model I built. It's 45MB right now. I have a few issues I have been running into.

    1- I utilized the error checking and i do not have any circular references but the model won't refresh unless I enable iterative calculations.

    Any thoughts on this?

    2- The model is huge , when I do run the iterations I have to wait till 200-300 iterations. Sometimes longer. Is there a way to clean it up and make it faster?

    3- This model has too many stressed scenarios in my losses assumptions and I think I am using lots of memory. Whenever I make changes to logic and rerun the file breaks.

    To give you an example it broke on my when i changes a formula, but i did not input a wrong formula, I did not mess up a refernce or anything.
    After I pasted values for some tables i had that were TRANSPOSE formulas ,the file worked and ran the iterations.

    Now i changed the same formula and just added 2 cells and it broke and won't run.

    I ran out of ideas and don't know what to look for. Any ideas?

  2. #2
    Valued Forum Contributor
    Join Date
    07-13-2021
    Location
    California, USA
    MS-Off Ver
    2010
    Posts
    513

    Re: Loan Amortization Model broke

    Quote Originally Posted by hassan.farran View Post
    i do not have any circular references but the model won't refresh unless I enable iterative calculations. [....] I have to wait till 200-300 iterations.
    That's a non sequitur.

    Enabling iterative calculations is a benefit only when we have calculations that iterate over circular references. That's tautological on purpose.

    So, why are you enabling iterative calculations?

    Are you using Excel IRR, RATE or XIRR, and they return #NUM, and you are following MSFT's suggestion (click here) and enabling iterative calculations to remedy that?

    AFAIK, that is a misdirection. If you have an example where enabling iterative calculations does indeed remedy a #NUM error, I really want to see it. If you are uncomfortable with attaching the Excel file here, let's make private arrangements. LMK.

    Or are you using Goal Seek, and you find that changing max iterations and/or max change improves the result?

    That is true. But we do not need to enable iterative calculations per se for the max options to work with Goal Seek.

    Bottom line: Do not enable iterative calculations unless you (or a third-part app) wrote circular formulas on purpose.

    And even then, we should avoid the need for circular references. Generally, they are inherently unreliable.

    -----
    Quote Originally Posted by hassan.farran View Post
    Is there a way to clean it up and make it faster?
    Yes.

    But no one can offer specifics without at least a modicum of description of the design and the formulas.

    And almost always, we need to see an actual Excel file itself.

    To that end, you should follow the bright-yellow instructions at the top of the webpage to attach an example Excel that demonstrates the problem. Obviously something smaller than 45MB.

    -----
    Quote Originally Posted by hassan.farran View Post
    don't know what to look for. Any ideas?
    Neither can we. You have not described what you are doing.

    AFAIK, there is nothing different between a "portfolio loan" amortization and any other loan amortization.

    Are your referring to a portfolio of loans, like the Lending Club?

    Even so, there is nothing about the amortization of a portfolio of loans that requires a "model", much less iterative calculations.

    Do you really mean that you want to solve some problem that involves the use of a loan amortization at its core?

    If so, what is that problem?

    (It sounds like a simulation, perhaps. But a simulation of what is anyone's guess.)

  3. #3
    Registered User
    Join Date
    11-04-2016
    Location
    San Diego
    MS-Off Ver
    2013
    Posts
    2

    Re: Loan Amortization Model broke

    Hi, thank you for expressing interest in this problem.

    Here are my answers to your questions:


    1- I am not using any of those formulas.
    The only amortization formulas I'm using are PMT and IPMT

    I'm not using goal seek either. Only way for the amortization schedules to update is to let the iterations run.
    I disabled iterations and went tab by tab to see if excel would flag a circular reference and it didn't.

    2 and 3- Here is the structure of my model

    I have Baseline dollar amount. Example as of December 2022, I have a current portfolio balance of $50M that is spread across a number of product.
    I am also expected to originate X amount each month for each product.

    So I have an existing portfolio (total dollar) that will amortize and I have new origination portfolios that will amortize each month.
    I'm not amortizing each loan itself, instead I am amortizing portfolios/vintages.

    I have starting balance , scheduled principal, interest, losses, prepayment.

    I have a ton of stressed scenarios built in losses. Example I can stress specific products, vintages, months.
    My loss formula is 9 lines.

    Each amortization tab goes 4.5 years vertical (1037 cells) Jan 2022 to July 2027 , and horizontally I am amortizing till July 2027 , which is 67 months ahead.

    This is the easy part, with that I have asset sales built in.

    There is a specific trigger i have built in. After a specific time I let the model with some triggers built in , to trigger an Asset Securitization.
    And after a few months we will sell that securitized asset. So i also have the same tabs where i calculate scheduled pmt , interest, losses, prepayment.

    Each asset might sit on the books for specific months so they will behave like other vintages and we will collect payments on them like other vintages until we sell them.

    When we sell them I remove that current balance of that asset from the total portfolio.

    In reality the way you remove that asset is FIFO (first come first out) but I am using a mix across all product to remove. Its wrong but i was not able to write the code for it in excel.
    I was able to code the first row of sale and was stuck on the second row. It was pretty complicated for me.


    So the model goes in circles, a securitization and amount will affect all formulas and all formulas need to run again.

    I don't mind loading a sample file, I'd have to go through the whole file and cut it to 10% see if can keep 10-20 rows in each tab and upload.
    If you are down for a zoom call maybe I can show you the file live and walk you across the logic and how I run the file.

    The file was working and i was able to make updates to it and let it run but as I started making fixes and cleaning it up ,it broke.
    The changes I made were nothing that led to a formula breaking or anything in that sense.

    It's making me believe its just too much memory. When it breaks I will F9 a VALUE! cell, it will give the output in the formula bar but it wont calculate in the model.

    I really appreciate you helping me out here. I would love to fix the file and maybe even create FIFO asset sale if possible.

    Let me know if you want a small file upload or if we can do a live session. I would love a life session if you're ok with that. That way i can explain everything.
    Last edited by hassan.farran; 01-25-2023 at 09:20 PM.

  4. #4
    Valued Forum Contributor
    Join Date
    07-13-2021
    Location
    California, USA
    MS-Off Ver
    2010
    Posts
    513

    Re: Loan Amortization Model broke

    Quote Originally Posted by hassan.farran View Post
    thank you for expressing interest in this problem.
    No pun intended?

    -----
    Quote Originally Posted by hassan.farran View Post
    Here is the structure of my model [....blah, blah, blah....] Let me know if you want a small file upload
    Absolutely! That is what I asked for previously.

    -----
    Quote Originally Posted by hassan.farran View Post
    Only way for the amortization schedules to update is to let the iterations run.
    I disabled iterations and went tab by tab to see if excel would flag a circular reference and it didn't.
    So, what is driving the iterations, if not circular references?

    Do you have any VBA code?

    Do you have any third-party add-ins?

    -----
    Quote Originally Posted by hassan.farran View Post
    Each amortization tab goes 4.5 years vertical (1037 cells) Jan 2022 to July 2027 , and horizontally I am amortizing till July 2027 , which is 67 months ahead.
    [....]
    After a specific time I let the model [...] to trigger an Asset Securitization.
    [....]
    So the model goes in circles, a securitization and amount will affect all formulas and all formulas need to run again.
    Not to be nitpicking, but sometimes language semantics are important.

    There is a big difference between "goes in circles [...] need to run again", which does indeed sound like circular references, and "goes in cycles" (or phases), which could be implemented with IF functions, for example, that affect the interpretation and behavior of cell formulas.

    Again, this all might become clear (or clearer) if you provide a small working Excel file.

    The small example Excel must demonstrate the dependency on Iterative Calculations.

    That is, it "goes in circles [...] and run again" as intended only if Iterative Calculations is enabled.

    And since you mention "each amortization tab", it sounds like the small example Excel file must have at least 2, preferably 3, "amortization tabs".

    My guess is: that is the source of the circular references. IIRC, Excel is not always good any reporting "off-sheet" circular references. Sometimes yes; but sometimes not, I think.

    -----
    Quote Originally Posted by hassan.farran View Post
    It's making me believe its just too much memory. When it breaks I will F9 a VALUE!
    No, that is a classic symptom of circular references.

    When Excel decides to stop the (endless?) "circle" of recalculations, random irrelevant cells can be left in inconsistent states.

    I've seen inexplicable #NAME errors as well as #VALUE errors. And users have reported that Excel reports a circular reference in the simple formula =TODAY().

    -----

    Quite honestly, I don't know how much help I can be, because it sounds like a complicated design, and my time is limited.

    I am primarily interested in understanding the dependency on Iterative Calculations.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA for Loan Amortization
    By iamhanzome in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-21-2021, 02:10 PM
  2. Help with loan amortization
    By cuylar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-27-2011, 08:51 AM
  3. Loan Amortization
    By SJT in forum Excel General
    Replies: 1
    Last Post: 06-20-2007, 05:40 AM
  4. Loan Amortization
    By Gopalakrishnan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-11-2006, 03:55 AM
  5. Replies: 0
    Last Post: 01-30-2006, 06:30 PM
  6. loan amortization
    By Lizzie in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 12-14-2005, 10:50 PM
  7. Loan amortization
    By Michelle - ecowtent in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-08-2005, 02:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1