The worst Christmas Eve in stock-market history was more than offset Wednesday by the best day-after-Christmas trading day on record, with the Dow logging its first-ever 1,000-point, single-day gain as equities roared back from oversold conditions.

Equities closed early in an abbreviated session Monday and were closed Tuesday for Christmas Day.

The Dow Jones Industrial Average DJIA, +1.33% ended with a gain of 1,086.25 points, or 5%, at 22,878.45. The S&P 500 SPX, +1.59% soared 116.60 points, or 5%, to end at 2,467.70. The Nasdaq Composite COMP, +2.26% COMP, +2.26% rose leapt 361.44 points, or 5.8%, to 6,554.36.

On a percentage basis, all three major indexes saw the strongest one-day gains since March 23, 2009. It also marked the best ever day-after-Christmas performance for the gauges.

In a shortened Christmas Eve session Monday, the Dow Jones Industrial Average slid 653.17 points, or 2.9%, to 21,792.20, marking its lowest close since Sept. 7, 2017, while the S&P 500 index SPX, +1.59% fell 2.7% to 2,351.10, its lowest since April 21, 2017. The Nasdaq Composite Index COMP, +2.26% COMP, +2.26% tumbled 2.2% to 6,192.92, its lowest close since July 10, 2017.

Read: As stocks suffer a December rout, Wall Street strategists bet on 2019 gains

Stocks remain down sharply for December, with all three major indexes down more than 10% for the month to date and the Nasdaq in bear-market territory.

See:These U.S. stock benchmarks are already in a bear market — and the S&P 500 isn’t far behind

What’s driving the market?

Retailers were in rally mode Wednesday, with a 6.3% rise for consumer-discretionary companies leading S&P 500 sectors to the upside.

Shoppers delivered the strongest holiday sales increase for U.S. retailers in six years, according to Mastercard Spending Pulse, which tracks online and in-store spending with all forms of payment.

The energy sector rose more than 6%, with oil companies lifted by a sharp rebound for crude.

Among consumer-discretionary firms, shares of Amazon.com Inc. AMZN, +2.49% helped set the tone, rising more than 9% after the company said it logged another record holiday season.

See:‘Robin Hood of Wall Street’ says be wary of Trump’s advice to buy stock-market dip

The White House on Wednesday denied a CNN report that Treasury Secretary Steven Mnuchin’s job was in “serious jeopardy” after a failed attempt to calm markets. White House economic adviser Kevin Hassett told NBC News that he was confident that President Donald Trump was happy with Mnuchin. In an interview with The Wall Street Journal, Hassett also said Federal Reserve Chairman Jerome Powell’s job was “100% safe.”

Trump has repeatedly criticized the Fed and Powell for tightening monetary policy.

Read: Tim Mullaney says Mnuchin can’t stand up to his boss — and it’s costing you money

Read:Why Trump can’t fire Powell for disagreement over monetary policy

Meanwhile, parts of the federal government remain shut down as lawmakers in Washington tussle over funding for Trump’s proposed border wall. Trump also said Tuesday that the government won’t reopen until “we have a wall, fence, whatever they like to call it.”

What are analysts saying?

While some investors have argued that stocks are due to put in at least an intermediate-term bottom, others cautioned that the sharp rebound witnessed Wednesday and in other sessions in recent months are characteristic of sharp bounces from oversold conditions often seen in bear-market conditions.

“What’s changed from Monday to today, other than we were off” on Tuesday, asked Adam Sarhan, chief executive at 50 Park Investments, in a phone interview.

The market underwent a sea change in early October when Powell talked aggressively about future interest-rate rises, effectively ending a framework that had seen stocks capable of rallying on reassurances of continued easy policy by central bankers. Subsequent efforts to soften the message have failed to reassure markets, underlining the downbeat psychology, Sarhan said.

Other investors questioned whether the recent selloff had roots in legitimate concerns over the outlook for the economy and corporate profits.

“The market’s volatility still seems to us to be more of a ‘run’ on the equity market based on fear rather than fundamentals,” said Dan Suzuki, portfolio manager at Richard Bernstein Advisors, in a note.

“The difference between a run on the banking system and a run on the stock market is that the banking system has an explicit government backstop (FDIC). In stark contrast, not only does the stock market not have a government backstop, but many of the drivers of the current volatility directly stem from government policy (trade, oil prices, the Federal Reserve, the government shutdown),” Suzuki said.

See:Stocks are ‘close enough to a bottom’ for investors to step in: Guggenheim’s Minerd

How did other markets trade?

Oil futures, which came under heavy pressure last week and Monday, were in rebound mode, bouncing sharply from a 17-month low.

Major European markets remained closed on Wednesday.

Japan’s Nikkei 225 index NIK, +0.50% closed up 0.9% on the heels of a 5% slump Tuesday in reaction to Wall Street’s losses. China’s Shanghai Composite SHCOMP, -0.11% fell 0.3%.

The ICE Dollar Index DXY, +0.26% rose 0.5%, while gold US:GCG9 eked out a gain. February West Texas Intermediate crude US:CLG9 rallied 8% to wipe out its own Christmas Eve plunge.

What stocks were in focus?

Roku Inc. ROKU, +2.33% shares rose 11.7%, after Needham said the stock was its Top Pick for 2019.

Shares of electric-car maker Tesla Inc. TSLA, +5.04% rallied over 10% after analysts at Wedbush said they remained bullish on Model 3 production and European demand. Shares had plunged on Monday.

Among retailers, Kohl’s Corp. shares KSS, -1.96% rose 10.3%, while shares of Dollar Tree Inc. DLTR, +1.12% jumped 5.6% and Ross Stores Inc. ROST, +1.44% gained 7.2%. Home Depot Inc. HD, +1.13% rose 6.4%.

Shares of generic drugmaker Teva Pharmaceuticals Industries Ltd. TEVA, +1.86% advanced 8.4% after Neos Therapeutics Inc. NEOS, -0.17% said it entered a confidential settlement and licensing agreement with the company to resolve patent litigation related to a treatment for ADHD. Neos shares fell 0.6%.

Also:U.S. holiday retail sales are strongest in 6 years, by this measure

What’s on the economic calendar?

The Case-Shiller 20-city price index rose a seasonally adjusted 0.4% in October, while the year-over-year advance fell to 5% from a revised 5.2% in September.