The stock market got pummeled last year. In fact, the broad-based S&P 500 and the tech-heavy Nasdaq Composite produced their worst returns since the financial crisis in 2008, as economic uncertainty sent both indexes tumbling into a bear market.

But patient investors need not worry. The S&P 500 and the Nasdaq Composite have recovered from every past downturn, and there is no reason to think this one will be any different. Eventually, another bull market will come along, and both indexes will recoup their losses.

In the meantime, HubSpot (HUBS -2.82%) and Etsy (ETSY -0.86%) have seen their share prices fall 61% and 55%respectively from all-time highs, creating an attractive buying opportunity.

1. HubSpot

HubSpot provides customer relationship management (CRM) software to small and medium-sized businesses. Its CRM suite includes productivity tools for marketing, sales, service, and operations, coupled with a content management system that empowers businesses to attract visitors and engage leads with personalized websites. HubSpot gives businesses the tools they need to delight their own customers through every stage of the customer journey.

HubSpot competes against larger CRM vendors like Salesforce and Oracle, but its freemium pricing strategy and easy-to-use products helped the company hold its own. HubSpot ranks as the leader in CRM software among small businesses, and it has a strong presence in the mid-market niche as well, according to research company G2. Better yet, G2 recognized HubSpot as the second-best global software seller in any category in 2022, based on its strong market presence and high user satisfaction scores.

Despite challenging economic conditions, HubSpot issued a solid third-quarter report. Its customer count increased by 24% to 158,900, and the average subscription revenue per customer increased by 7%. That highlights its ability to win business with new clients, then expand its relationship with those clients over time. That compounding effect led to impressive growth on the top and bottom lines. Third-quarter revenue increased 31% to $444 million, and non-GAAP earnings climbed 38% to $0.69 per diluted share.

HubSpot is set to maintain or even accelerate its momentum in the future, especially under more favorable economic conditions. The company says its addressable market will grow at 10% annually to reach $72 billion by 2027, and its track record of continuous innovation should instill confidence in investors. For instance, HubSpot introduced payment processing capabilities last year, and it recently added new commerce tools to its CRM platform, both of which make its offering more robust and compelling.

Shares currently trade at 10.1 times sales, an attractive discount compared to the three-year average of 17.1 times sales. That's why this growth stock is worth buying.

2. Etsy

The e-commerce industry is fiercely competitive, but Etsy created a niche for itself by catering to small sellers and focusing on non-commoditized products. Its marketplace features unique and creative goods across a broad range of shopping categories, from apparel and jewelry to home décor and beauty.

Better yet, Etsy sellers will often personalize or customize items for individual buyers, providing a level of service rarely found in the retail industry. That value proposition clearly resonates with consumers, as Etsy ranks as the fourth-most-visited online marketplace in the United States.

Additionally, the asset-light nature of its business is particularly attractive. While Etsy supports its sellers with services like payment processing and advertising, the company does not engage directly in commerce, which keeps its inventory costs low compared to other retailers. That means Etsy can spend more on product development and marketing. For instance, the company has worked relentlessly to improve search capabilities on its platform.

Turning to financial performance, Etsy disappointed investors with weak results of late, especially compared to the incredible growth it reported during the worst of the pandemic. Third-quarter revenue climbed just 12% to $594 million, and adjusted EBITDA dropped 4% to $168 million. But those figures say more about the economic environment than they do about Etsy.

Post-pandemic Etsy is a much stronger business than pre-pandemic Etsy. The number of active buyers doubled over the last three years, and spend per active buyer climbed 33%.

More importantly, Etsy is well positioned to reaccelerate growth when economic conditions improve and consumer spending rebounds. The company captured less than 3% of its $466 billion addressable market, but its recognizable brand and asset-light business model should help Etsy further increase buyer engagement over time.

Shares trade at 8 times sales, a nice discount to the three-year average of 10.9 times sales. That is a buying opportunity for long-term investors.