Posts

Showing posts from February, 2018

Mortgages, Valuation and PMI: Do Your Homework Edition

A year and change ago, we bought a house in Long Beach, CA. Typically, if you put less than 20% down, the bank requires you to pay for PMI (private mortgage insurance).  As you pay down the mortgage, eventually you owe less than 80% of the value of the home, and the PMI goes away. Immediately upon moving in, my wife began doing renovations.  A few months ago she was confident that the changes she had made had increased the value of the house enough that our equity now exceeded 20% of the home value.  So she contacted the bank and asked them to send someone by to reappraise the house. Someone was sent.  Long story short, he re-appraised the value of the home about 65K below what we thought it was worth, which meant that PMI would stay.  My wife is the sort of person who looks through paperwork.  Thoroughly.  And she looked through the appraiser's report.  Thoroughly. She found a number of discrepancies.  The analysis seems to have been done before the appraiser ever cam

VBA, Memory and Speed

Microsoft's VBA (Visual Basic for Applications) is clunky and slow, but occasionally, it is the right tool for the job, particularly for cleaning up data that is stored in an Excel format.  One of the problems with VBA, however, is that it tends to suck up memory.  Anyone who uses VBA to play with data sets with more than a few thousand observations will run into the problem of seeing their program slow down more and more.  In fact, if you run the same program multiple times in a row, you will find it runs slower each time you run it.  If your data set is large enough, or your code runs through enough calculations, you will eventually get an out of memory message and the whole thing crashes.  It turns out there is a simple solution to this irritating problem.  However, to fix the problem, you have to understand why it exists, which is that Excel has an undo function which also extends into VBA.  In order to undo a step, Excel "remembers" the old state, so it can return