Chinese President Xi Jinping may feel a bit smug when he hosts global leaders at next month’s Group of 20 summit.

The heralded hard landing of the world’s number two economy hasn’t materialized --instead many Western nations are facing economic and political upheaval. Surging nationalism, terrorism threats, social unrest and Europe’s biggest migration crisis since World War II are shaking governments around the world.

China meanwhile seems to have dodged a currency crisis and is busy bolstering its economy, growing the nation’s military muscle and securing influence abroad with hundreds of billions of dollars in infrastructure projects. With China’s markets calmed at home, the Communist Party’s message to critics is: our system works.

It’s a long way from the turbulent period between June 2015 and March this year when the economy seemed to be lurching and market chaos raised concern that policy makers had lost their grip, according to Arthur Kroeber, the Beijing-based founding partner and managing director at Gavekal Dragonomics, a research firm.

‘Pretty Confident’

"Today, China’s contribution to global macro risk seems pretty close to zero, and the main issues are populist anti-globalization backlash on the political front, and the impact of negative interest rates on the economic front," said Kroeber, author of the 2016 book “China’s economy: What Everyone Needs to Know”. "I’d guess that Xi Jinping is feeling pretty confident about things."

Even with growth at the lower end of the government’s projection and recent data signaling another soft patch, China’s economy is on track to overtake the whole of the euro zone.

But Xi’s I-told-you-so moment may prove fleeting. Behind China’s recovery is the old play book of cheap credit rather than painful but necessary reforms. Overall debt has risen to about 250 percent of the size of the economy, from 164 percent in 2008. And it’s still rising.

Meanwhile China’s assertions over territory in the South China Sea and East China Sea have aggrieved neighbors and heightened tension in the western Pacific. Developed nations like the U.K. and Australia are starting to be more wary of China’s infrastructure investment.

Domestic Risks

At home, political tensions are simmering ahead of a mid-term power transition next year. Lax law enforcement and persistent pollution is brewing discontent among the middle class. Migrant workers have seen the end of the boom days and officials at all levels are still reeling from Xi’s unprecedented anti-graft sweep. The government has tightened its grip on state and social media and cracked down on dissent.

There are even signs of division among the leadership over how to manage the nearly $11 trillion economy. An anonymous front page commentary on the People’s Daily in May, penned by an "authoritative person," warned of the "deadly" risks associated with debt, hinting at discomfort among top officials about where the economy was headed.

The result has been near-term stabilization at the cost of longer-term reforms, according to Eswar Prasad, a former chief of the International Monetary Fund’s China division and now a professor at Cornell University in Ithaca, New York.

Momentum Slipping

"Long-term growth prospects have hardly improved as risks continue to build up and reform momentum has slipped," he said.

China may feel that stability is more important. Only 44 percent of Americans rated the U.S. economy as "good" compared with 87 percent of Chinese who gave the thumbs up to their own economy, according to a survey released in August by the Pew Research Center.

Elsewhere, problems are mounting that may bleed into China’s economic outlook. Europe’s economy, still struggling to gain momentum eight years after the outbreak of the global financial crisis, is being buffeted from every direction.

The U.K. vote to exit the European Union sent shock waves through the continent’s beleaguered political systems and beyond, and undermined the central theme of integration that has defined the bloc for six decades.

Brexit Fallout

Brexit has sparked nationalist flames across the continent, fanned by a refugee crisis as hundreds of thousands flee war zones and poverty in the Middle East and Africa, and by terrorist attacks in Paris, Brussels and Nice that have been linked to Islamic State.

A man sits on his bunk bed inside a accommodation tent at the Idomeni refugee camp on the Greek Macedonia border on March 16.

Photographer: Matt Cardy/Getty Images

What German Finance Minister Wolfgang Schaeuble called a "rendezvous with globalization" has helped right-wing or nationalist movements to tap into public anxieties in France, Germany, Sweden and Hungary. In Italy and Spain, populist movements have taken up the banner against inequality and disenfranchisement, more squarely directed at the political elite.

Across the Atlantic, Brazil faces the twin challenge of political turmoil and the worst economic recession in over a century. A Wall Street darling only a few years ago at the height of the commodities boom, it plummeted to a junk-grade credit rating and into a tumultuous impeachment process.

U.S. Election

Russia is dipping into its sovereign wealth funds to cover the deepest budget gap since 2010 after foreign sanctions over the conflict in the Ukraine and a slump in oil prices drove the economy into a second year of recession. Turkey is reeling after a failed military coup in July sought to topple President Recep Tayyip Erdogan.

Then there’s the U.S., where the presidential election could prove one of the most consequential in decades. Republican nominee Donald Trump has threatened to rewrite America’s role in the world if he defeats Hilary Clinton, with profound consequences for global trade and security. Trump has flagged the risk of a trade war with China, which he dubbed "the greatest currency manipulator ever."

"It’s harder for the rest of the world to criticize China when they’ve got these problems,” said Kerry Brown, director of the Lau China Institute at King’s College, London, and a former U.K. diplomat in Beijing. That’s an opportunity for China to exploit: “It’s serendipitous for them that this is happening at this moment.”

Selfies, Wefies

Hangzhou International Exhibition Centre, venue for the upcoming 2016 Hangzhou G20 Summit to be held from September 4 - 5.

Photographer: VCG via Getty Images

Xi will take the chance to showcase the nation’s strengths in the summit’s host city, Hangzhou, the affluent home to Jack Ma’s Alibaba Group Holding Ltd. The global e-commerce giant is often touted as a symbol of China’s economic transition from smokestacks to services. Local factories will be closed to ensure blue skies for the summit.

A promotional cartoon aired on the BBC encourages visiting foreign officials to capture the moment: “Let’s make a memory! Take a selfie, take a wefie and come with me to the home of Alibaba,” the video says.

Xi will push an agenda at the G-20 talks that covers everything from boosting global growth to promoting clean energy. The objectives will include recognition for Xi’s geo-economic initiative "One Belt, One Road" while avoiding any criticism of its actions in the South China Sea. There will be a push to cut off financing for terrorists and to design a new safety net for the global financial system.

But when the selfie-snapping delegates have left, the reality of China’s challenges will remain.

"This is uneasy calm, somewhat artificial," said Dali Yang, a political science professor and director of the University of Chicago Center in Beijing. "It is certainly not a moment to be boastful."

To continue reading this article you must be a Bloomberg Professional Service Subscriber.