Although still very close to all-time highs, the broader market has pulled back lately. One of the big fears appears to be the specter of inflation, which is a very notable near-term concern. However, the impact of inflation may not be as worrisome as investors think in some sectors. Here are two stocks with historically high yields that investors might want to buy even if inflation continues to tick higher.

Higher prices can be a good thing

Chevron (CVX -0.40%) is one of the world's largest integrated energy companies. Oil and natural gas prices drive the top and bottom lines. These vital fuels are out of favor right now as the world looks to reduce the amount of carbon it creates, but they are highly likely to remain important for decades to come. That's because energy transitions take time and there's no quick-and-easy way to replace these energy sources. The stock offers a historically high 5.5% dividend yield.

The word dividend in yellow with a jagged rising graph below it.

Image source: Getty Images.

The interesting thing here is that inflation is likely to lead to higher prices for things like oil and natural gas. That, in turn, should create better financial results for Chevron, which has largely remained focused on its core energy business. While carbon is a very real issue to deal with, Chevron is starting to address it more directly via increased spending on low-carbon investments. Plus, the energy specialist appears to have ample time to adjust. That suggests that investors have a high-yield buying opportunity here that could actually benefit from the impact of the inflation currently helping to spook the market more broadly.

There are a couple of other notable issues here. Chevron's commitment to its dividend is impressive given its 30-year-plus streak of annual increases. It's a Dividend Aristocrat, having hiked the payout in both good years and bad. And it has the strongest balance sheet among its integrated major peers, with a modest debt-to-equity ratio of roughly 0.33. That provides the energy company with a solid foundation on which to continue its impressive dividend streak. If you are looking for a dividend stock today, Chevron should be on your short list.

Passing rising costs along

The next name up is Hormel Foods (HRL -2.03%), which owns iconic brands like Spam, Planters, and Skippy. It is facing higher costs and that will hamper near-term performance. That's not great news and has resulted in a historically high yield of around 2.3%. However, this isn't the type of stock you buy for the short term; it is one you buy and hold for a long, long time. And that makes a big difference in how you should think about inflation.

CVX Dividend Yield Chart

CVX Dividend Yield data by YCharts.

Hormel is a Dividend King thanks to 55 consecutive annual dividend increases. Over the past decade, the annualized rate of increase was an impressive 15%. And it has historically taken a very conservative approach to its balance sheet, with the current debt-to-equity ratio sitting at a reasonable 0.5 even after the company took on one of the biggest acquisitions in its history (Planters). Hormel is likely to pare down its debt in the years ahead as it integrates the purchase. So, like Chevron, there's a strong foundation here and a long-term commitment to the dividend.

But what about inflation? The answer there is pretty simple. During Hormel's fiscal third-quarter 2021 earnings conference call, management noted that it is already starting to pass price increases on to consumers. The company's strong brands should make that process easier. And, eventually, it will find a way to cover its rising costs, just like it has many times before over the past 55 years. So near-term results will definitely feel a pinch, but over the long term it will likely be little more than a blip as Hormel offsets inflation with price increases. Taking a bit of a contrarian opinion here could be very rewarding for dividend-growth-focused investors.

A manageable problem

With the broader market still near all-time highs despite the recent pullback, investors are right to be a little concerned about negatives like inflation. However, that doesn't mean you should stop investing. There are still good long-term options with attractive dividends out there. Chevron, which will likely benefit from inflation because of its commodity exposure, and Hormel, which has the pricing power to pass rising costs on to consumers, are two strong examples.