Inflation is when prices go up. However, inflation's relationship to stock prices can be a little more complex. In this graph, I am revisiting historical data I used several years ago in a series of historical graphs looking at the stock market (see GDP per Capita vs US Stock Prices and Real Growth in Stock Returns Dividends Reinvested).
I graphed the price/earnings ratio back to 1880 and highlighted the years that inflation was high and when there was deflation. The P/E is calculated from trailing 10-year earnings. The low inflation years (5% or less) had the highest P/E while the high inflation years has the lowest P/Es. Deflation years had P/Es near the average.