SAN FRANCISCO (MarketWatch) — Enjoy the better-than-expected fourth-quarter earnings season as it draws to a close, because the first quarter is looking downright ugly.

Stocks finished higher for a second week in a row as the S&P 500 Index SPX, -1.11% closed at a record high of 2,096.99, the Dow Jones Industrial Average DJIA, -0.87% finished above 18,000 for the first time this year, and the Nasdaq Composite Index COMP, -1.07% turned in a 3.3% gain.

Lower energy prices may have boosted consumer spending, but the impact of the energy sector on the S&P 500 is having a more pronounced drag on first-quarter estimates compared with the fourth quarter.

Energy earnings have declined 21.5% so far for the fourth quarter, more than an expected 17.5%. Big upside surprises, however, from tech, consumer discretionary, and health care earnings managed to put the S&P 500 on track for a 3.1% earnings gain, up from expected growth of 1.7%, according to John Butters, senior earnings analyst at FactSet.

For the first quarter, virtually every sector is expected to perform worse than was estimated at the end of 2014. Energy earnings for the first quarter are now expected to drop 61.8%, rather than 29.1%. That’s helping to push S&P 500 earnings expectations to a 3.6% decline from a year ago. Nearly three months ago, a 4.1% gain was expected.

Even if earnings get the average 2 to 3 percentage point boost from lowball estimates, that would still be the first quarterly earnings decline since the third quarter of 2009.

Forecasts for the first quarter are more negative than usual. Of the 74 S&P 500 companies that have issued forecasts, 63, or 85%, are forecasting earnings below the Wall Street estimate, according to Butters. The five-year average is 68%.

One Dow component, Wal-Mart Stores Inc. WMT, -1.02% , along with 50 S&P 500 components report earnings during the holiday-shortened week.

Notable earnings reports this week