The bull market just celebrated its seventh anniversary. But the gains in recent years – as well as its recent sputter – may be explained by just one thing: monetary policy.

The factors behind that and previous bubbles can be illuminated using simple visual analysis of a chart.

The S&P 500 (^GSPC) doubled in value from November 2008 to October 2014, coinciding with the Federal Reserve Bank’s “quantitative easing” asset purchasing program. After three rounds of “QE,” where the Fed poured billions of dollars into the bond market monthly, the Fed’s balance sheet went from $2.1 trillion to $4.5 trillion.

This isn’t just a spurious correlation, according to economist Brian Barnier, principal at ValueBridge Advisors and founder of FedDashboard.com. What’s more, he says previous bull runs in the market lasting several years can also be explained by single factors each time.

Barnier first compiled data on the total value of publicly-traded U.S. stocks since 1950. He then divided it by another economic factor, graphing the ratio for each one. If the chart showed horizontal lines stretching over long periods of time, that meant both the numerator (stock values) and the denominator (the other factor) were moving at the same rate.

“That's the beauty of the visual analysis,” he said. “All we have to do is find straight, stable lines and we know we've got something good.”

Scouring hundreds of different factors, Barnier ultimately whittled it down to just four factors: GDP data five years into the future, household and nonprofit liabilities, open market paper, and the Fed’s assets. At different stretches of time, just one of those was the single biggest driver of the market and was confirmed with regression analyses.

He isolated each factor in a separate chart, calling them “eras” for the stock market.



From after World War II until the mid-1970s, future GDP outlook explained 90% of the stock market’s move, according to statistical analysis by Barnier.







GDP growth lost its sway on the market in the early 1970s with the rise of credit cards and consumer debt. Household liabilities grew with plastic first, followed by home mortgages, until the real estate crash of the early 1990s. Barnier’s analysis shows debt explained 95% of the entire market’s move during this time.







The period between the mid- to late-1990s until 2000 was, of course, marked by the tech bubble. While stocks took much of the headline, that time also saw heightened activity in the commercial paper market. Startups and young companies sought cash beyond their stratospheric share values to fund their operations. Barnier’s regression analysis shows commercial paper increases could explain as much as 97% of the tech bubble.







Shortly after the tech bubble burst, a housing bubble began, once more in the form of mortgages and other debt. That drove 94% of the market’s move for the first several years of the current century.







As the financial crisis reached a fevered pitch in 2008, the Federal Reserve took to flooding the financial market with dollars by buying up bonds. Simultaneously, interest rates fell dramatically, as bond yields move in the opposite direction of bond prices. Barnier sees the Fed as responsible for over 93% of the market from the start of QE until today. During the first half of 2013, the Fed caused the entire market’s growth, he said.

Since the Fed stopped buying bonds in late 2014, the S&P 500 has been batted around in a 16% range and is more or less where it was when the QE came to a close. Investors need to anticipate the next driver, said Barnier.

“Quantitative easing has stopped, but now we're into the interest rate world,” he said. “That means for any investor trying to figure out what to do, step one is starting with a macro strategy.”

More from Yahoo Finance

We have just witnessed a 'death cross' in the market's fear indicator

Three charts show why consumers – not the Fed – are right about low prices

It's not going to get better for the rest of the year: Portfolio manager