Global trade and the economic stimulus policies of individual national economies will play an important role in the recovery from the current global recession. This is especially true of the world's two largest economies, the United States and China.

The US economy was running an annualized trade deficit of $697bn , or five per cent of GDP, when our recession began in the last quarter of 2007. By the first quarter of this year, it had fallen by more than half to $327bn, or 2.3% of GDP. Partly this is due to the arithmetic of going into a world recession with a large trade deficit. If imports and exports decline by the same proportion, then the trade deficit will shrink, because the imports are bigger in absolute size. It so happens that US imports have declined even faster than our exports in percentage terms too, partly due to falling oil prices – which are also a product of the world recession.

This means that the US economy is getting a boost from the global economy during the current global recession. It may not feel like that, as we in the US now hemorrhage jobs and have about one-sixth of the labour force officially unemployed or underemployed. But the national income accounting is real. If not for our shrinking trade surplus, for example, the first quarter of this year would have seen a fall of 7.9% of GDP, instead of 5.5% – a big difference in terms of output and employment.

Countries that export a lot (relative to their economy) and entered the recession with a surplus are affected by the opposite arithmetic: they get hit harder in the recession as their trade surplus shrinks. Japan's GDP is projected to fall by six per cent this year, much worse than the United States' projected 2.6%. Although it is no consolation for the Japanese, their shrinking trade surplus contributes to the growth of the rest of the world.

Countries that export significant amounts to the US have also been hit hard. Mexico, which exports more than 21% of its GDP to the US, is expected to shrink by 7% this year. Brazil, by comparison, exports less than two per cent of its GDP to the United States (and does not have a large trade share of GDP overall), is expected to decline by 1.3%.

This seems to offer a lesson for developing countries: it's good to diversify your trade, and maybe not become overly dependent on markets where there are enormous asset bubbles (such as our $8tn housing bubble) and large trade deficits. Mexico's "free trade" agreement with the United States also had the misfortune of not even producing decent economic growth before the crash.

But the most interesting case is China, which over the last three decades has had the fastest-growing economy in world history. The Chinese economy grew at 9% last year, and now looks likely to grow by 8% this year. Hans Timmer, director of economic forecasting at the World Bank, told the Wall Street Journal that "China will be among the first countries to lead the global economy out of this recession." He appears to be right.

Remarkably, this is despite the fact that China – which has had a lot of export-led growth for many years – is facing a rapidly-shrinking trade surplus. This shows how powerful an effective economic stimulus can be to counteract the fall-off in private demand.

China's stimulus is not just a matter of deficit spending, as economist John Ross has emphasized. China's government has other tools available, and is using them in a big way. The state controls most of the banking system, and has used this control to double the amount of bank lending in the first half of this year, as compared to 2008. It has greatly increased investment by state-owned enterprises, which are a large share of investment in the Chinese economy. The money supply has increased 28% over the past year. (There is no need to worry about domestic inflation, which has been negative for the last year.)

This has implications for the rest of the world that go beyond the significant positive effect that China, the world's second largest economy, will have on the global recovery. It is clear that more countries need to counter the fall-off in private spending with large-scale and effective stimulus programmes. This is true for developing countries as well as for rich countries. Of course, many developing countries do not have the institutional capacity to implement a stimulus as effectively as China has done. In many cases this is because neoliberal reforms over the past quarter of a century have weakened the capacity of the state to respond appropriately to the global downturn. China did not adopt reforms that would cause the government to lose control over key policy instruments. Nonetheless, most developing country governments can still use expansionary fiscal and monetary policies as much as possible to counteract the downturn. Unfortunately, the IMF, which supports such counter-cyclical policies in rich countries, has been promoting the opposite – including fiscal and monetary tightening – in some low-and-middle-income countries.

Rich countries also seem to be more hamstrung than China. The US has approved a stimulus package that for 2009 and 2010 – taking into account the spending cuts and tax increases by state and local governments – is only about 0.9% of its national income. This is a small fraction, perhaps not even a tenth, of the expected decline in private spending from the bursting of America's $8tn housing bubble.

Critics will point out that the Chinese government can move public investment projects much more quickly because it does not have to respond as much to environmental or other citizen concerns. But there are other stimulus policies in the US that can be implemented very quickly.

The sad truth is that in spite of our more developed system of governance, the rule of law, and a much more developed economy, the US government has not been all that responsive to the most urgent needs of our national economy in a time of its greatest challenge since the great depression. In fact it is less responsive than the government of a middle-income country run by a Communist party. That ought to give American pundits and social scientists something to think about.