(Reuters) - The S&P 500 ended marginally lower in a choppy session on Friday, but major indexes posted weekly gains for the first time in December following a wild few days of trading that saw equities rebound from a prolonged slide.

Major indexes moved in and out of positive territory during the day, action that was emblematic of recent volatility though lacking the huge swings of the past week. The Dow finished modestly lower, while the Nasdaq eked out a slight gain.

With the year coming to an end, investors will be watching key U.S. economic reports next week, including on manufacturing and employment.

“It’s just maybe nervousness ... with another short week coming up,” said Bucky Hellwig, senior vice president at BB&T Wealth Management in Birmingham, Alabama. “There’s a lot of potential for moves one way or the other. We have got a lot of data coming in next week.”

Thursday’s trading was marked by a stunning reversal late in the session to build on a rally that started on Wednesday with the biggest single-day percentage gains for the indexes in nearly a decade.

The week started off with Wall Street’s worst-ever Christmas Eve drop, pushing the S&P 500 to within a whisker of bear market territory.

“The market does seem to be forming a tradeable bottom,” said Michael Arone, chief investment strategist at State Street Global Advisors in Boston. “In the last few days and even including today, you are seeing investors come in and starting to look for some bargains.”

Slideshow ( 5 images )

The Dow Jones Industrial Average .DJI fell 76.42 points, or 0.33 percent, to 23,062.40, the S&P 500 .SPX lost 3.09 points, or 0.12 percent, to 2,485.74 and the Nasdaq Composite .IXIC added 5.03 points, or 0.08 percent, to 6,584.52.

For the week, the S&P 500 rose 2.86 percent, the Dow added 2.75 percent, and the Nasdaq gained 3.97 percent.

Even so, the S&P 500 was on track to drop more than 9 percent in December, its biggest monthly percentage decline since February 2009, during the throes of the financial crisis.

Concerns about trade tensions between the United States and China, instability in Washington as underscored by the partial federal government shutdown, and slowing U.S. corporate profit growth continue to worry investors heading into 2019.

But the recent slide in stocks means valuations are more reasonable, while some market watchers said this week that Wall Street was becoming more confident about the Federal Reserve’s approach to interest rate policy and monetary tightening.

“Investors are beginning to price in the fact that they believe the Fed will raise rates at a much slower pace in 2019,” Arone said.

Slideshow ( 5 images )

The rebound in stocks this week comes as investors may be rotating into equities from bonds. U.S. fund investors added $5.2 billion to equity funds in the first net positive flows for such funds this month, while bonds funds saw $8.3 billion in outflows, according to Lipper data for the latest weekly period.

Contracts to buy previously owned homes fell unexpectedly in November, the National Association of Realtors said, the latest sign of weakness in the U.S. housing market.

In corporate news, Tesla Inc TSLA.O shares jumped 5.6 percent after the electric carmaker named Oracle Corp ORCL.N co-founder Larry Ellison to its board, in response to a demand by U.S. regulators for independent oversight of company management.

Dell Technologies Inc DELL.N returned to public markets, nearly six years after the company's founder and chief executive, Michael Dell, took it private.

Advancing issues outnumbered declining ones on the NYSE by a 1.97-to-1 ratio; on Nasdaq, a 2.23-to-1 ratio favored advancers.

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

About 8 billion shares changed hands in U.S. exchanges, below the 9.2 billion-share daily average over the last 20 sessions.