"Buy and hold" is a great axiom on Wall Street, but it can be harder to pull off than many investors expect. That's because human nature has a bad habit of giving in to the temptations of the market. But if you step back and focus on owning great companies that pay you to own them, then you increase your chances of sticking it out through good times and bad. ExxonMobil Corporation (XOM -0.21%) and Hormel Foods Corp (HRL 1.48%) are two companies that you can buy today at good prices and collect dividends while you hold them for at least the next decade.

Still one of the best

Integrated energy giant ExxonMobil's shares have fallen about 8% this year. Many of its peers are actually up. That suggests that something is wrong at Exxon, which simply isn't true. The company continues to chug along just like it always has. The best example of that is the fact that its dividend was raised again in the second quarter. Its streak of annual increases is up to 35 years -- an incredible record given the highly volatile nature of the energy business.   

A hand drawing a scale showing value and price

Don't confuse the price of a stock with the value of what you're getting. Image source: Getty Images.

In fact, no other major oil company has a dividend record that can match what Exxon has done. Most peers hit the pause button on dividend growth, or cut their dividends, after oil hit the skids in mid-2014. While dividends give you something to hold on to in the tough times, they aren't the entire story here. For example, Exxon continues to be toward the top of the pack when it comes to return on invested capital, a metric that tracks how well a company manages the money of its investors.   

But the company's astute financial stewardship goes beyond that. The balance sheet is one of the strongest in the industry as well, with less leverage than its peers. That's true despite Exxon making a huge increase in its debt during the downturn to help support its capital investment plans and the dividend. But, even at the worst, long-term debt only made up about 15% of the capital structure. That's down to around 12% as of the third quarter, since recovering oil prices have allowed Exxon to start paring its debt levels.   

XOM Return on Invested Capital (TTM) Chart

XOM Return on Invested Capital (TTM) data by YCharts.

But here's the best part: Exxon's yield is a pleasing 3.7% today. And it's trading near its lowest price to tangible book value in a decade. So now looks like a good time to step aboard what remains one of the best-run companies in the energy industry.

A tasty treat

Next up is protein-focused Hormel, a food company that's probably best known for making Spam. But don't let that iconic name fool you, Hormel does a lot more than make potted meat. Its business spans the retail sector (roughly 65% of sales), the food service space (27%), and increasingly, foreign markets (5%). And it has the No. 1 or 2 position in 35 grocery categories across the entire store.   

A image of a grocery store showing where Hormel's products compete

Hormel makes more products than you might think. Image source: Hormel Foods Corp. 

Hormel's dividend, meanwhile, has been increased annually for over 50 consecutive years. That's a record that few public companies can match, let alone Hormel's direct peers. The stock has rebounded lately, but it's still down around 15% from its early 2016 highs. The yield is around 2%, which is toward the high end of its historical range. Concerns about shifting consumer preferences are largely to blame for the stock's troubles -- but that's an industrywide issue (Hormel's sales were down 4% in fiscal 2017).    

Hormel, however, is taking significant steps to keep up with the changes. Over the last few years it has sold assets that weren't living up to growth expectations (like its salt business) and bought ones that have brighter futures or complement its existing assets. The list here includes the acquisitions of Wholly Guacamole, Skippy Peanut Butter, and Columbus in the retail segment; Fontanini in the food service space; and Ceratti to expand its business into South America. It recently completed a major facility expansion in China, as well.   

This is not a company that's sitting still. And it has a track record of success, highlighted by that incredible dividend streak. Over the near term I would expect lingering weakness in sales and for debt levels to move higher because of the recent acquisition activity. But if you can handle that near-term uncertainty, this Dividend Aristocrat looks like it's trading at a fair price today.

Cashing the checks

There's no question that Exxon and Hormel are facing headwinds, but both are managing them well -- just like they always have. Their impressive dividend streaks are all the proof you need of that. And while the stocks are down, that's actually an opportunity here for you to pick up great companies that you can own for at least the next decade. Focus on collecting all of those quarterly dividend checks (or reinvesting them) while everyone else worries about the gyrations of the market that don't change the fundamental stories for these stocks..