Well, maybe.
Or maybe Republican policies are beneficial in the long term, which means they don't start working until after they've left office and don't stop working until the Democrat who replaces them has dismantled them.
Or maybe voters tend to vote Republican when they are uncertain about the future, i.e. in periods of instability.
Or maybe the President doesn't make a huge difference either way in most cases, and the business cycle got into a rhythm where corrections started happening in a quasi-regular rhythm that seems to coincide with elections with Republican incumbents. (The only point where it seemed to get out of this rhythm, after WWII, was the double-dip recession of the early 80's, which coincided with a Democrat -> Republican party switch that didn't switch back until there was another recession).
Or maybe there's been only 15 US Presidents to serve at least a full term in the past 100 years and it's not a meaningful sample size. I'm going to bet that's the one.
http://www.demonstrations.wolfram.com/StockMarketReturnsByPa...
Spoiler: it's highly, highly sensitive to parameters. You might choose to lag the time windows for several months to account for a delay in the effect of new policies, or lead to account for anticipation, or use as the underlying "invest or not" determination a time series reflecting laws, who holds the Executive, who holds the Legislative, some combination... but tweak any of these parameters and the outcome will flip wildly.
Of course this makes it very easy to reverse engineer a particular outcome if your audience is not familiar with the effect.
In 1980, at the end of the Carter administration, the US was suffering from a bad recession that double-dipped in 1981. From 1982 onwards, the economy grew without a hitch until 1990-91. You could blame that recession on Reagan and Bush, but it didn't happen during the Reagan years.
And yeah, it was a booming almost-three-decades of growth between 1982 and 2008, with blips in 1991 and 2001.
* The FED has more direct influence and control (although the FED chair is appointed by the President, so I guess you can blame him indirectly)
* Congress is responsible for most domestic policies, even the ones championed by the President.
* Tons of economic factors are outside of the US government's direct control, especially when it comes to science and technology. (Some of these factors are even outside the control of any American actors: many of the recessions between 1970 and 1990 were at least partly caused by disruptions in the oil market.)
* Even factors that you can attribute to government actions are more long-term in focus: ARPANET was established in the Johnson administration and didn't yield macroeconomic gains until the Clinton administration, while most of the economic benefit of the Interstate Highway System was realized long after the Eisenhower administration.
A Princeton paper was written on the subject.
https://www.princeton.edu/~mwatson/papers/DemRep_BlinderWats...
For the past almost 100 years the economy has done better on every major indicator with a Liberal in office.
I suspect it's because the trickle down effect doesn't work.