Stocks surged for a second day Monday to wrap up a rough January, as investors snapped up some of the tech shares that have been battered all month.

Despite the two-day relief rally, the S&P 500 and the Nasdaq Composite posted their worst months since the onset of the pandemic, as investors braced for the Federal Reserve to raise interest rates multiple times this year.