My favorite holding period is forever. Imagine owning a piece of a timeless business, one that grows its profits year in and year out, slowly generating life-changing wealth for you and your loved ones. Of course, those companies aren't easy to find. Most stocks don't earn a lifetime membership in an investor's portfolio.

However, Amazon (AMZN 0.68%) and Hershey (HSY 2.27%) could qualify. I'll explain what makes them so special and why they're worth buying today and holding forever.

A three-headed wealth machine

There's a good chance Amazon affects your life somehow. It's the dominant e-commerce company in America, with a whopping 38% of the market. Amazon Web Services, its cloud segment, underpins much of the internet.

And if you are a football fan, Amazon is a media giant that streams National Football League games -- along with thousands of movies and shows -- making billions of dollars in ad revenue by doing it.

Not only is Amazon's presence in these three industries impressive, but the size of these markets has also given Amazon the virtual real estate to grow into a multitrillion-dollar business. Today, it makes over $570 billion in revenue, pumping out $85 billion in operating profits that are reinvested into the company.

Its advantage over the competition starts with its e-commerce business, which has become so large that it's tough to replicate. Its supply chain handles nearly a quarter of all packages shipped in the United States. That size, combined with its aggressive culture of innovation, makes it hard to see Amazon going away anytime soon.

AMZN Price to CFO Per Share (TTM) Chart

AMZN price-to-CFO per share (TTM) data by YCharts; TTM = trailing 12 months.

I like valuing the stock on its operating cash flow because Amazon invests heavily in growing the business, even at its current size. If you compare the share price to the operating cash flow per share, the stock is still cheap relative to its long-term average.

Investors can confidently add Amazon to their portfolios. And barring an unforeseen disaster, don't let go.

Sweet never goes out of style.

Hershey is on a completely different end of the spectrum. It makes chocolate and salty snacks. It's not a complex business model, but that can be good.

It's the brand that makes Hershey special. There are other confectionary companies on the market, but Hershey's name goes back over a century and its brands are routinely among Americans' favorites year-round. Who doesn't love a Hershey bar, Kit Kat, Twizzlers, Heath Bar, Jolly Rancher hard candies, or a Reese's peanut butter cup?

The company's popularity means it gets prime shelf space at points of sale, much like Coca-Cola and PepsiCo do in the beverage industry. Hershey has an estimated 24% of the U.S. confectionary market, an impressive figure considering any company can make chocolate bars. It's the brand that makes the magic.

That translates to financials, too. Hershey is a simple and highly profitable business that earns an impressive 22% return on invested capital. That means that when Hershey pumps a dollar into its business, it gets $1.22 back. This signals that Hershey has pricing power, which is helping the company deal with a surge in cocoa prices that threatens to pressure its profit margins.

HSY PE Ratio (Forward) Chart

HSY PE ratio (forward); data by YCharts; PE = price to earnings.

While that's bad news for the company, it's creating an opportunity for long-term investors. Shares have fallen to a price-to-earnings ratio of 20, below the company's long-term average.

Over time, it should adapt to the higher cocoa prices, and there's a good chance the shortage will end and prices will normalize again. In other words, use a short-term problem to buy this excellent stock and enjoy the following years of dividends and price appreciation.