What's the highest instantaneous real gain the stock market as a whole can produce?
I'll use one-day price change as a proxy for this: the highest one-day gain was 14.87% in 1931; the largest one-day loss was 22.5% in 1987. This itself is pretty surprising -- it shouldn't be possible for a reasonably efficient market to spontaneously decide that the future earnings of American industry are 15% higher or 23% lower overnight. Markets are certainly driven by more than just fundamental analysis (both moves were technical, at least in the sense that they were driven by idiosyncrasies in how trades are executed, rather than by economic factors), but technical problems are, by their nature, hard to fix -- NYSE and NASDAQ are two brutally competitive companies whose business models each involve being more reliable than the other, so if anyone out there is going to put in the effort to predict a market breakdown, they're probably also going to fix it in time.
But fundamental moves are still a rich source of interesting speculation. For the market to make a massive upward move, there would need to be a massive, instantaneous macro change -- and the only source of those is government.1 But it's hard to imagine a government edict having a huge positive effect on prices: any change in income distribution (lowering corporate tax rates, etc.) will also lead to a corresponding change in spending or deficit, and since the people paying the difference are all consumers, employees, and shareholders, the changes would be redistributed pretty fast -- because different companies have different pricing power, it wouldn't be even from one stock to the next, but for the market as a whole, even a radical redistribution of wealth to publicly-traded companies wouldn't have a huge net effect (besides decreasing the losses due to tax collection and obedience to regulation).
It probably takes a lot of imagination to dream up real gains for the stock market because politicians have every incentive to make them happen -- if there's a policy with few to no ill effects, but which in general makes people slightly richer, Congress will clamber for a few more percentage points of annual gains to take credit for. They've pushed the limits of easy gains (free trade agreements, SEC regulations keeping investors informed, a generally pro-growth tax-and-regulation policy) and are bumping into the no-win tradeoffs of redistributing one sector's outsize gains to offset another sector's extra losses (via ethanol subsidies, gas taxes, and other such well-meaning mistakes).
What's interesting is that it takes little effort at all to imagine a policy that could suddenly devalue the market. Anything from a loopier tax policy to a more aggressive foreign policy to an inefficient attitude towards trading and capital gains could send the market down to an arbitrarily low level. Pick a loss -- 5%, 25%, even 95% -- and it takes minimal effort to dream up a series of missteps that could get us there. It ought to be worrisome that a Dow 13,000 tomorrow is impossible, but a Dow 1,300 tomorrow is one late-night vote away. A single senator or representative couldn't hope to generate a 1% rise in stock values, but could easily aspire to a 10% loss. In brief:
The healthiest political ideology for the market and the country is simple: a political platform without a single plank.
[1] The only other one would be a huge, paradigm-altering change in technology, but the whole point of paradigms is that they're beliefs held so strongly that people act on them -- and it's hard to imagine a large number of people spontaneously changing a belief that's central to their lives. Government edicts, on the other hand, change minds pretty fast because they can't be opted out of.