The S&P 500 slipped on Wednesday after ending the previous session with a record and the Nasdaq failed to hold all-time highs reached earlier in the day as earnings reports continue to become available for scrutiny.

Energy stocks were the largest drag on the S&P 500 index as oil prices fell. While the tech-heavy Nasdaq had help from eBay’s positive earnings and a rally in companies manufacturing computer chips, the day’s reports were a mixed bag.

The S&P 500 index, closing roughly 0.5 percent below its intraday record high hit in late September, has rallied about 17 percent year-to-date. It has been supported by a dovish Federal Reserve, along with optimism for a U.S.-China trade deal and a number of earnings surprises.

However, with mega companies, such as Microsoft and Facebook, reporting after the close, and with Amazon and Intel reporting earnings on Thursday afternoon, many kept to the sidelines.

In afterhours trading, Microsoft rose about 3 percent and Facebook shares gained nearly 5 percent.

Profits of S&P 500 companies are expected to decline 1.1 percent for the first quarter, still a large improvement from the 2.3 percent drop estimated at the start of April. And nearly 78 percent of the 129 companies that have reported so far have surpassed earnings estimates, according to Refinitiv data.

Nonetheless, only three of the S&P 500’s 11 major industry sectors ended the day in positive territory, and real estate led the gainers with a 0.8 percent rise. Energy was the biggest decliner with a 1.9 percent drop.

The technology sector lost its gains late in the session, ending the day down 0.01 percent, while the Philadelphia Semiconductor Index ended the trading day with a 0.95 percent gain, after reaching an all-time high during the session. Texas Instruments closed with a gain 1.8 percent.

Caterpillar fell 3 percent as rising costs hit margins in its construction equipment business and the company reported tepid sales in the Asia-Pacific region.

AT&T Inc was the worst drag on the S&P 500, declining 4 percent after reporting a quarterly revenue number below consensus estimates.

eBay rose 5 percent after the company raised its full-year sales and profit forecasts.

Anadarko Petroleum was up 11.6 percent, providing the largest lift to the S&P 500, after Occidental Petroleum sought to scuttle Chevron’s takeover of the company with a $57 billion bid.

Boeing ended the trading day up 0.38 percent, even after scrapping its 2019 outlook and reporting quarterly revenue below estimates due to grounding of its 737 MAX jets. Its shares have lost about 11 percent since the deadly Ethiopian crash in early March.

Approximately 6.57 billion shares changed hands on the major domestic equity exchanges, as compared to the 6.65 billion share average for the past 20 sessions.