The fortunes of the US have taken a turn for the better. Moody’s Investors Service last week upgraded its outlook on US debt from negative to stable, after a similar move last month from Standard & Poor’s (S&P).

Moody’s changed the outlook on its triple A credit rating to negative in August 2011. At the time S&P went further. It sent shock waves through global markets by cutting the US triple A status to AA+ because of the inability of US politicians to agree on how to deal with the government’s burgeoning debt.

At that point, it seemed as if the US economy would slide over a “fiscal cliff” at the end of last year because no solution to the mounting debt burden was in sight. The loss of confidence in the world’s largest economy destabilised financial markets and – along with the concern over euro zone sovereign debt risks – aborted the global recovery.

But the US is now back in Moody’s good books. The agency conceded the US debt trajectory “is on track to meet the criteria laid out in August 2011 for a return to a stable outlook. The US budget deficits have been declining and are expected to continue to decline over the next few years.”

Moody’s noted the US economy, “has demonstrated a degree of resilience to major reductions in the growth of government spending. Therefore, the government’s debt-to-gross domestic product ratio through 2018 will demonstrate a more pronounced decline than Moody’s had anticipated when it assigned the negative outlook.”

S&P identified tentative improvements on two fronts. “On the political side, Republicans and Democrats did reach a deal to smooth the year-end 2012 ‘fiscal cliff’, and this deal did result in some fiscal tightening, by allowing previous tax cuts to expire on high-income earners. Furthermore, we see the US economy as highly diversified and market oriented, with an adaptable and resilient economic structure, all of which contribute to strong sovereign credit quality.”

Data continue to be mostly upbeat. Barclays commented last week that US initial jobless claims had “dropped to 334 000, close to the five-year low of 327 000, and we expect another month of solid US payroll gains in July”.

IHS chief economist Nariman Behravesh said: “The balance of forces affecting US consumer spending has turned positive – employment, income, credit availability, wealth. The housing market is – finally – recovering, and can be expected to keep improving over the next year.”

While the US economy gains ground, growth momentum in China is slowing – to 7.5 percent in the second quarter from earlier growth rates of more than 8 percent.

Towards the end of last year the Organisation for Economic Co-operation and Development predicted a dramatic shift in the balance of economic power from the US to China, predicting China could overtake the US by 2016. The date may have to be pushed out after the recent data.

Among the most pessimistic commentators is Nobel Prize winning economist Paul Krugman.

Writing in the New York Times he said: “The signs are now unmistakable: China is in big trouble. We’re not talking about some minor setback along the way, but something more fundamental.

“The country’s whole way of doing business, the economic system that has driven three decades of incredible growth, has reached its limits. You could say that the Chinese model is about to hit its Great Wall, and the only question now is just how bad the crash will be.”

Let us hope Krugman is very wrong!