As these turbulent times show, finding companies that show strength through challenging periods is tough. However, this is what separates the great companies from the merely good companies, and when you find one that does well in a variety of environments, you should hold on to the shares for the long haul.

After all, a forever holding period is not something you should take lightly. Here are two stocks that belong in that exclusive group.

A pocket watch on top of a $100 bill.

Image source: Getty Images.

1. Amazon

It is hard to believe that Amazon (NASDAQ:AMZN) was only founded 26 years ago, since the company has become such an integral part of our daily lives. It has certainly become far more than the bookseller it began as, now selling just about everything under the sun.

Amazon says it is looking to become "Earth's most customer-centric company," through tenets like obsessively focusing on the customer and having a long-term view.

There was a time when it was growing sales but not reporting a profit, since management kept investing in growth initiatives. Amazon is still forward-looking, but thankfully for shareholders, it now reports huge profits. In the last five years, its sales have gone from $107 billion to $280.5 billion. Over that same period, Amazon's operating income has grown nearly seven times from $2.2 billion to $14.5 billion.

It is much more than a retail website, though. For starters, there is its popular Amazon Prime subscription service which allows people to get faster delivery without paying an extra charge, plus a streaming service, for an annual fee. It also sells electronic devices like its Kindle and Alexa.

If that isn't enough, there's the Amazon Web Services business, its cloud computing division that helps companies with things like analytics. Accounting for about 12% of Amazon's annual sales, it is smaller than the North American and international retail segments. However, AWS has been growing faster than the other two, with a 35% sales increase last year.

With people staying at home and ordering goods online, Amazon's second-quarter sales growth was 40%, and the company went on a hiring spree. This indicates management believes that the increase in business is more than a temporary phenomenon. Online shopping was growing rapidly before the pandemic, but it has increased even more since governments ordered people to stay at home and forced other retailers to shut their doors.

Undoubtedly, the accelerating trend toward e-commerce will help the company over the long haul. Given what the company has accomplished in a relatively short period of time and its ability to disrupt industries (e.g. grocery) once it enters with its fast delivery and low prices, Amazon's prospects remain strong.

The only possible negative is the valuation. After the share price's 58% increase this year, the trailing price-to-earnings ratio is over 115. But when you are in a stock for the long haul, you can pay up for quality and withstand any short-term corrections.

2. Procter & Gamble

Procter & Gamble (NYSE:PG) has thrived for 183 years by selling a host of products like shampoo, shaving cream, razors, and laundry detergent. It has well-known, popular brands like Head and Shoulders, Gillette, Crest, Always, and Bounty, to name just a few.

This is a particularly good company if collecting dividends interests you. In fact, it has paid one since 1890 and increased the amount for 64 straight years. This makes Procter & Gamble a Dividend King, a member of the S&P 500 index that has raised its dividends for at least 50 consecutive years. Procter & Gamble's dividend yield is 2.3%. Its ability to increase its payouts through all kinds of economic environments should provide investors with a sense of comfort.

People staying at home boosted Procter & Gamble's results, with fiscal 2020 (ended June 30) adjusted sales increasing by 6%. However, even before COVID-19 started materially affecting results, its first-half sales, excluding acquisitions and divestitures, rose by 5%.

Management has taken steps over the last several years to continue the company's growth, such as selling brands that didn't fit with the overall company, and more recently, focusing on innovation. For instance, it recently launched Microban 24, a line of cleaning products that kill bacteria for 24 hours. The launch was well timed given COVID-19, and it couldn't keep up with demand. Management expects annual sales of about $200 million, which is ahead of its initial projection.

With strong brands, reinvigorated growth, and reliable dividends, this one's a keeper.