On speculation that the yearlong selloff had possibly reached a bottom, US stocks roared back from losses sparked by a hot inflation reading.

The S&P 500 ended the day up 2.6% after swinging more than 5%. The benchmark recovered more than 40% of its losses during a six-day selloff that sent it to a two-year low.

The bounce was influenced by technical levels. The benchmark S&P 500 had given back 50% of its post-pandemic rally at one point, triggering programmed buying. A wave of put options purchased to protect against such a rout moved into the money, prompting dealers to buy stocks to remain market neutral.

Last month, a gauge of consumer price growth reached a 40-year high, solidifying the case for the Fed to deliver a large rate hike in November. Before Thursday's rebound, stocks had dropped 25% this year as the central bank tightened policy to combat inflation, leaving investors to wonder how much damage is still left for share prices.