Bear markets come and go, but history has taught investors time and time again that bull markets not only tend to outlast these periods, but eventually drive stocks higher than before the downturn hit. Both bull and bear markets can present opportunities for the long-term investor who is focusing on buying great businesses, and not just share prices.

If you have cash to put to work, it's always a good time to add to or start positions in quality businesses with wide moats and compelling long-term growth stories. A $1,500 investment in one or both of these stocks could bring in meaningful returns for your portfolio over the coming years. Let's take a closer look.

1. Eli Lilly

Eli Lilly (LLY 0.05%) is one of the largest pharmaceutical companies in the world by market capitalization and revenue. With close to 150 years in business under its belt, it's safe to say that this is one of the mainstay companies to consider if you're looking to invest in the healthcare space.

Over the trailing-five-year period, Eli Lilly has delivered investors a total return of close to 540%. That's roughly four times the return of the S&P 500 during that same time frame. Although its dividend yields less than 1%, its dividend payout has increased by approximately 100% over that five-year period.

Eli Lilly has made headlines more recently for the success of its weight loss drug Zepbound and diabetes drug Mounjaro, both of which are derived from the same active ingredient, tirzepatide. Mounjaro garnered the regulatory green light in 2022, while Zepbound was just approved late last year. Both of these drugs have years left of revenue potential in them before a patent cliff strikes.

Eli Lilly also benefits from a portfolio of existing blockbuster drugs, such as cancer drug Verzenio and diabetes medication Jardiance. The company reported total revenue of $34 billion in 2023, a 20% increase from the prior year. Over the trailing-five-year period, the company has grown its annual revenue by approximately 50%.

If it's steady returns and dividend income you're looking for, Eli Lilly hits the mark on both fronts.

2. Shopify

Shopify (SHOP 0.83%) has gone through its fair share of ups and downs over the last several years. From the surge of its popularity with investors during the pandemic to some key operational changes it implemented to stem the tide of rising costs and a difficult operating environment, Shopify has continued to press forward as a business.

A series of well-publicized layoffs and the divestiture of most of its logistics business just about a year after expanding into the fulfillment space understandably worried some investors. However, the company's realignment to focus on its core, asset-light business model appears to be paying off in spades.

Shopify's bread and butter comes from its two core businesses. The first are subscriptions, such as the monthly or annual costs that merchants pay to use the platform. The other encompasses a wide range of merchant solutions, which include services such as Shopify Pay and Shopify Point of Sale.

Merchant solutions are far and away the largest driver of revenue growth for the business. In 2023, Shopify reported total revenue of $7.1 billion, a 26% increase from the prior year. Of that total, $5.2 billion was attributable to Merchant Solutions revenue, a 27% increase from 2022, and $1.8 billion came from Subscription Solutions revenue, a 23% year-over-year hike.

Shopify's gross margin for the 12-month period was just shy of 50%. And where the company reported negative free cash flow of $186 million in 2022, the company raked in $905 million of free cash flow in 2023. Shares of the business are up single digits from the start of the year, but roughly 75% from one year ago.

With a company at this stage in its maturity, you're not going to get lightning returns overnight, but this stock has proven its ability to significantly outpace the market with time.