Passersby wearing protective face masks walk in front of an electronic board showing Japan's Nikkei share average, amid the coronavirus disease (COVID-19) pandemic, in Tokyo, Japan July 14, 2022.
Passersby wearing protective face masks walk in front of an electronic board showing Japan's Nikkei share average, amid the coronavirus disease (COVID-19) pandemic, in Tokyo, Japan July 14, 2022. Reuters / ISSEI KATO

U.S. stocks rose sharply and Treasury yields touched two-week highs on Wednesday as robust economic data, easing geopolitical concerns and generally upbeat corporate earnings boosted investor risk appetite.

All three major U.S. stock indexes were higher and benchmark 10-year Treasury yields gained ground.

Economic data showed an unexpected acceleration of services activity and a robust increase in factory orders, suggesting that the economy was healthy enough to withstand the hawkish monetary policy from the U.S. Federal Reserve.

"While we haven't seen a definitive rollover in inflation, (the Fed) can afford to be a little hawkish," said Joseph Sroka, chief investment officer at NovaPoint in Atlanta. "The Fed's been able to be aggressive because the economy is handling it well."

St. Louis Fed President James Bullard underscored that hawkishness by re-iterating the central bank's intention to "be tough" on inflation until it cools down to the Fed's average annual 2% target.

Friction between China and the United States cooled down following U.S. House of Representatives Speaker Nancy Pelosi's visit to Taiwan, which provoked ire from Beijing.

The Dow Jones Industrial Average rose 451.64 points, or 1.39%, to 32,847.81, the S&P 500 gained 69.61 points, or 1.70%, to 4,160.8 and the Nasdaq Composite added 331.91 points, or 2.69%, to 12,680.67.

European closed higher, reclaiming losses it suffered in recent sessions as a series of upbeat earnings helped investors look past disappointing euro zone economic data.

The pan-European STOXX 600 index rose 0.51% and MSCI's gauge of stocks across the globe gained 1.07%.

Emerging market stocks rose 0.25%. MSCI's broadest index of Asia-Pacific shares outside Japan closed 0.26% higher, while Japan's Nikkei rose 0.53%.

U.S. Treasury yields scaled two-week peaks powered by stronger-than-expected data, which supported recent remarks from Fed officials.

"The hawkish comments out of the Fed, sticking to their intention to raise rates is moving yields back up," Sroka added. "The Fed is holding firm on policy that they've articulated."

Benchmark 10-year notes last fell 6/32 in price to yield 2.761%, from 2.741% late on Tuesday.

The 30-year bond last fell 5/32 in price to yield 2.9911%, from 2.984% late on Tuesday.

A drop in oil prices dropped accelerated after a report from the Energy Information Administration showed an unexpected surge in U.S. crude and gasoline stocks, which followed the OPEC+ group of crude producers' announcement that it would increase its production by a mere 100,000 barrels per day.

U.S. crude fell 3.98% to settle at $90.66 per barrel, while Brent settled at $96.78 per barrel, down 3.74% on the day.

The dollar wavered, but was last higher against a basket of world currencies, building on Tuesday's gains after economic indicators surprised to the upside, which supported the greenback in the wake of recent Fed comments.

The dollar index rose 0.21%, with the euro down 0.09% to $1.0155.

The Japanese yen weakened 0.71% versus the greenback at 134.12 per dollar, while Sterling was last trading at $1.2151, down 0.17% on the day.

Gold was last higher but the safe-haven metal's gains held in check by rising Treasury yields.

Spot gold added 0.2% to $1,763.10 an ounce.