Over the past two or so years, three things have dominated headlines regarding the U.S. economy: a potential recession, interest rates, and inflation. The third item, in particular, has been at the forefront because it's had the most direct impact on consumers.

June 2022 saw a 9.1% high mark for inflation, the largest jump since 1981. Any time you break four-decade-old records, there will be challenges for the economy. The latest inflation data from May showed much improvement from last year -- just 4.0% compared to 8.6% in May 2022 -- but there's still work to be done.

Inflation may be out of your control, but how you manage your investment strategy is entirely up to you.

Someone holding a laptop standing in front of an oil refinery building.

Image source: Getty Images

Understand how different sectors are affected

Inflation is an increase in the cost of goods and services. While consumers don't like inflation, because they get less bang for their buck, those price increases are coming from many companies that are on the receiving end of increased costs too. It's helpful to have a broad understanding of how different sectors are affected by inflation.

Take the energy sector, for example. During times of high inflation, energy companies fare pretty well, which is to be expected since energy prices are a key part of calculating inflation. In 2022, Chevron made $35.5 billion in profit -- almost $20 billion more than in 2021. This profit surge didn't come from increased demand of that magnitude -- it was a byproduct of inflation.

CVX Revenue (Annual) Chart

Data by YCharts.

Conversely, companies that sell consumer discretionary products and services generally take a hit during periods of high inflation. They're then faced with two options: Raise prices and risk losing customers or absorb the higher costs themselves and lower their profit margins. It's much easier for someone to turn down the latest electronic device that's increased in price than something like gas for their daily commute.

Knowing how inflation affects different sectors can help investors keep things in perspective for the long run. For example, it could prevent you from reading too much into year-over-year revenue gains from big oil companies. Or it could help you keep a glass-half-full mindset if a company's profits decline due to rising costs.

Diversification is key

Diversification is one of the key pillars of investing, not just during periods of high inflation but at all times. Having a diversified portfolio ensures you're not too susceptible to sectors that may be negatively impacted by inflation while you'll also have exposure to companies that benefit from it.

You may not reap all the upside benefits, but you also won't endure all the downsides. That trade-off is worth it every time. It's a tried-and-true method to help lower risks at a time when they may be higher than usual.

Lean on dividend stocks

Dividend-paying stocks can be a good hedge against inflation too, particularly companies that increase their dividends annually. In a "normal" year, the Fed tries to keep inflation around 2%, so any dividend yield higher than that will often mean you'll at least be collecting more annually from the stock than you're losing in purchasing power.

Most investors won't have a portfolio that generates 8% in dividend returns to match last year's inflation, but any amount is better than nothing and can offset the impact of inflation. Dividends also give investors a natural safety net. Assuming you're investing in companies that aren't at risk of cutting their dividends, it's guaranteed income, regardless of stock-price performance.

Don't veer too far off course

You never want to lose sight of investing as a long-term exercise. It's smart to consider inflation and tweak your investing strategy, as necessary, but you don't want to veer too far from it. It's very possible to overcorrect.

If you switched up your strategy every time market conditions (including inflation) changed, you'd always be reacting to the latest news. Adjusting to every market change puts you on the fruitless path of trying to time the market.

Adjust as needed, but stick to your long-term plan. Remember, the best time to prepare for inflation is well before it happens. This is much easier said than done, but being prepared can make all the difference in the world when it comes to investing.