Here’s the question that global stock markets are grappling with now: If global economies are slowing, stocks should get marked down in price. But by how much?

This morning’s economic data from Japan and the reaction of the Tokyo stock market suggests the August sell-off may have gone a bit too far.

The news certainly wasn’t good from Japan. Gross domestic product fell at a 1.3% annualized rate in the second quarter. That’s the third consecutive quarterly decline: Japan is most definitely back in recession.

But GDP fell more slowly than the 2.5% drop projected by economists, as spending on reconstruction efforts after the March earthquake and tsunami started to offset some of the damage from the event itself, and the slowing in exports caused by a stronger Japanese yen.

On the news, the Nikkei-225 stock index was up 1.4% as of the August 15 close in Tokyo.

It’s not like a 1.3% annualized drop in GDP has made anyone giddy. The consensus seems to be that a stronger yen will hurt Japanese exporters further in the third quarter, but that economic growth might creep back toward positive territory.

If you dig down a level, the data show the same picture of a bad economy that could have been worse. Capital investment rose by an anemic 0.2%, but that was still better than the 1.4% decline in the first quarter. Public investment increased by 3%, as government spending on rebuilding climbed.

The news from the corporate sector had much the same flavor. Toyota Motor (TM), for example, said that it would begin making up for production lost to the March earthquake and tsunami in September. That’s only a month earlier than forecast, but still qualifies as good news.

Toyota is still looking at a $3,900 hit to its profit on a $20,000 car, thanks to the yen’s gains against the dollar over the last year. Nonetheless, shares of Toyota were up 2.9% today in Tokyo.

Now we need to see if investors are indeed convinced that this sell-off took prices down too far even for a slowing global economy, and if this very modest recovery in stock prices holds. Japan looks like a good test case of investor sentiment.

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