(Reuters) - The S&P 500 and Nasdaq hit record highs on Wednesday after reassuring comments from Texas Instruments about global chip demand blunted the impact of weak earnings reports from Boeing and Caterpillar.

Texas Instruments Inc TXN.O jumped 7.4% after the company hinted that a global slowdown in microchip demand would not be as long as feared, powering the Philadelphia chip .SOX index up 3.1% to a record high.

“Semiconductor investors are looking past right now and saying that maybe in the second half of this year, economic concerns will start to abate a little,” said Willie Delwiche, an investment strategist at Robert W. Baird in Milwaukee.

However, trade-sensitive Caterpillar Inc CAT.N dropped 4.5% following disappointing earnings on weak sales in China and higher production and restructuring costs.

Boeing Co BA.N fell 3.1% after the world's largest planemaker posted its largest-ever quarterly loss on the back of this year's grounding of its best-selling 737 MAX after two deadly crashes.

Those two companies’ bleak reports left the Dow Jones Industrial Average in negative territory.

Two weeks into an earnings season with mute investor expectations, about 77% of the 138 S&P 500 companies that have reported so far have topped earnings estimates, according to Refinitiv data.

Traders work on the floor at the New York Stock Exchange (NYSE) in New York, U.S., July 24, 2019. REUTERS/Brendan McDermid

Overall earnings per share, however, are now expected to fall 0.1%, compared with a prior estimate of a rise of about 1%.

Wall Street has hit record levels in July on bets the Federal Reserve will lower rates next week to counter the impact of a protracted U.S.-China trade war on economic growth.

The Dow Jones Industrial Average .DJI dipped 0.29% to end at 27,269.97 points, while the S&P 500 .SPX gained 0.47% to 3,019.56.

The Nasdaq Composite .IXIC added 0.85% to 8,321.50. The S&P 500 and Nasdaq each closed at their highest levels ever.

The Russell 2000 small cap index .RUT jumped 1.64% to its highest close since early May. That suggests investors have grown more confident in the U.S. economy, Delwiche said.

For the year, the S&P 500 is now up 20%, while the Nasdaq has gained 25%.

In extended trade, Facebook FB.O jumped 4.3% after the social network posted quarterly revenue above analysts average estimates.

Another bright spot on Wednesday was United Parcel Service Inc UPS.N, up 8.7% and among the biggest gainers on the S&P 500 index, after the world's biggest package delivery company reported a better-than-expected quarterly profit.

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

The S&P 500 posted 35 new 52-week highs and no new lows; the Nasdaq Composite recorded 82 new highs and 94 new lows.

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