If you hang around enough enthusiastic Democrats during election season, you will surely hear these folks trumpet the fact that the economy performs much better during Democratic presidential administrations than Republican ones.

And while this relative economic performance makes for a great statistic in political debates, it’s confounding for economists, given the fact that presidents do not have a lot of direct control over the economy. In a paper released Tuesday by the National Bureau of Economic Research, Princeton economists Alan Blinder and Mark Watson dig into data stretching back to World War II to measure the magnitude of the gap in economic performance during Democratic and Republican administrations and to discover the reasons behind it.

They found that the gap in economic performance was, “startlingly large.” They write:

“The U.S. economy not only grows faster, according to real GDP and other measures, during Democratic versus Republican presidencies, it also produces more jobs, lowers the unemployment rate, generates higher corporate profits and investment, and turns in higher stock market returns. Indeed, it outperforms under almost all standard macroeconomic metrics.”

The graph below illustrates the gap in economic performance, as measured by GDP growth:

Screen Shot 2014-07-29 at 11.05.52 AM

But while the differences in performance were clear and statistically significant, it’s not as clear what caused them. Blinder and Watson test several hypotheses, like fiscal policy. Does the Democratic tendency for higher tax rates and more government spending lead to better economic performance, or was there something about monetary policy under Democratic presidents that led to faster GDP growth?

As far as fiscal policy is concerned, Blinder and Watson find that there actually wasn’t that much of a difference between the two parties’ presidencies. Since World War II, presidents of both parties have engaged in spending increases and tax cuts and vice versa, to the point that there has been little difference, overall, between the fiscal policies of the parties on a presidential level since 1947. Democratic-appointed Fed chairs have fared better at stimulating growth than those appointed by Republicans, but the reality is that Fed policy doesn’t fall neatly along party lines. The most hawkish Fed president during the time period under examination by the researchers, Paul Volcker, was nominated by a Democrat, Jimmy Carter. Meanwhile, those that kept interest rates lowest—Alan Greenspan and Ben Bernanke—were both nominated by Republicans. Fed policy, in other words, appears to be driven by economic conditions rather than who is president.

Blinder and Watson also tested whether the timing of wars, which usually lead to increased defense and deficit spending, could have led to faster growth under Democrats. But here, again, there isn’t much difference over the long run between the two parties. While Democratic Presidents Truman and Johnson presided over the Korean and Vietnam wars, Republican Presidents like Reagan and the two Bushes were also wartime presidents and, in the case of Reagan, oversaw big increases in defense spending. In the end, differences in defense spending between Democrats and Republicans were negligible.

So what explains the better economic performance under Democratic presidents? Blinder and Watson identified two factors—oil shocks and increases in what’s called Total Factor Productivity—as the main culprits. Nixon, Ford, and George W. Bush were unlucky to have their presidencies coincide with large increases in oil prices, while Democratic presidents, with the exception of Carter, served during a time of flat or falling energy prices, a dynamic that can provide big boosts to the domestic economy.

As for Total Factor Productivity, this is a measure that economists use to gauge the economic effects of things like improvements in technology, education, and business processes. Democratic presidents were apparently lucky enough to preside over the economy during periods where advances in technology had a huge effect on the economy. The best example of this dynamic is the rise of the Internet during the Clinton administration, when many processes were made more efficient and the economy more productive by the development of that technology.

Political scientists have shown that the performance of the economy is one of the most important factors for voters when they head to the polls. If the economy is doing well, the incumbent will likely win, and vice versa. But Blinder and Watson have shown that the president has little effect on the economy. Economic performance is determined by factors that are largely outside the control of public policy, or at least the kind of policy that is directly controlled by the Commander in Chief.