The S&P 500 eked out another record high on Tuesday and closing out its best four-month stretch in nearly nine years. 

Apple was up 5 percent following its quarterly results after the closing bell, which will help to ease worries about the earnings outlook for the S&P 500, even as Alphabet fell in the wake of a revenue miss. Apple Chief Executive Tim Cook also said iPhone sales had begun to stabilize in China.

In addition to a better-than-expected earnings season, market-positive economic data, a dovish Federal Reserve and hints of progress in U.S.-China trade talks have all helped drive recent gains.

With more than half of the S&P 500 companies reporting, analysts now expect first-quarter earnings to have risen slightly from a year ago, a stark reversal from the 2 percent fall estimated at the beginning of the month, according to Refinitiv data.

But not all results have been upbeat. During the regular session, Alphabet shares fell 7.5 percent in their worst decline since October 2012 after the company reported its slowest revenue growth in three years.

The S&P communication services sector fell 2.5 percent, dragged down by Alphabet, and registering its largest percentage drop in about four months.

For the month, the Dow Jones Industrial Average rose 2.6 percent, the S&P 500 was up 3.9 percent and the Nasdaq gained 4.9 percent. All three indexes posted their best monthly percentage gains since January.

The S&P 500 is now up 17.5 percent since the end of December.

The Dow was aided by gains in Chevron, whose shares rose 2 percent after Warren Buffett’s Berkshire Hathaway committed $10 billion to Occidental Petroleum’s bid for Anadarko Petroleum, raising that company’s chances of taking the deal from Chevron.

Pfizer and Merck rose more than 2 percent each after the companies exceeded quarterly earnings estimates.

General Electric chalked up a gain of 4.5 percent after the company’s first-quarter earnings number rose and its negative cash flow was smaller than expected.

Mastercard was higher after the company exceeded estimates for quarterly profit.

The Fed’s two-day meeting that ends Wednesday will be in focus for hints on the direction of interest rates.

Investors will also pay close attention to the next two rounds of U.S.-China trade negotiations after Treasury Secretary Steven Mnuchin said he hopes to make “substantial progress” with Chinese negotiators.

Approximately 7.22 billion shares changed hands on the major domestic equity exchanges, as compared to the 6.56 billion share average over the past 20 trading days.

Day’s Economic Data

The economic reports out Tuesday gave mostly positive signals on second-quarter growth following an unexpectedly strong expansion in the first three months of the year.

While first-quarter employee compensation, March pending home sales and April consumer confidence all showed solid readings, a gauge of Chicago business activity fell to a two-year low. Meanwhile, home prices in 20 cities rose in February at the slowest pace since 2012.

Here are the key takeaways from data provided by Bloomberg:

Employment Cost Index (first quarter)

Employment costs held up at a steady pace in the first quarter as wages firmed, signaling some buildup of inflationary pressures that could still spur pickups in otherwise-muted price gauges. 

The Labor Department’s broad measure, which is monitored by the Federal Reserve, increased 0.7 percent in the January-to-March period from the prior quarter, matching economist estimates. The gauge increased 2.8 percent from a year earlier, slower than the fourth quarter’s pace but slightly above the year-earlier rate.

Consumer Confidence (April)

The Conference Board’s Consumer Confidence Index rebounded and topped projections as Americans felt more optimistic about present and future economic conditions, underscoring how a tight labor market and higher wages are underpinning attitudes amid some uncertainty. Even so, the report contrasts with a decline in the University of Michigan’s April sentiment gauge.

Pending Home Sales (March)

Contracts to purchase previously owned U.S. homes jumped by more than forecast amid a surge in the West, adding to signs of stabilization in housing. The data suggest sustained wage gains, lower mortgage rates and more affordable options are attracting home buyers, though contracts were still down 3.2 percent from a year earlier. Pending home sales are a leading indicator of existing home sales, which make up 90 percent of the market.

MNI Chicago Business Barometer (April)

The gauge of manufacturing and other business in the Chicago region fell to the lowest level since January 2017 amid a significant pullback in production and weakness in employment, signaling the global economic slowdown may be weighing on corporate demand. Regional Fed factory indexes have also shown softness, with the Dallas bank’s gauge at a three-month low and declines across indexes from the Richmond, Kansas City and Philadelphia districts.

S&P CoreLogic Case-Shiller Home Prices (Feb.)

The index of property values in 20 cities increased 3 percent from a year earlier, matching projections, after 3.5 percent in the prior month, data showed Tuesday. Nationally, home prices decelerated to a 4 percent increase, also the smallest gain since 2012. Even so, price gains may pick up in the coming months amid signs of strength in demand.