Investors plowed into the stock market this week after a monthly inflation report ended a streak of worse-than-expected data this year, fueling the biggest rally in years on hopes the Federal Reserve may be nearing the end of its interest rate hikes, but analysts and some officials have quickly pointed out the economy remains in flux and prone to recession—even if stocks suggest otherwise.