How fragile is the global economy? The U.S.-China trade war is weakening businesses in both countries, Germany’s economy shrank in the second quarter, and Britain appears headed for a disruptive exit from the European Union this fall.

Those trends have hammered American manufacturers and caused global financial markets to plunge on fears that the world’s largest economy could slip into a recession.

Yet most analysts expect the U.S. economy to power through the rough patch, at least in the coming months, on the strength of solid consumer spending and a resilient job market.

The U.S. stock market plummeted earlier this week when the bond market, spooked by the global turmoil, sent a possible early warning sign of a recession ahead: The yield on the benchmark 10-year Treasury note slipped briefly below 2-year Treasury yields.

That is an unusual shift that indicates investors expect the U.S. economy to expand much more slowly in the coming months. The shift has preceded at least the last five U.S. recessions, though as much as two years can pass before a recession actually hits.

Still, most economists were buoyed by a robust retail sales report Thursday that suggested that American consumers aren’t fretting about bond yields. Sales at U.S. stores and restaurants jumped in July by the most in four months. Online sales soared to their best showing since January. Spending at restaurants is a sign of confidence, given that most people eat out when they feel they have money to spare.

“With the rest of the world sliding into the abyss, the July retail sales figures show a resurgent U.S. consumer riding to the rescue,” said Michael Pearce, senior U.S. economist at Capital Economics, a consulting firm.

If anything, it’s the Trump administration’s trade war that has been harming the world economy. President Donald Trump has imposed 25% tariffs on $250 billion of imports from China, along with duties on most steel and aluminum imports. He has also threatened to hit the remaining $300 billion worth of Chinese imports with 10% tariffs, though he has delayed that increase on about half of those items to avoid raising prices for U.S. holiday shoppers.

Still, the tariffs — and Beijing’s retaliatory duties on $110 billion of U.S. goods — have dragged down China’s growth to its slowest pace in 26 years. That slowdown in the world’s second-largest economy has, in turn, pummeled Germany’s economy, because Germans export industrial equipment to China. Germany’s economy actually shrank in the second quarter.

Other global headwinds remain a threat. Simon MacAdam, global economist at Capital Economics, said the chances of a “no-deal” Brexit have risen sharply since Boris Johnson replaced Theresa May as British prime minister last month. Johnson “is dead keen on leaving the EU” by Oct. 31, the deadline for any deal, MacAdam noted.

An abrupt exit would most likely lower the British pound, raising inflation and cutting into British consumer spending. Supply chains for British manufacturers and retailers would also probably be disrupted as the country reinstates its customs procedures.

One of the U.S. economy’s biggest weak spots is manufacturing, which is suffering from the trade war and global growth strains. Factory output has sunk over the past 12 months. Manufacturing job growth has tapered off during the past year. Surveys of manufacturers indicate that the uncertainty from tariffs is hurting their businesses.

American manufacturers appear to be either in a recession or on the verge of a downturn, said Joe Brusuelas, chief economist for the consultancy RSM. The best possible boost for U.S. factories would be if Trump pulled back on trade hostilities with China and achieved a trade deal, Brusuelas said.

“Right now, the recession risks are more policy-driven, and if policy does not change or the trade and finance war with China escalates, then the manufacturing recession will become a broader and deeper contraction that threatens to spill over into other areas of the economy,” he said.

In fact, many economists say they’re nervous that the government has fewer options to juice the economy than it has in the past. The short-term interest rate that the Fed controls is barely above 2%, giving it far less room to stimulate growth in the event of a downturn. Before the Great Recession in 2007, the Fed’s rate was more than twice that level.

And the widening budget deficit, on track to hit $1 trillion by 2022, also leaves the government with little room to maneuver.

“It is very uncharacteristic — very unusual — to be running larger budget deficits every year,” said Tim Quinlan, an economist at Wells Fargo. “The federal government is not in a very strong position to offer a fiscal response in the event that it’s needed.”

Consumers could also pull back on spending later this year if hiring slows and wage gains slow. Employers have already reduced, on average, the number of hours worked for employees in the second quarter, which cuts into paychecks.

And if Trump imposes tariffs on all $300 billion of Chinese goods by mid-December, as he says he plans to do, American consumers will pay more for such things as laptops, cellphones, video game consoles and clothing.

At the same time, many economists say they think consumers can withstand the headwinds. Household debt, as a percentage of income, is much lower than it was before the Great Recession. And lower interest rates make it easier to pay off debts.

That’s likely to sustain U.S. growth, though at a slower pace.

“Consumers’ financial health has improved, and even in the case of an employment and income shock, they’re going to remain resilient enough to withstand the shock,” said Alexander Lin, U.S. economist at Bank of America Merrill Lynch.

© The Associated Press. All rights reserved.