TOKYO (AP) — Asian shares rose Tuesday, cheered by a rally on Wally Street reflecting some optimism over stronger than expected economic data, despite widening coronavirus outbreaks.

Japan's benchmark Nikkei 225 gained 1.8% in morning trading to 22,380.02. South Korea's Kospi gained 1.5% to 2,123.85, while Australia's S&P/ASX 200 rose 1.4% to 5,895.80. Hong Kong's Hang Seng edged up 0.9% to 24,520.01. The Shanghai Composite was trading at 2,974.94, up nearly 0.5%.

Analysts say questions remain on how the global economy will hold up as coronavirus outbreaks expand. Japan’s economy has been gradually reopening with social distancing restrictions.

“These will be important questions to answer as equity markets hang in a delicate balance at present,” Jingyi Pan, market strategist at IG, said in a commentary.

A survey of China factory managers released Tuesday was better than expected, suggesting the global economy may be on the upswing after bottoming out at the height of shutdowns in April-May, analysts said.

Increases in production and new orders, especially export orders, points to a rebound in foreign demand, though it remains much weaker than overall new orders, said Martin Rasmussen, an economist at Capital Economics.

The manufacturing purchasing managers index for June was 50.9, higher than forecast, on a scale where 50 marks the cutoff between expansion and contraction. The non-manufacturing was 54.4, compared with an expected 53.6.

On Wall Street, the market rallied after a much healthier-than-expected report on the housing market put investors in a buying mood. Technology, industrial and communications stocks accounted for much of the market's broad gains. European stocks also closed higher. Treasury yields were mixed and oil prices rose.

The pickup in U.S. stocks after a weekly loss marks the latest choppy move for markets around the world, which have been swinging back and forth in recent weeks as investors balance hope for a relatively quick economic rebound as more businesses reopen against worry as an increase in confirmed new coronavirus cases forces some businesses to close their doors again.

“It’s just another day of normal volatility, its unfortunately what we’re living with now,” said Mark Litzerman, head of global portfolio management at Wells Fargo Investment Institute. “It tends to be this tug of war between better economic data coming through versus a rise in cases."

The S&P 500 gained 1.5% to 3,053.24. The Dow Jones Industrial Average rose 2.3% to 25,595.80 and the Nasdaq composite added 1.2%, to 9,874.15.

Stocks of smaller companies also jumped more than the rest of the market, which often happens when investors are feeling more optimistic about the economy. The Russell 2000 index of small-cap stocks picked up 3.1%, to 1,421.21. The index made up for all of its loss from last week.

A rise in infections of the new coronavirus, including in the U.S. South and West, has dented the optimism that earlier sent the S&P 500 streaking nearly all the way back to the record it reached in February.

The worry is that the worsening levels could choke off the budding improvements the economy has shown recently as states and other governments ease up on lockdown orders, even with the Federal Reserve and other central banks pumping unprecedented amounts of aid into the economy.

Florida and Texas put new restrictions on bars to slow the spread of the virus, for example, which helped drive the S&P 500 to a loss of 2.9% last week. Other government around the world are likewise backtracking on efforts to reopen their economies following widespread lockdowns that sent the global economy into a sudden, severe recession.

Monday's report on the housing market showed the number of Americans signing contracts to buy homes rose a record 44.3% in May from a month earlier. That was more than double the 17% rise that economists were expecting and a whiplash reversal from the record-breaking plunge of nearly 22% that came in April as the pandemic froze the market.

The encouraging housing report is likely a sign of pent up demand, considering that spring is the key season for home sales and it was delayed mostly until summer, Litzerman said.

“It is good to see that people are out there buying again,” he said. “The biggest thing is how quickly the consumer comes back and how do they come back.”

The yield on the 10-year Treasury held steady at 0.63%.

Benchmark U.S. crude oil fell 26 cents to $39.44. It rose $1.21 to $39.70 a barrel on Monday. Brent crude oil for August delivery slipped 25 cents to $41.46 a barrel.

The dollar rose to 107.74 Japanese yen from 107.57 yen. The euro cost $1.1248, up from $1.1238.

———

AP Business Writers Stan Choe, Alex Veiga and Damian J. Troise contributed.

Copyright 2020 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.