Stocks tend to perform chaotically during major inflationary episodes. Over the long run corporate earnings are inflation-protected. The problem is that inflation hits unevenly, depending on where relative shortages are, and some businesses can raise prices much more than other businesses can. That can make some businesses non-competitive (= insolvent) during an episode of high inflation, while also pooling profits within a small number of survivors. You often see a big consolidation of winners, great companies of the next era born, and then a lot of bankruptcies. Mainstream investors are often not very good at predicting the winners, so you get panic and malaise in the short term.