US stock markets struggled to build a post-Christmas rally on Wednesday morning, recovering some of the ground they lost after their worst ever performance on .

The S&P 500 Index, the Dow Jones and Nasdaq all recorded small gains in morning trading.

The Dow and S&P 500 dropped more than 2.5% on , their worst ever pre-holidays performance. Worries about rising interest rates, Donald Trump’s attacks on the Federal Reserve for raising those rates, a government shutdown and the continuing trade tensions between the US and China have all rattled investors and the major indices are now on the brink of a bear market – a 20% fall from their most recent high.

US stock markets have enjoyed a record-breaking run, rising steadily since , the low point of the financial crisis. And the wider economy appears robust with unemployment low and inflation in check. But despite evidence that the US economy remains robust, this year could still mark the first bear market in close to a decade.

On Monday the Dow was off 18.8% from its October high, while the S&P had fallen 19.8% from its record. The tech-heavy Nasdaq index is already in a bear market, down 23.6% from its August record. The soaring share prices of technology companies – especially the so-called Faang companies, Facebook, Amazon, Apple, Netflix and Google – helped push stock markets to new highs. There recent losses have been a major factor in dragging the markets down.

With just four more trading days to go until the end of the year, investors are expecting a bumpy ride.

Much of the headwinds have come out of Washington. On Trump tweeted : “The only problem our economy has is the Fed. They don’t have a feel for the Market, they don’t understand necessary Trade Wars or Strong Dollars or even Democrat Shutdowns over Borders. The Fed is like a powerful golfer who can’t score because he has no touch – he can’t putt!”

The latest attack contributed to Monday’s sell-off and came as economists wrestled with a government shutdown, sparked by Trump’s attempts to fund his border wall with Mexico. That shutdown is now in its fifth day with no signs of a resolution.

Trump has since tried to walk back his criticism of the Fed, telling reporters at the White House on Tuesday that while the Fed was “raising interest rates too fast” he still had confidence in the the central bank. “I mean, the fact is that the economy is doing so well that they raised interest rates and that is a form of safety in a way,” he said.

Peter Cardillo, chief market economist at Spartan Capital Securities in New York, told Reuters that he expected markets to continue to rally as investors looked for bargains. But he warned there was probably more volatility ahead. “The ‘bear grip’ is feeding on itself as Trump continues to spread uneasiness,” said Cardillo.