The drumbeat of bad news is ending, and investors are now willing to cling to any hint of better news. But how long can that boost the market?

Right now the market reminds me of a set of Russian matryoshka dolls. You know, the ones that traditionally begin with a peasant woman, and then reveal smaller and smaller carved dolls nested inside one another, until the last doll is (traditionally) a baby.

This stock market, in my opinion, shows a short-term July rally inside a summer slump, inside an emerging markets rally, inside a liquidity-fueled boom, inside a liquidity-fueled bust.

That’s why, when anyone asks me, “What do you think of the stock market?” my first question is, “Over what period?”

Let me start with the innermost doll and work outward.

The Short-Term Rally
Welcome to the (relatively short-lived) summer rally. From 1950 through 2010, according to the Stock Trader’s Almanac, July has been the sixth-best month for stocks, as measured by the S&P 500 stock index. June, in contrast, has been the third-worst month.

This year the market tanked to a very oversold condition in June, setting up a July rally. Investors had been waiting—as stocks got cheaper and cheaper—for a break in the consistently negative news flow of May and June.

Well, we’re sure getting that break now:

  • Greece and the European Union look like they’ll succeed in their efforts to kick the Greek and euro debt crises down the road.
  • The European Central Bank has just about guaranteed that it will raise interest rates on July 7—producing a euro rally against the dollar that will do wonders for commodity prices (see my post on this).
  • China’s Premier Wen Jiabao has declared victory against inflation (another recent topic of mine).

It’s important to remember that, in the short run, it doesn’t matter if this news is actually real. All that counts is that investors convince themselves that it is.

And if you can judge from the technical charts—and I think you can—they believe. Yes, they do.

NEXT: Technicals Are Bullish

|pagebreak|

Technicals Are Bullish
In the past few days, US stock indexes have rallied from support at their 200-day moving average, offering evidence that last week marked a short-term bottom, and that the indexes are ready to move back to resistance at their April highs. This is true for the Dow Industrials, the S&P 500, and the Nasdaq Composite.

Sectors, such as energy and materials, that had led the sell-off in May and June are bouncing off their 200-day moving averages, too, in anticipation of a weaker dollar.

Overseas markets show the same pattern. The iShares MSCI EAFE Index (EFA) has recovered to its 200-day moving average. (This index is weighted 66% to European stocks and 20% to Japanese stocks, so it should rally strongly with an appreciating euro.)

The iShares MSCI Emerging Markets Index (EEM) has bounced so strongly off the 200-day moving average that it is now threatening to move above its 50-day moving average.

Expect Short And Sweet
Don’t get too excited by this July rally. We had one last year too, and it pooped out in August.

From a low of 1,023 on July 2, 2010, the S&P 500 climbed to a peak of 1,127 on August 4. A 10% gain in a month sure ain’t bad. But then the market decided to give most of that back, with the S&P 500 falling to a low of 1,047—a drop of 7.1% from its August 4 high.

That’s typical for a summer rally—short and sweet. If June is the third-worst month from 1950 to 2010, August isn’t much better. It’s the fourth-worst.

And I think there’s good reason to believe that August could be disappointing again.

Much of a July rally would be based on cheap valuations. Not just in the United States, where the S&P 500 was trading at less than 13 times projected 2011 earnings before this week, but also in emerging markets such as Brazil. At the June bottom, Brazil’s Bovespa index traded at just 9.9 times projected 2011 earnings.

That makes the July rally kind of self-limiting, because every increase in stock prices means that stocks are just a little less cheap. And with the US economy sputtering along in a weak recovery, it wouldn’t take much in the way of a return of risk to end the summer rally.

The most likely rally killer is the battle in Washington over raising the US debt ceiling.

It’s very much a no-win situation. If Congress doesn’t raise the debt ceiling, the US faces at least a temporary technical default in August. That wouldn’t be good for the dollar, US interest rates, or the US economy.

If Congress strikes a deal that follows recent patterns, Democrats will cave to Republican demands for short-term budget cuts. What we need is long-term serious debt reduction (no deal is likely to include that), so financial markets will be disappointed.

Economists will rightly point out that cutting spending in the short term when the recovery is so weak will endanger the economy. That will increase worries about growth.

Back to the late-summer slump. Which, if 2011 is like most years, will continue into September, historically the worst month for stocks.

NEXT: Next Up: Emerging Markets

|pagebreak|

Next Up: Emerging Markets
But now let’s move out a level, to a slightly larger doll—or a slightly longer time horizon.

If you look past summer, I think you can see the shape of a stock-market rally like the one that began 2011 and reached a peak in April. Only this one will be fueled by emerging and European markets. The US market, which led the rally in the first half of the year, is likely to lag.

It all comes down to interest rates—or at least it mostly comes down to interest rates.

By the second half of the year, global financial markets will be anticipating the end of a cycle of interest-rate increases in most of the world’s emerging markets. (India is a possible exception.)

Remove the downward pressure of rising interest rates, and the threat of slowing economic growth and these markets—remember they’re historically cheap, after falling from November 2010 highs—are ready for a sustained bounce.

The most recent solution to the most recent Greek crisis will have removed some worries about risk. Nobody really believes that a second rescue package for Greece will be any more effective at solving the long-term problems of the euro than the first was. But the effort will allow investors to forget their fears that the euro is headed for a meltdown.

Besides, an interest-rate hike or two from the European Central Bank will have pushed euro benchmark rates up near 2% by the end of the year, making the common currency very attractive.

The United States, meanwhile, is likely to experience the worst of two worlds:

  • The Federal Reserve will remain sidelined by fears of slow growth in the US economy. That will weaken the dollar against the euro (and help push global commodity prices higher).
  • But the Federal Reserve directly controls only short-term interest rates. Long-term rates will edge higher, as overseas investors demand higher yields in order to offset a sinking dollar.

Higher interest rates will, in turn, slow the US economy even more, making sure that the Fed stays on the sidelines even longer and that overseas investors have to be bribed with even higher yields to buy US Treasuries.

US Stocks Under Pressure
That takes me to the next doll, or 2012. I expect this to be a wild year, as politicians from Washington to Moscow to Beijing vie to buy popular approval (if not actual votes).

We’ve got a presidential election in Russia—think Vladimir Putin won’t do everything he can to make sure that voters are happy? We’ve got a leadership transition in China—think Xi Jinping and the other new leaders jockeying for power as Wen steps down won’t do everything they can to make sure that China’s economy doesn’t falter?

And we’ve got a presidential election in the United States. This is a huge wild card.

Yes, the incumbent will do everything he can to make sure unemployment falls and growth speeds up, although it’s not exactly clear what President Barack Obama will be able to do with Republicans in control of the House of Representatives.

Republicans have a vested interest in seeing the economy continue to struggle. At the least, they’ll be tempted to block anything that might give the president an economic success to talk about in his campaign.

I think what this adds up to for 2012 is another round of easy money and loose credit. Economies that haven’t completely cooled down from the fast growth induced by the stimulus that followed the global economic crisis will get new gasoline poured on the embers.

A stumbling US economy might be enough to keep some pressure on the brakes, but I’m not counting on it. I think we’re in for another liquidity boomlet in 2012.

NEXT: Trouble in 2013

|pagebreak|

Trouble in 2013
Which brings me to the last doll, the babushka—also known as 2013.

Booms (and even boomlets) don’t end well. We should know that by now. Especially when the bills for so many problems come due all at once:

  • The Greek rescue package is designed to get Greece to 2013 or 2014.
  • The US presidential election will be over—and all the budget-deficit problems that no one dealt with in 2011 or 2012 will be that much tougher to fix…but that much more necessary to fix, too.
  • China’s leaders will be again fighting the inflation that they claimed to have vanquished in 2011.

What really worries me is that governments and central banks, having spent much of their ammunition on the global financial crisis in 2008 and 2009—and not having produced the economic growth necessary to reload their weapons—will have much, much less to throw at any crisis that emerges in 2013.

This all seems neat and orderly now. It won’t be, of course. We’ll have plenty of scares along the way—food riots strike me as a real possibility, given that historically low levels of global grain reserves and global weather patterns are likely to get even worse because of climate change.

We could even get a shocking dose of good news from a technology breakthrough—my pick is an innovation that sends the cost of producing solar energy plunging. Or an outbreak of political courage and creative thought about addressing global problems of an aging population and lagging job growth (yeah, who am I kidding?).

The one thing that is easiest to imagine upsetting all these nesting dolls—so much so that they all roll downhill as fast as they can—is a US budget crisis.

That could come in the form of a credit-rating downgrade. Or a political miscalculation (or two or three) about how fragile the US economy is. Or another hit to house prices from rising interest rates. Or…

The number of ways that I can imagine to create a crisis in the United States is truly frightening. We have lots of easy ways to get ourselves into deep trouble.

Any babushka could tell you the same thing: Getting in trouble is easy, she’d scold. Staying out of trouble is harder, but still pretty easy.

Getting out of trouble once you’re in it, however, is really, really difficult.

Full disclosure: I don’t own shares of any of the companies mentioned in this column in my personal portfolio. The mutual fund I manage, Jubak Global Equity Fund (JUBAX), may or may not now own positions in any stock mentioned in this column. For a full list of the stocks in the fund as of the end of March, see the fund’s portfolio here.