NEW YORK (Reuters) - The S&P 500 edged lower to snap a four-session win streak on Tuesday and it retreated from a record high as investors grappled with a flood of earnings and the latest update on a potential trade deal between the U.S. and China.

Hopes of a U.S.-China trade deal and expectations of another interest rate cut by the Federal Reserve when it concludes its two-day meeting on Wednesday have pushed stocks higher the past several sessions, sending the S&P to its second straight record intraday high.

But indexes pulled back after a U.S. administration official told Reuters that Washington and Beijing are continuing to work on an interim trade agreement, but it may not be completed in time for the leaders of the two countries to sign in Chile next month.

“It is actually impressive that we have held these gains, even if we are down slightly, it is a pretty impressive day considering what is going on, that there hasn’t been this hard sell-off pressure,” said JJ Kinahan, chief market strategist at TD Ameritrade in Chicago.

“The encouraging thing is we are trading more on what you should be trading on, that being earnings, and less on rumor and innuendo, which is a nice change of pace and how the market should work.”

Tech .SPLRCT shares, which have been closely tied to trade progress, lost ground after the report and were last down 0.92%.

Drugmakers Merck & Co Inc MRK.N and Pfizer Inc PFE.N both gained after reporting upbeat third-quarter results to help keep the Dow and S&P near the flat line. The healthcare sector .SPXHC, which has been the second-worst performer among the 11 major S&P 500 sectors this year, rose 1.16% as the best performer on the session as Merck gained 3.5% and Pfizer advanced 2.5%.

FILE PHOTO: Traders work on the floor at the New York Stock Exchange (NYSE) in New York, U.S., October 22, 2019. REUTERS/Brendan McDermid

But shares of Google parent Alphabet Inc GOOGL.O, however, lost 2.20% and weighed on the Nasdaq as its quarterly profit missed estimates due to higher costs.

Third-quarter earnings of S&P 500 companies have largely been better than expected, with over 77% of the 236 firms to report so far surpassing profit expectations, according to Refinitiv data. Still, earnings are expected to decline by 1.9% for the quarter.

Other big names reporting this week include tech and internet heavyweights Apple Inc AAPL.O and Facebook Inc FB.O, as well as oil majors Exxon Mobil Corp XOM.N and Chevron Corp CVX.N.

The focus now shifts to the Fed meeting, where the central bank is widely expected to deliver a quarter-percentage-point interest rate cut for the third time this year.

The Dow Jones Industrial Average .DJI fell 20.04 points, or 0.07%, to 27,070.68, the S&P 500 .SPX lost 2.54 points, or 0.08%, to 3,036.88 and the Nasdaq Composite .IXIC dropped 49.14 points, or 0.59%, to 8,276.85.

The S&P earlier in the session reached a high of 3,047.87, its second straight intraday record.

General Motors Co GM.N gained 4.28% after its quarterly net profit topped estimates, but the carmaker slashed its earnings forecast for 2019 as the 40-day U.S. labor strike by the United Auto Workers union brought virtually all of its North American operations to a standstill.

Beyond Meat Inc BYND.O tumbled 22.22% as the vegan burger maker said it would need to offer more store discounts amid rising competition.

Shares of GrubHub Inc GRUB.N plunged 43.30% after the online food delivery company warned of slowing growth as customers opted to choose from a growing pool of rival providers.

Advancing issues outnumbered declining ones on the NYSE by a 1.08-to-1 ratio; on Nasdaq, a 1.03-to-1 ratio favored decliners.

The S&P 500 posted 40 new 52-week highs and no new lows; the Nasdaq Composite recorded 95 new highs and 69 new lows.