The mantra that is often repeated to us when it comes to investing is "stay invested through thick or thin." But this can be difficult to do when markets are crashing around us and uncertainty reigns. Businesses that may have seemed infallible now suffer from plunging demand and growing losses. However, I believe that some companies can bounce back strongly once the economy regains its footing. These are the companies that may suffer from short-term challenges, but that will still go on to enjoy long-term growth.

Here are two stocks you can consider holding over generations.

Person putting on sports shoes while seated

Image source: Getty Images.

Nike

Nike (NKE -1.00%) is undoubtedly one of the world's strongest sports and apparel brands. Founded in 1964 and then listed in 1980, the company has built up a reputation for quality and innovation, primarily in its athletic shoes. The COVID-19 pandemic forced the temporary closure of 90% of Nike-owned stores for roughly eight weeks in the quarter that lasted from March 1 through May 31. These closures resulted in revenue plunging by 38% year over year. With overheads still high during the period, Nike ended up reporting a net loss of $790 million for the quarter.

Although this may look bad, investors need to remember that the closures were temporary and in line with lockdown and movement control measures implemented by governments around the world to control the spread of the coronavirus. As of late June, around 90% of Nike-owned stores are open around the world, and all stores in China have reopened. Digital sales picked up the slack during the pandemic, increasing 75% year over year during the quarter and making up 30% of total revenue.

Nike's innovation continues to shine during this crisis, with its sports research lab coming up with a new approach to footwear design in the form of the Nike NEXT% program. Ground-breaking research involving designers and engineers led to the prototype of the Nike Air Zoom Vaporfly, yet another leap in running shoe design. The company is also launching a Nike Air Max Up designed for women for their fall collection.

The company's digital presence is set to grow even stronger with the launch of a new store concept called Nike Rise that will link the digital and in-store shopping experience with the customer's preferences. The first Rise store opened in Guangzhou, China, on July 9.

Mastercard

Mastercard (MA -0.10%) is one of the largest financial payment companies in the world. The company has around 2.2 billion Mastercard-branded credit and debit cards in circulation, and handled transactions with a gross dollar volume of $1.57 trillion in the first quarter of 2020, up 8% year over year. Mastercard reported a healthy 3% year-over-year growth in net revenue, while net income inched up by 1% year over year.

However, the results also showed the effects of COVID-19 in April, when switched volume and transactions were down around 25% in the week ended April 7. Investors, therefore, need to brace for a poor set of earnings for the second quarter as the bulk of global lockdowns occurred during April and May. By the week ended June 21, the relaxation of social distancing mandates and the reopening of many economies around the globe helped volumes to recover, with switched volume up 5% year over year in the U.S. and switched transactions up 1% year over year. Cross-border volume, however, remained depressed and was still down 41% year over year.

These numbers show that Mastercard's fortunes are closely tied to the health of various economies, and the eventual recovery will lift the company's financial performance along with it. With Mastercard's strong franchise and reputation, the company should have no problem regaining its footing once the pandemic is over.

Consumer habits are also changing and shifting toward contact-free, digital payments. Mastercard's research shows that globally, almost seven in 10 consumers say their shift to digital payments will likely be permanent, while nearly half plan to use less cash even after the crisis abates. These trends bode well for Mastercard's long-term growth.

The company is also active on the acquisitions front and agreed to purchase Finicity for $825 million in late June. Finicity is a leading North American provider of real-time access to financial data and insights, and the acquisition is meant to strengthen Mastercard's existing open banking platform to enable a greater choice of financial services.