Has the stock market bottomed out? The most recent inflation data helped lift equities, but the truth is, the economy isn't out of the woods just yet. Some economists predict a recession could be on its way, and geopolitical issues remain as well. No one can say for sure that market indexes won't sink even deeper.

But a bull market will eventually come -- it always does. Let's look at two stocks worth owning when that happens: Eli Lilly (LLY 3.77%) and Shopify (SHOP 0.29%).

1. Eli Lilly

Eli Lilly is currently trouncing the market, with its shares up by 29% since the beginning of the year.

The company does not owe this performance solely to its financial results. In the third quarter, Eli Lilly's revenue increased by 2% year over year to $6.9 billion; the drugmaker's top line jumped by 7% year over year in constant currency terms. On the bottom line, Eli Lilly's adjusted earnings per share (EPS) came in at $1.98, 12% higher than the prior-year quarter.

Perhaps Eli Lilly's most crucial growth driver has been its pipeline progress. The company earned an important approval this year and is working on other exciting candidates. The approval in question was that of Mounjaro, a treatment for type 2 diabetes. Analysts have high hopes for this medicine. Between its current indications and potential label expansions in treating obesity and other conditions, some experts think it will reach annual peak sales of $25 billion.

For context, rheumatoid arthritis medicine Humira, the best-selling drug in the history of the industry, hit peak sales of $20.7 billion last year. There are more key programs in Eli Lilly's pipeline. They include donanemab, a potential therapy for Alzheimer's disease, and Basal Insulin-FC, an investigational once-weekly product for diabetes.

During the third quarter, the drugmaker submitted an application for lebrikizumab, a potential therapy for atopic dermatitis, to regulatory authorities in the U.S. and Europe. Of course, some of Eli Lilly's existing products continue to perform well, including immunosuppressant Taltz, cancer drug Verzenio, and diabetes medicine Trulicity. In the third quarter, Taltz's sales increased by 15% year over year to $679.9 million.

Verzenio's revenue soared by 84% year over year to $617.7 million, while Trulicity's came in at $1.9 billion, 16% higher than the year-ago period. Eli Lilly's new products will replace older ones, such as cancer medicine Alimta, which is facing generic competition and losing market share. Eli Lilly's prospects are solid thanks to its deep pipeline, and the pharmaceutical company is well-positioned to continue beating the market. 

2. Shopify

Shopify's stock is down by 71% this year. The e-commerce specialist has struggled due to slowing revenue growth and a dim outlook related to macroeconomic challenges. However, it is essential to put these challenges in context. Shopify's dropping revenue growth rates are hardly surprising, considering what has transpired in the past three years. 

The company benefited from a coronavirus-related tailwind in 2020 and 2021, when people did more shopping online due to the pandemic. Once the outbreak slowed and shopping habits reverted to some semblance of pre-pandemic normalcy, it created difficult year-over-year comparisons for Shopify. 

And while a recession could harm Shopify, the company continues to make tremendous progress by helping create and run thousands of online storefronts for small businesses worldwide. In the third quarter, Shopify's gross merchandise volume (GMV) -- the total value of transactions on its platform -- grew by 11% year over year to $46.2 billion.

Shopify's GMV is still moving in the right direction, indicating that its strong business can handle economic slowdowns. The company's revenue during the period increased by 22% year over year to $1.4 billion, while its adjusted net loss was $0.02, compared to an adjusted EPS of $0.08 reported during the third quarter of 2021.

There is a solid argument that Shopify could continue struggling with the market and the economy. Its expenses are rising and with consumers still reining in spending, revenue growth for the next year might not be as impressive as it used to be. The company's persistent net losses won't help its cause either. 

However, Shopify is setting up a solid foundation for the future by providing businesses with everything they need to run their online and brick-and-mortar operations. The company boasts thousands of apps to help merchants customize their stores, as well as a fulfillment network, inventory services, and much more. 

These related services make it hard for Shopify's customers to look elsewhere, granting the company's platform high switching costs -- a potent competitive advantage. Once the economy recovers, look for consumers to increase spending, which should help boost the company's GMV and revenue.

With plenty of room to grow in e-commerce -- including abroad -- Shopify will be able to profit from the investment it is currently making to capture a good portion of this massive worldwide opportunity. Despite its poor performance this year, Shopify has crushed the market since its 2015 initial public offering. In my view, it can do so again for investors with a sufficiently long horizon