Although most stocks are down this year, former high-fliers have been especially hard-hit by the market's shift in preference from growth stocks to more defensive, consumer-oriented companies. So far in 2022, has lost 56% of its value, chipmaker Nvidia is down 48%, and Starbucks is off 33%.

Yet not all growth stocks have been equally affected. A few, in fact, have not only held up well, but are poised to continue doing so over the next three years -- among them, Dollar Tree (DLTR 0.14%) and General Mills (GIS 1.69%).

$100 bill on computer keyboard with a rising arrow.

Image source: Getty Images.

Deep discount opportunity

The Labor Department on Wednesday announced that inflation hit a whopping 9.1% year over year in June, the steepest run-up in consumer prices since 1981, and higher than most economists' estimates. That alone is a good enough reason to expect deep discount retailer Dollar Tree to perform well in the immediate future and for at least the next few years. In this environment, consumers are going to seek out stores where they can get the most bang for their buck, and the dollar stores will be among the prime beneficiaries.

While it wasn't because of inflation that Dollar Tree in recent years abandoned the everything-for-one-dollar threshold it used to operate at, it was a timely decision, as it gave consumers time to adapt to seeing higher-priced items on its shelves.

When it finally had to announce it was going to let that $1 target slide further because of inflation, its customers were already conditioned to accept the change. They also realized they were getting more name-brand products, better quality, and larger sizes from the retailer, too. And Dollar Tree hasn't really gone overboard on the higher prices: Most of its products are still $1.25 or less, but there is a larger selection of goods that cost $2 or $3, and customers have fully embraced it.

Sales jumped 6.5% in the first quarter while gross profits surged almost 20% higher as comparable sales at its namesake store jumped 11% year over year. Its Family Dollar chain, which always had multiple pricing tiers and enjoyed a large increase in sales last year thanks in part to the federal stimulus checks, saw its comps fall 3%.

Yet that comps decline was also in part the result of a rodent infestation at a distribution center that required the company to temporarily close more than 400 stores and recall a slew of products. That impacted comps by 200 basis points, so the chain's performance was actually better than the headline number would indicate.

Although Dollar Tree stock is up 17% in 2022 and 66% higher over the past 12 months, it still trades at a reasonable 17 times next year's earnings projections and at a price/earnings-to-growth ratio of 1.5, based on the long-term 16.5% earnings growth rate forecast by Wall Street analysts. This deep discounter is still a discount opportunity to buy.

Less is more

Cereal maker General Mills has been socked by inflation, which contributed to margin pressure in its fiscal 2022 fourth quarter (ended May 29). Now, it's taking the opportunity to focus more narrowly on the North American market in brands and categories where it sees the potential for the greatest profits to be made.

As a result, it dumped its European yogurt business last year, sold its majority stake in an Israeli dough-manufacturing joint venture, sold its European dough unit, and is selling its Helper and Suddenly Salad brands to Eagle Family Foods Group for $610 million. At the same time, it's making more acquisitions in the pet snacks space, having added several brands to its Blue Buffalo division in its fiscal 2022 first quarter, as well as a North American foodservice pizza crust business.

General Mills has benefited from the market's rotation away from tech stocks and into consumer discretionary stocks. Its shares have steadily risen over the past year and sit 35% above their 52-week low.

It has a portfolio of over 100 brands -- including some of the best-known in their categories, such as Betty Crocker, Cheerios, and Pillsbury. That, coupled with the fact that food generally tends to be a recession-resistant category, makes General Mills perfectly positioned to capitalize on the current environment as well as the recession many economists see just ahead.