Upvote:5
Mild inflation may often be good for stock prices, but when people cannot afford basic necessities, there may not be as much money available for speculative investment. In Wiemar Germany, stock prices were volatile but generally declining during the worst of the inflation. Below I've taken a graph from an article by Hans-Joachim Voth and added a thick red arrow to indicate 1923, the peak of hyperinflation.
As Voth states:
During the hyperinflation, German stocks were often extremely cheap. In November 1922, for example, the capitalization of Daimler Motor Work was equivalent to the value of 327 of its cars. Market volatility was extremely high, with share prices often changing by 30 or even 50 percent per month in real terms. (p.67)
How investors fared overall is a more difficult question to answer. In such a volatile market, I suspect there were both big winners and big losers. Overall, a lot depends on the specific time frame you look at.