NEW YORK, Oct 17 (Reuters) -

U.S. stocks wavered and benchmark Treasury yields surged on Tuesday as robust economic data and strong third-quarter earnings appeared to make the case for the Federal Reserve to keep restrictive policies in place for longer than expected.

All three major U.S. stock indexes were last modestly lower, with interest rate sensitive megacap shares weighing the heaviest.

Semiconductor shares came under pressure after the Biden administration announced plans to halt shipments to China of more advanced artificial intelligence chips.

The Philadelphia SE Semiconductor index was last down 0.9%.

Consensus-topping retail sales data along with solid profit beats from Bank of America and Goldman Sachs added to a growing mountain of evidence that the United States economy is chugging along despite the central bank's attempts to rein in inflation by raising interest rates.

"The retail sales report was quite strong, and definitely an indication that the consumer is doing well," said Thomas Martin, senior portfolio manager at GLOBALT in Atlanta. "So the question is, how does the market react to that? Is good news good news or is good news bad news?"

"You're seeing a little bit of confusion there because while it probably shouldn't affect the Fed's calculus, you never know," Martin added.

Market participants were also eyeing the unfolding humanitarian crisis arising from the Israel-Hamas conflict as U.S. President Joe Biden heads to the region.

The Dow Jones Industrial Average fell 71.75 points, or 0.21%, to 33,912.79, the S&P 500 lost 9.29 points, or 0.21%, to 4,364.34 and the Nasdaq Composite dropped 48.86 points, or 0.36%, to 13,519.13.

European stocks dipped as a spate of downbeat earnings and higher government bond yields offset rising energy shares and waning concerns over Middle East turmoil.

The pan-European STOXX 600 index lost 0.10% and MSCI's gauge of stocks across the globe gained 0.02%.

Emerging market stocks rose 0.44%. MSCI's broadest index of Asia-Pacific shares outside Japan closed 0.52% higher, while Japan's Nikkei rose 1.20%.

Benchmark Treasury yields spiked after the strong retail sales data led market participants to adjust their expectations regarding the duration of the central bank's tightening cycle.

Benchmark 10-year notes last fell 34/32 in price to yield 4.851%, from 4.71% late on Monday.

The 30-year bond last fell 42/32 in price to yield 4.9579%, from 4.866% late on Monday.

The greenback oscillated but was last essentially flat against a basket of world currencies amid the unfolding Middle East drama and as market participants braced themselves for speeches by central bank officials.

The dollar index rose 0.02%, with the euro up 0.09% to $1.0568.

The Japanese yen weakened 0.19% versus the U.S. dollar at 149.80 per dollar, while sterling was last trading at $1.2176, down 0.33% on the day.

Crude prices moved sideways as traders waited for Biden's impending visit to Israel to see if diplomatic efforts will prevent the conflict Middle East from widening.

U.S. crude settled unchanged at $86.66 per barrel while Brent settled at $89.90, up 0.28% on the day.

Gold prices steadied as the safe-haven metal benefited from mounting geopolitical uncertainties.

Spot gold added 0.1% to $1,920.39 an ounce.

(Reporting by Stephen Culp; additional reporting by Selena Li in Hong Kong and Alun John in London; Editing by Sharon Singleton and Cynthia Osterman)