Still, by understanding its effects, the stock market can serve as an ally both in mitigating its costs and building wealth during inflationary times. In a 2% inflation environment, a $200,000 mortgage falls to about $196,000 in real terms within one year, even if the lender makes no principal payments. However, history has proven that through dividends, the stock market can help people maintain their wealth, even when indexes struggle to move higher.