So i was doing some research on inflation and i came across this sentence, "The impact of inflation on your portfolio depends on the type of securities you hold. If you invest only in stocks, worrying about inflation shouldn't keep you up at night since historically stocks have been quite good hedges against inflation." from https://www.investopedia.com/university/inflation/inflation4.asp at the start of the 2nd paragraph. Can someone please explain why is that?
Inflation is a decline in the value of money, but companies can generally adjust their prices to account for that decline.
Take a simple example. Say company X is producing widgets that sell for $100, and makes $10 profit on each one (which it pays to shareholders as dividends). Now you have 10% inflation, so the company changes the price to $110 and makes $11 profit, which is exactly the same after adjusting for inflation. Thus the value of the company in real terms hasn't changed.