It seems like nobody wants to own Spotify (SPOT 1.23%) in 2022. The business is unprofitable and investors are worried about competition from large technology companies like YouTube, Apple, and Amazon. As of this writing, shares are down 68% year to date, while the S&P 500 is only down 19%.

This bearish performance should perk up the ears of contrarian-thinking investors trying to find value stocks for their portfolios. Spotify looks like a promising candidate with a durable business model, a large market opportunity, and a clear path to margin expansion. Should you buy Spotify before 2022 ends? Let's investigate.

Lack of margin expansion

It's sometimes hard to identify why a stock falls, but for Spotify, there's one clear reason the stock sold off this year: profit margins. In a vacuum, this would be a major concern for shareholders, but it can be easily explained given the company's recent investments in advertising and podcasts.

Over the past five years, Spotify has invested heavily in expanding the content on its platform. It has acquired multiple podcast studios and two podcast distributors, and it has built out a new dynamic advertising marketplace. From a market-share perspective, this has worked out wonderfully with Spotify quickly eclipsing Apple Podcasts as the No. 1 podcast platform in the United States and many markets worldwide.

But from a financial perspective, the company has sacrificed profitability in the near term to make this happen. Gross margins for the ad-supported segment, which include the costs from podcast-related spending, were just 1.8% in the third quarter, and they have been anemic for the past two years or so. This has impacted Spotify's consolidated gross margins, which have been stuck at around 25%. Management says that in 2023 ad-supported gross margins will start to expand again, which will help improve overall margins and eventually lead to underlying profitability.

There is still a large opportunity to attract users and grow podcasts

The one undebatable highlight of Spotify's business over the past few years has been user and subscriber growth. Monthly active users (MAUs) hit 456 million in the third quarter, up 20% year over year and up significantly from the same quarter of 2018 when the service only had 191 million MAUs. Premium subscribers have followed a similar path, hitting 195 million last quarter compared with just 87 million in 2018. All indications are that music streaming will continue its upward trend this decade with analysts projecting industry revenue to grow 14.7% annually through 2030.

There's also a decade-long opportunity to grow podcast engagement and advertising on Spotify. It's predicted there will be 424 million podcast listeners around the world by the end of 2022. With the rise of the mobile internet, streaming connectivity, and the decline of analog radio, podcast listenership has a clear path to grow over the next three to five years, and probably longer. Spotify should be able to benefit as the market leader if it can scale up its advertising capabilities along with the increase in usage.

Shares are cheap if you look out a few years

With the stock in the gutter, Spotify now trades at a market cap of just $14.4 billion. In the past 12 months, the company has generated $12.2 billion in revenue. Over the long term, management thinks Spotify's consolidated business should generate 10% net profit margins, which would equal $1.2 billion in annual earnings based on the past year of revenue. At today's market cap, that amounts to a price-to-earnings ratio (P/E) of just 12, well below the market average.

The stock could look even cheaper a few years from now if revenue continues to grow at a double-digit rate, as it has for the previous few years. From this perspective, the stock is an easy buy if you believe the company can continue riding the audio streaming wave and expand its profitability over time.