April was one of the wildest months in recent memory for markets, capped off by a key data release that showed the economy shrank last quarter for the first time in years.

After tumbling Wednesday morning, the S&P 500 and the Dow gradually clawed back losses and pushed into the green to close out the day. The Dow gained 142 points, or 0.35%. The S&P 500 rose 0.15%. The tech-heavy Nasdaq Composite fell 0.09%.

The S&P 500 and Dow notched a seven-day winning streak, their best continuous rally this year. However, the indexes closed out April in the red as the stock market has been trying to recover from a steep slump caused by President Donald Trump’s tariffs. The S&P 500 and Dow posted their third consecutive month in the red, their longest monthly losing streak since 2023. The Nasdaq, which entered a bear market in early April, managed to eke out a gain of 0.85% across the month.

Stocks initially fell Wednesday after fresh Commerce Department data showed the US economy contracted in the first quarter for the first time since 2022. Trump’s policy agenda has injected enormous uncertainty into businesses across the United States and shaken consumer confidence.

Stocks pared some losses as new data showed inflation slowed in March and the Fed’s preferred inflation gauge cooled, matching expectations and offering brief reassurance that inflation, while elevated, has been easing. Trump’s tariffs are expected to push up prices again.

The S&P 500 dropped more than 11% in the first eight days of the month as Trump on April 2 unveiled his “reciprocal” tariffs. After turmoil in the bond market and Trump’s 90-day pause on most tariffs, the benchmark index has since regained ground but ended the month down about 0.76%.

As stock futures dropped Wednesday morning, Trump posted on social media, “This is Biden’s Stock Market, not Trump’s. I didn’t take over until January 20th.”

“Tariffs will soon start kicking in, and companies are starting to move into the USA in record numbers,” Trump wrote. “Our Country will boom, but we have to get rid of the Biden ‘Overhang.’ This will take a while, has NOTHING TO DO WITH TARIFFS, only that he left us with bad numbers, but when the boom begins, it will be like no other. BE PATIENT!!!”

The stock market during Trump’s second term recorded the third-worst performance during the first 100 days of any presidential term in US history, following only President Richard Nixon and President Gerald Ford.

“We don’t expect that it’ll be some sort of sudden recovery, unless all of a sudden the tariffs are all removed,” said Kelly Bouchillon, senior partner at Sound View Wealth Advisors. “And, you know, make no mistake about it. This is very clearly brought on by the uncertainty surrounding the tariffs, period.”