Wall Street concluded a tumultuous 2018 on Monday as the major stock indexes posted their worst yearly performances since the financial crisis.

After solid gains on Monday, the S&P 500 and Dow Jones Industrial Average were down 6.2 percent and 5.6 percent, respectively, for 2018. Both indexes logged in their biggest annual losses since 2008, when they plunged 38.5 percent and 33.8 percent, respectively. The Nasdaq Composite lost 3.9 percent in 2018, its worst year in a decade, when it dropped 40 percent.

The S&P 500 and Dow fell for the first time in three years, while the Nasdaq snapped a six-year winning streak. 2018 was a year fraught with volatility, characterized by record highs and sharp reversals. This year also marks the first time ever the S&P 500 posts a decline after rising in the first three quarters.

For the quarter, the S&P 500 and Nasdaq plunged 13.97 percent and 17.5 percent, respectively, their worst quarterly performances since the fourth quarter of 2008. The Dow notched its worst period since the first quarter of 2009, falling nearly 12 percent.

A sizable chunk of this quarter’s losses came during a violent December. The indexes all dropped at least 8.7 percent for the month. The Dow and S&P 500 also recorded their worst December performance since 1931 and their biggest monthly loss since February 2009.

Investors dumped stocks this month amid concerns of an economic slowdown and fears the Federal Reserve might be making a monetary policy mistake. Concern over ongoing trade negotiations between China and the U.S. have also pressured stocks this month.

But that doesn’t explain just how wild a ride December was for investors. At its low price on Christmas Eve, the S&P 500 was down more than 20 percent from its record high on an intraday basis, briefly meeting the requirement for a bear market. The stock market would come soaring back in the next session, with the Dow jumping more than 1,000 points on Dec. 26, its biggest ever point gain.

Traders had trouble pinpointing the cause of the extreme volatility, with some chalking it up to computer-driven trading.

The major averages trimmed some of their sharp annual losses on Monday on hopes of trade progress between China and the U.S. The Dow climbed 265 points, while the S&P 500 and Nasdaq both gained 0.8 percent.

John Stoltzfus, chief investment strategist at Oppenheimer Asset Management, said these declines are “setting the stage for upward surprises in 2019.”

“With what we believe to be almost all but the kitchen sink priced into current valuations, we see opportunity for multiples to return to levels seen at the end of the third quarter … with multiple expansions resulting in a global equity rebound in the coming year,” Stoltzfus wrote in a note.

“That said, we do not expect a rally of great significance to emerge until sometime into the first quarter of 2019. We look for market risk to weigh on investor sentiment into the new year until catalysts for a rally of some material significance appear on the scene,” he added.

Merck shares rose more than 1 percent, ending the year as the best-performing Dow component of 2018. Pfizer, the second best performer on the Dow this year, also climbed 1.6 percent on Monday. Netflix jumped 4.5 percent while Amazon rose 1 percent after the popular FAANG trade (Facebook, Amazon, Apple, Netflix and Alphabet) took a beating recently.

President Donald Trump said this weekend he had a “very good call” with Chinese President Xi Jinping to discuss trade. The president also claimed that “big progress” was being made on this front. Trump’s statements sparked gains in markets worldwide.

However, The Wall Street Journal reported that Trump may be overstating how much progress was being made. The report cited people familiar with the situation. China and the U.S. agreed earlier this month to a 90-day grace period to try and work out their differences on trade.

“The threat of an escalating trade war has chilled US business confidence, with managers uncertain as to if/how they should restructure global supply chains,” Nicholas Colas, co-founder of DataTrek Research, wrote in a note to clients.

“The most bullish case here is that the tariff issue will be settled in Q1 2019, and a meaningful resolution should be enough to trigger a first half rally for stocks,” Colas added. “Against that optimistic take are two bearish outcomes: one, that these negotiations take longer and two, that they fail outright.”