Investing is complicated, as shareholders of marketplace Etsy (ETSY 0.34%) already know.

The S&P 500 has rallied in 2023, with the index up 19% year to date as of this writing. But Etsy has sat the rally out, with its stock price down 34%. The stock is down even though the company's revenue is at an all-time high.

This was a bad year for Etsy, but 2024 could be a much better story.

Good riddance to 2023?

Etsy's drop can be simply explained as follows: The company's growth rate dropped in 2022, leading to a lower valuation. And in 2023, its profitability sank and dropped the valuation lower -- the price-to-sales (P/S) ratio even hit an all-time low earlier this year.

ETSY Revenue (Quarterly YoY Growth) Chart

ETSY Revenue (Quarterly YoY Growth) data by YCharts

Regarding growth, most investors are aware that Etsy's sales took off in 2020 and 2021 thanks to a surge in online pandemic shopping. The company's revenue was up 111% and 35% in 2020 and 2021 respectively. Revenue growth of just 10% in 2022 and 8% year to date in 2023 look quite pedestrian by comparison.

The funny thing is, Etsy's revenue through the first three quarters of 2023 is up 72% from the comparable period of 2020, which works out to be about a 20% compound annual growth rate (CAGR). Most investors would be quite happy with a 20% CAGR, but they don't like the lumpiness of the growth.

Moreover, Etsy did turn in steep net losses for a period of time. But most of this was from bad acquisitions. Those acquisitions wasted money unnecessarily. But from a structural perspective, Etsy still has good operating profit margins, as the chart below shows.

ETSY Operating Margin (TTM) Chart

ETSY Operating Margin (TTM) data by YCharts

Bring on the new year

Etsy's growth has looked lackluster as it lapped extreme growth rates. And it registered some losses as it wrote off some bad acquisitions. But those things are in the rearview mirror as it enters 2024. And the stock can reclaim lost ground if the company finds a way to return to better growth.

I believe Etsy can indeed return to better growth. And my optimism starts with the company's solid foundation. Etsy's core marketplace had record active buyers of 91.6 million in the third quarter of 2023. Active sellers are also at an all-time high of 8.8 million.

To grow from this solid foundation, Etsy is using generative artificial intelligence (AI) to improve its search capabilities. The basic idea is that generative AI can improve both the relevance and quality of search, with the algorithm even learning which listings have better visual appeal. And the hope is that better search will lead to better sales conversions.

I love the simplicity of this investment thesis for Etsy in 2024. The buyers are there in record numbers. And the listings are there, with over 120 million as of Q3. If generative AI can simply lead to better sales conversions, then revenue growth should pick up.

In conclusion, Etsy's stock price has fallen to a near record-low valuation but business is still near an all-time high. That's a good combination.

In a bad scenario, Etsy's growth will remain modest and the stock will post minimal gains. But in a better scenario -- the one I'm betting on -- management finds a way to use generative AI in a smart way to increase sales conversions, stimulating growth. And that could lead to market-beating gains in 2024 and beyond for Etsy stock.