The Dow Jones industrial average and S&P 500 index both ended the day in negative territory on Tuesday following losses in energy shares and Boeing, offsetting a small gain in technology stocks and renewed hopes for progress in trade talks. Meanwhile,

The Nasdaq ended the session essentially flat as a rebound in tech kept the index out of negative territory.

Energy shares weighed heaviest on the S&P 500, driven lower by a 7.1 percent decline in crude prices, their largest percentage drop in 2-1/2 years. The energy sector was down 2.4 percent.

Boeing reported a 37 percent increase in 737 deliveries in October, but shares fell on concerns related to last month’s deadly crash of a 737 operated by Indonesia’s Lion Air. The stock ended the session down 2.1 percent, providing the largest drag on the Dow.

U.S.-China trade tensions enjoyed a reprieve as negotiations between the world’s two largest economies appeared to be making headway, with a U.S. adviser saying the countries’ two leaders would meet at the G20 meeting later this month.

The S&P 500 chalked up its lowest close since Oct. 31.

General Electric was up 7.8 percent after unveiling plans to raise $4 billion by accelerating a sale of its stake in oilfield services provider Baker Hughes.

Beazer Homes rose 30.6 percent after its quarterly revenue exceeded estimates and the company announced a $50 million buyback plan.

Home Depot posted better-than-expected same-store sales but suggested that home sales were slowing down and impending tariffs could lead to price hikes for its products..

Amazon closed down 0.3 percent following the online retailer’s announcement that it had selected New York City and Northern Virginia for its two new headquarters.

Shares of Tyson Foods fell 5.6 percent, among the largest percentage losers on the S&P 500, after sales missed Street estimates due to lower demand for chicken.

As third-quarter earnings season approaches the final stretch, with 91 percent of S&P 500 companies having reported, 77.5 percent have beaten estimates, according to Refinitiv data.

Volume on U.S. exchanges was about 8.2 billion shares, slightly below the 8.4 billion average over the past 20 sessions.