The 2004-07 bubble era in U.S. housing markets was a time of utter madness. Much has been written about it, but almost nothing has been said about the craziest aspect of it — the cash-out re-financing lunacy.

Let's take a good look at it and explore why the scope of this insanity was so massive that it could — once again — start to take down numerous major housing markets within the next year.

Although traditional refinancing had been done by homeowners to lock in lower interest rates for their mortgage, what became known as a cash-out refinancing was different.

With home prices soaring nationwide during the housing bubble, homeowners an opportunity to pull some of that growing equity out of their house. The main vehicle was a refinance of the homeowner's first mortgage. The owner cashed out the growing equity in the house by refinancing the first mortgage with a larger first. The difference between the two amounts went directly into the pocket of that homeowner. Just like printing money!

How much extra cash are we talking about? Freddie Mac publishes a quarterly cash-out refinance report. Between 2004 and 2007, homeowners were able to cash-out a total of $964 billion. They were free to spend it on anything, and they did. Freddie Mac's figures include only refinancing of prime first-lien conventional mortgages. They do not include refinancing of second liens nor refinancing of subprime loans.

The second method was for the owner to refinance a second lien called a home equity line of credit (HELOC). The HELOC was similar to a business line of credit where the homeowner could draw on the available credit up to the limit provided by the lender. The beauty of this HELOC was that almost all of them required only interest payments for 10 years. Who could resist? Few did.

Cashing out the refinanced HELOC was similar to the cash-out first lien. A borrower was offered a line of credit larger than the current HELOC. The difference was extra money upon which the homeowner could draw.

During the peak bubble years of 2004-06, roughly 20 million first liens were refinanced across the country. According to the Freddie Mac report, more than 85% of all refinances were cash-outs in 2006.

Los Angeles: the epicenter of the madness

Since California was the center of the housing bubble in the U.S., it also became the epicenter for the cash-out refinancing lunacy. Between 2000 and 2007, home prices across California almost tripled. Homeowners used this to turn their rising home value into real spending money.

Roughly five times as many refinance loans were originated in California compared to mortgages for purchasing a home. Millions of Californians refinanced their first mortgage once, twice, even three times during the bubble years. They also refinanced with a cash-out HELOC while their home soared in value. Homeowners partied as if it would never end.

If California was the epicenter for the cash-out refinancing madness, metropolitan Los Angeles was undoubtedly the epicenter of the California craziness. Here is why.

The Los Angeles metro is comprised of Los Angeles and Orange counties, with a population of about 13 million during the bubble years. For four years, utter lunacy prevailed.

According to Mortgagedataweb.com, 2.72 million conventional mortgages were refinanced between 2004 and 2007 in the Los Angeles metro alone. How much money was involved? A total of $627 billion in refinanced mortgages was originated. That's right – $627 billion for one metro.

While these L.A. numbers are mind-boggling, the average refinanced loan was just $232,000. That puzzled me for some time. This was California during the craziest real estate bubble in U.S. history. Eventually I realized that most of these were refinanced HELOCs and not first mortgages.

Since the median California home sale price at the peak was close to $500,000, how many refinanced first liens in Los Angeles metro were jumbo mortgages? These were mortgages that exceeded the limits for a loan to be guaranteed by Fannie Mae or Freddie Mac. Mortgagedataweb.com gives us the answer. In 2005 and 2006 alone, 231,000 jumbo mortgages were refinanced in the Los Angeles metro. With an average size of slightly over $600,000, the total came to an astronomical $140 billion — among a population of around 13 million.

The housing collapse in L.A. and its turnaround

By 2008, the housing market collapse in Los Angeles was in full swing. That year, 37,670 homes in Los Angeles County were foreclosed by mortgage servicers according to data provider Property Radar. Although foreclosures nationwide did not peak until 2010, the peak for Los Angeles was in 2008.

Prices were cratering throughout California in 2009. More than 500,000 delinquent homeowners received a default notice that year. According to the California Association of Realtors, nearly half of all sales were either repossessed properties or short sales. DataQuick reported that in February 2009, 58% of all home sales in California were repossessed properties.

As home prices showed no sign of leveling off in 2009 or early 2010, lenders and their servicers panicked. They decided that the bleeding might be stopped if they drastically reduced the number of repossessed properties placed on the active housing market. RealtyTrac had begun reporting as early as April 2009 that most foreclosed properties were being held off the market. They estimated that roughly 80,000 foreclosed properties in California had been deliberately kept off the market.

What began in California spread nationwide. This table shows what servicers in major metros were doing with their foreclosed homes according to data provided by RealtyTrac.

By mid-2010, Los Angeles County mortgage servicers had just under 30,000 properties in their foreclosure inventory. A mere 1,214 were actively for sale.

Did this desperate strategy prevent home prices from falling further? Not at first. There were simply too many delinquent properties that had not yet been foreclosed. As late as December 2010, 34% of all homes sold in Los Angeles metro and the other four surrounding counties were repossessions. Two months later, 40% of all sales in the state were foreclosed properties. More drastic action was clearly necessary.

The solution was to sharply restrict the number of delinquent properties actually foreclosed. Early in 2012, the number of homes repossessed by the servicers began to plunge.

Take a look at this table showing the sharp drop.

Because of this massive cutback in repossessions, home prices in Los Angeles County finally began to level off and then turn up. ATTOM DATA reported that sellers in the second quarter of 2012 actually showed a profit from their original purchase price.

Servicers realized that reducing foreclosures to a trickle had worked. By February 2013, repossessions plunged in LA County to a mere 310. For all of 2013, only 3,340 houses were foreclosed. What servicers were doing went unreported by the media.

Cash-out refinancing exacerbated the L.A. collapse

There is an excellent source that explores why Los Angeles was so devastated by the housing crash. Steven Lauffer was a professional staffer at the Federal Reserve Board. In 2013, he published a paper entitled “Equity Extraction and Mortgage Default.” Lauffer carefully laid out the case that mortgage defaults in Los Angeles County were caused by cash-out refinancing much more than by anything else.

Using CoreLogic's search tools and database, Lauffer was able to search more than 1.2 million homes between 2000 and 2009 in Los Angeles County. Through this, he could identify every open mortgage against all these properties during the study period. He selected 100,000 homes purchased between 2002 and 2004 before the bubble reached its peak. From this, he randomly chose 20,000 properties to make his study more manageable.

What Lauffer found was truly shocking. Half of these homeowners had taken out a second mortgage at the time of purchase. After buying the property, these owners took out an average of 2.5 new mortgages through 2009. Of these new mortgages, 45% were cash-out refinances and an additional 10% were HELOCs.

When home prices stopped rising in 2006 and then began to decline, homeowners started defaulting in droves. Of those who bought a house in 2003, 10% had defaulted by 2009. Those who purchased in the peak bubble year of 2006 saw their equity evaporate almost overnight. By the end of 2009, 40% of this cohort had defaulted on their mortgage.

Here is the real shocker: Lauffer found that of those homeowners who defaulted by 2009, 40% of them had purchased their home in 2003 or earlier. Although their houses had increased in value considerably until the bubble popped in late 2006, more than 40% of their outstanding mortgage debt in 2009 was the result of cash-out refinancing – what Lauffer called “equity extraction.” For 90% of the defaulters, he found that their original mortgage debt at the time of purchase was less than the value of their home when they defaulted. It was this cash-out refinancing more than losing a job or anything else that led these homeowners to default.

Why difficult times are still ahead of us

In a recent column, I discussed why the massive delinquency of bubble-era non-agency mortgages is a disaster waiting to happen. Comments by quite a few readers showed me they had a hard time understanding how fewer than 4 million mortgages could take down major housing markets.

That is a fair objection. You need to understand that the problem is much greater than just the non-agency mortgages. During the bubble years, a total of 28 million first and second liens were refinanced. Recall that roughly 80% of these were cash-out refinances.

Although the cash-out refinancing lunacy was most excessive in the Los Angeles metro, it took place throughout the nation, especially in the major metros. When home prices began declining in late 2006 and early 2007, the vast majority of these homeowners had a total mortgage debt which was much greater than when they bought their home.

This massive problem of underwater homeowners could not be resolved only by shutting off the spigot of foreclosures. That is why a total of 25 million permanent mortgage modifications and other so-called “workout plans” were put in place from 2008 until June 2018 according to data provider Hope Now.

Modifying mortgages as an alternative to foreclosure just kicked the can down the road. It succeeded in bringing these delinquent homeowners into current status. Yet millions of them are re-defaulting on these modified mortgages. The number of re-defaults is increasing relentlessly around the U.S. Worse yet, many re-defaulters are on their second- or third mortgage modification.

Vulnerable investors

Which investors might be vulnerable? Owners of some mortgage REITs, owners of nearly any mortgage-backed securities (RMBS) originated by Ginnie Mae (FHA-insured mortgages), and more than a few hedge funds.

It is quite likely that there is no feasible solution to this massive problem of mortgage modification re-defaults. As home sales weaken now around the country and sale prices level off, you’ll do well to prepare by assuming the worst.

Keith Jurow is a real estate analyst who covers the bubble-era lending debacle and its aftermath. Contact him at www.keithjurow.com.

More: Bubble-era home mortgages are a disaster waiting to happen

Also: The No. 1 city in America to buy your first home