The S&P 500 (SNPINDEX: ^GSPC) is roughly 9.3% below its all-time high, and therefore 9.3% away from once again trading in bull market territory (using the most conservative definition of a bull market). That threshold is worth highlighting because the index returned an average of 186% during the nine bull markets that have taken place since 1970, and history says the next bull market is inevitable.

Ahead of that coming rally, investors should consider Shopify (SHOP 1.11%) and SolarEdge Technologies (SEDG 2.81%). They are key players in growing markets, but both stocks trade at discounted valuations that leave room for substantial returns. Indeed, Shopify and SolarEdge could see their share prices triple by 2028 under the right circumstances.

Here's why.

1. Shopify

Shopify is the retail operating system behind millions of businesses. Its software provides merchants with a single interface where they can manage sales across physical and digital channels, including marketplaces like Amazon and Etsy, social media like TikTok, and branded websites. Shopify also provides ancillary merchant services that further simplify commerce, including solutions for payment processing, logistics, and (most recently) expense management.

Shopify powered 10% of U.S. retail e-commerce sales in 2022, making it the second-largest domestic e-commerce company. Shopify is also the market leader in e-commerce software, and its enterprise-grade platform (Shopify Plus) is the gold standard in omnichannel commerce software. That last point is particularly important because Shopify Plus supports wholesale e-commerce, a market roughly four times larger than retail e-commerce.

Shopify had a strong showing in the second quarter. Revenue increased 31% to $1.7 billion and non-GAAP net income improved to $178 million, up from a loss of $32 million in the prior year. Additionally, its merchant attach rate (revenue as a percentage of gross merchandise volume) reached an all-time high of 3.08%, meaning merchants are adopting more ancillary services.

Going forward, retail e-commerce sales are expected to increase by 8% annually to reach $8 trillion by 2030, and wholesale e-commerce sales are forecasted to increase by 20% annually to reach $33 trillion over the same period. Shopify has proven its ability to take market share in years past, so its revenue growth should lean toward the high end of that range. Indeed, Morgan Stanley expects the company to grow revenue at 19% annually over the next decade.

The case for 200% returns by 2028: Shares of Shopify trade at 10.9 times sales, well below the three-year average of 26.7 times sales, and the company has a market cap of $68 billion. But that figure could increase threefold by 2028 if (1) Shopify grows revenue at 19% annually as Morgan Stanley expects and (2) shares trade at 13.6 times sales at the end of that period. That valuation seems reasonable in the context of the three-year average.

As a caveat, 200% returns are by no means guaranteed, but patient investors should feel comfortable buying Shopify stock today.

2. SolarEdge Technologies

SolarEdge specializes in power optimizers, inverters, and cloud-based monitoring software for residential and commercial solar installations. The company has more recently branched into adjacent areas, including energy storage solutions, energy management software, and electric vehicle (EV) chargers.

Its brand carries significant weight with customers (i.e., installers and distributors) because SolarEdge is (1) the largest invert manufacturer outside of China and (2) the creator of the power optimizer, devices that maximize energy production by mitigating losses due to inconsistencies between solar modules.

SolarEdge delivered phenomenal financial results in the second quarter. Revenue rose 36% to $728 million on particularly strong demand for inverters, though optimizers and batteries also contributed to growth. On the bottom line, non-GAAP net income increased 177% to $157 million. However, management warned that momentum will ebb in the near term as high interest rates and excess channel inventory suppress demand. Current-quarter guidance calls for single-digit revenue growth at the midpoint.

There is a silver lining to the situation for patient investors. Temporary headwinds have driven the stock to its cheapest valuation in years, yet those short-lived obstacles will ultimately have no impact on the long-term investment thesis: Renewable energy is inevitable. And the Inflation Reduction Act of 2022 promises to accelerate that tailwind by extending the 30% federal solar tax credit through 2032.

On that note, Grand View Research estimates that the solar energy systems market will grow at 16% annually through 2030. However, investors should expect faster growth from SolarEdge given its strong position in the inverter space and burgeoning opportunities in areas like commercial energy storage and energy management software. Indeed, Morgan Stanley says sales could grow at 21% annually through the end of the decade.

The case for 200% returns by 2028: Shares of SolarEdge trade at 1.9 times sales, the cheapest valuation in more than three years, and the company has a market cap of $6.7 billion. But that figure could increase threefold by 2028 if (1) revenue grows at 21% annually as Morgan Stanley is projecting and (2) shares trade at 2.1 times sales at the end of that period. That valuation seems quite reasonable given that the five-year average is 5.8 times sales.

Readers should bear in mind that 200% returns are not guaranteed, but this growth stock is still a compelling investment option at its current valuation and I think patient shareholders will be well rewarded.