For investors, 2022 came in with a bang, but it's set to end with a whimper.

With just two weeks left to go in the year, the S&P 500 is down 20% year to date, while the Nasdaq has lost 32%.

^SPX Chart

^SPX data by YCharts

Investors holding out for a Santa Claus rally may have gotten their hopes dashed by the Federal Reserve last week, which raised interest rates another 50 basis points and also lifted its forecast for interest rate hikes next year, calling for rates to rise another 75 basis points, which added to fears that the economy will fall into a recession next year.

No one knows what 2023 holds for the stock market, but we do know one thing. A bull market will come eventually, just as it has after every bear market in the history of the U.S. stock market, including the Great Depression, the financial crisis of 2008 and 2009, and the coronavirus pandemic crash. 

When the next bull market comes, you'll want to have these three stocks in your portfolio.

The silhouette of a bull.

Image source: Getty Images.

1. Pinterest: A unique opportunity in social media

Like other social media stocks, Pinterest (PINS -2.09%) has fallen sharply over the last year as revenue growth has slowed, profits have fallen, and its user base has temporarily declined.

Those headwinds are the result of difficult comparisons with its performance in 2021, and a general slowdown in digital advertising that has weighed on peers like Alphabet, Meta Platforms, and Snap.

However, there are several reasons why Pinterest looks primed for a comeback. First, after several quarters of declines in its user base, the company returned to solid growth in the third quarter. Its user base grew in all three of its regions, up on a sequential basis from 433 million to 445 million.

Similarly, even in a challenging macro environment, Pinterest continues to grow average revenue per user (ARPU), which rose 11% overall to $1.56, and ARPU in North America, its most valuable market was up 15% to $6.13. That growth is a notable contrast from peers Meta and Snap, both of whom saw ARPU fall in the third quarter.

New CEO Bill Ready is also well versed in e-commerce, having previously run Google's shopping and payments program, and Pinterest is fast making improvements in areas like video and ad performance tracking, making the platform more useful for users and advertisers.

Finally, Pinterest has an edge over other social media platforms because many of its users come to the site with purchase intent, making it more valuable to advertisers. The company is also solidly profitable on an adjusted basis. When the ad market bounces back, Pinterest is likely to be a big winner.

2. Okta: The leader in cloud identity

Okta (OKTA 2.25%) is another tech stock that has crumbled this year, but the sell-off represents a great buying opportunity for the independent leader in cloud identity software. Okta makes tools that allow businesses and employees to seamlessly and securely log in to the apps they need and stay connected.

It's been a rich growth opportunity for the company thus far as revenue grew 37% in its most recent quarter, however, Okta is facing headwinds from the macroeconomic climate and unforced errors in its integration of Auth0, the customer identity software company it acquired last May.

While the company expects sales growth to decelerate, it's also rapidly improved profitability, smashing estimates in the third quarter and showing Wall Street it has more control over its bottom line than previously thought. 

Okta is also expanding its platform by going into adjacent markets like identity governance access and privileged access management, which make its addressable market now valued at $80 billion. That compares to expected revenue this year of less than $2 billion. 

The software stock now trades at a price-to-sales ratio of 6, a great valuation for a company with a long growth path in front of it on the top line and rapidly improving margins on the bottom line.

3. The Trade Desk: An adtech pioneer

The Trade Desk (TTD 0.70%) is the most valuable pure-play ad tech company and a rare growth stock that also delivers strong profitability. 

The Trade Desk operates a self-serve, cloud-based, demand-side platform, allowing customers to manage their ad campaigns in real time.

The product has been overwhelmingly popular as the company has had a customer retention rate of 95% or greater in every quarter over the last eight years, and has steadily grown over the last decade. Revenue was up 31% in the third quarter to $395 million, significantly outperforming its peers and digital ad platforms, and it posted an adjusted net income of $123 million, showing the scalability of its business model allows it to earn wide margins.

The Trade Desk's Unified ID 2.0 is also shaping up to be the leading alternative to third-party cookies, which Google is planning to ban from Chrome by 2024. UID 2.0 is free, but it encourages customer loyalty and more sign-ups for its platform.

Despite The Trade Desk's strong growth this year the stock is still down 50% due to headwinds in the ad industry. If the company can continue to grow through the potential recession, the stock is likely to explode when the economy rebounds and overall advertising demand bounces back.