NEW YORK: The Nasdaq ended lower while the Dow and S&P 500 were nearly flat on Tuesday as Treasury yields rose and shares of chipmakers fell after the Biden administration said it planned to halt shipments of advanced artificial intelligence chips to China.

The Philadelphia SE Semiconductor index was down 0.8%and shares of Nvidia fell 4.7%, even though the world's most valuable chipmaker said it does not expect a near-term meaningful impact on financial results from the curbs.

U.S. Treasury yields jumped on robust economic data. Higher yields dull the allure of stocks by offering investors comparatively high income on risk-free government bonds.

Helping to limit the declines, though, were upbeat earnings reports from companies including Bank of America, whose stock gained 2.3% following the bank's quarterly results. The financial sector was up 0.6% and was among the biggest positives on the S&P 500.

"We had some pretty good earnings from most of the major companies reporting today... but the indices are running up a brick wall as yields go higher," said Peter Cardillo, chief market economist at Spartan Capital Securities in New York.

The Dow Jones Industrial Average rose 13.11 points, or 0.04%, to 33,997.65, the S&P 500 lost 0.43 points, or 0.01%, to 4,373.2 and the Nasdaq Composite dropped 34.24 points, or 0.25%, to 13,533.75.

Data earlier showed U.S. retail sales increased more than expected in September as households stepped up purchases of motor vehicles and spent more at restaurants and bars. A separate reading showed production at U.S. factories increased more than expected in September.

"Good news could be bad news for the stock market because it implies that the (Federal Reserve) is going to leave interest rates higher for longer, and maybe it pushes out some of the expectations for rate cuts in 2024," said Anthony Saglimbene, chief market strategist at Ameriprise Financial in Troy, Michigan.

The Fed has raised its benchmark overnight interest rate by 525 basis points since March 2022 in an effort to cool inflation.

Investors also are still anxiously watching news on the Middle East. About 500 Palestinians were killed in a blast at a Gaza hospital amid conflicting claims, while U.S. President Joe Biden is set to visit Israel Wednesday to show support for the country in its war with Hamas, which rules the Gaza Strip.

In other earnings news, shares of Lockheed Martin ended up 0.2% after the U.S. defense contractor reported better-than-expected third-quarter revenue and profit.

Goldman Sachs's third-quarter profit dropped less than expected, though its shares fell 1.6%.

The third-quarter U.S. earnings season is just getting under way. Analysts expect a 2.2% year-over-year increase in overall S&P 500 company earnings for the quarter, according to LSEG data Friday.

Volume on U.S. exchanges was 10.25 billion shares, compared with the 10.41 billion average for the full session over the last 20 trading days.

Advancing issues outnumbered declining ones on the NYSE by a 1.34-to-1 ratio; on the Nasdaq, a 1.35-to-1 ratio favored advancers.

The S&P 500 posted 17 new 52-week highs and six new lows; the Nasdaq Composite recorded 48 new highs and 151 new lows. (Reporting by Caroline Valetkevitch; additional reporting by Ankika Biswas and Shashwat Chauhan in Bengaluru and by Sinead Carew in New York; Editing by Vinay Dwivedi and Deepa Babington)