This is hugely simplistic. It doesn't account for global recessions, wartime spending, demographic changes, the fact of a legislature that opposes everything or willingly goes along. And causation of today's economic conditions is often the function of variables tweaked years - maybe even decades - earlier and there is no attempt at time lag that traces back to specific policies or events.
All of that said, it is a fun way to examine the claims that Republicans are better capitalists than Democrats. The performance of capital markets is one pretty simple measure of whether a government is good or bad at this capitalism thing.
This table starts at the bottom with Teddy Roosevelt (Republican - and a great one) in 1901. At that point the Dow Jones was at 73.27 and it rose 20% during his administration.
Now imagine that you have two investors. One investor is a rabid Republican and every time a Democrat gets into office, his puts his money under his mattress. Every time a Republican gets into the Oval Office, he puts all of his money into an index fund that tracks the Dow. The other investor is a rabid Democrat and he moves in the opposite direction of the Republican investor: he goes to the mattress every time a Republican is sworn into office and bets everything on the Dow index fund every time a Democrat moves his paperweights into the Oval Office.
So, during Teddy Roosevelt's time in office, the Republican gets this 20% gain and the Democrat sits on the sidelines, completely missing out on the gain. And so it goes. Whoever is sitting it out misses the boom or bust that happens when their money is under the mattress.
So, over the last 114 years, how have these two investors done? You can see the numbers through yesterday's close. Our Republican investor who started with $100,000 would now have $504,951. By contrast, the Democratic investor would have $4,843,040, nearly 10X as much.
At best, Republican defenders faced with this data could say that it makes no difference who is in the White House. These results might be random. At worst, Republican defenders would have to admit that investors prefer Democratic presidents. After a century of data, it might be possible to start drawing conclusions. In any case, if Democratic presidents are anti-capitalists, they're not very good anti-capitalists, so maybe the staunch Republicans could still argue that this is further proof of Democratic incompetency. "Obama is a communist! He's just such an incompetent communist that his attempts to bring down capitalism drive the market up!"