Adam Shell | USA TODAY

The Dow gave up early gains Friday to finish with a moderate loss, ending a wild week punctuated by big price swings and a post-Christmas rebound rally that enabled the blue chip stock average to dodge a bear market and notch its first weekly gain since the last week of November.

The Dow Jones industrial average, which traded up by as much as 243 points, closed down 76 points, or 0.3 percent, at 23,062. For the week, the Dow rose nearly 2.8 percent, trimming its loss from its Oct. 3 peak to 14 percent and its year-to-date decline to 6.7 percent.

The broader Standard & Poor’s 500 stock index, which edged 0.1 percent lower Friday, finished the week 2.9 percent higher. The Nasdaq composite rallied nearly 4 percent on the week after registering a small gain of 0.1 percent Friday.

The small loss Friday for the Dow followed a massive two-day rebound. On Thursday, the 30-stock Dow recovered from a decline of more than 600 points to finish 260 points higher, its biggest intraday reversal since the financial crisis. That wild ride followed the Dow’s first-ever daily gain of more than 1,000 points on Wednesday, which helped it avert its first official bear market, or 20 percent drop, since 2009.

Wall Street pros said stocks were due for a bounce after the Dow fell more than 4,000 points in just 14 trading days through Christmas Eve, a violent decline that drove valuations down to multi-year lows. Fear among investors after the slide spiked to its highest level since the first market scare of 2018 back in February, a contrarian signal that suggests short-term exhaustion of sellers.

Richard Drew, AP

Trading on Wall Street has become volatile in recent weeks, as investors navigate a slew of headwinds, ranging from fears of rising interest rates causing a recession, political discord in Washington, D.C. that has led to a government shutdown and persistent fears about slowing growth around the globe exacerbated by the ongoing U.S.-China trade war.

The swift turnaround in stocks in the two trading sessions after Christmas enabled both the Dow and the S&P 500 to narrowly avoid closing down more than 20 percent from their recent highs and entering their first official bear market since 2009.

After Friday’s trading session, both the Dow and the S&P 500, which is now down 7 percent this year, are on track for their worst performing year since 2008.

Financial pros expect the volatility to continue.

The good news is that after narrowly avoiding a bear market in the Christmas Eve rout, the S&P 500 is down 15.2 percent since its record high in late September, which keeps it deep in correction territory but a far distance from a bear market.

Stocks got a lift in recent days due to strong holiday retail sales, which reduced concerns about the health of the consumer. Wall Street pros also say stocks were due for a rebound after relentless selling for weeks.

The stock market is also getting a lift from pension funds moving money into stocks to get their asset mixes back at the desired level after weeks of selling that reduced the value of their holdings, as well as the end of year-end tax loss selling by investors looking to reduce their 2018 tax bills.

President Donald Trump's statement earlier this week that he still backs Federal Reserve chairman Jerome Powell also has reduced anxiety on Wall Street. Trump has been critical of the Powell-led Fed for raising interest rates, which the president fears will harm the economy.

AP