E-commerce platform company Shopify (SHOP -18.59%) has risen like a phoenix out of last year's bear market, more than doubling over the past 12 months. Improving investor sentiment toward growth stocks helped, but Wall Street applauded the company's pivot away from building a logistics service.

Abandoning such a costly endeavor makes Shopify a much lighter and more profitable business. You might wonder whether the stock is worth buying after its recent rally.

Let's take a closer look at Shopify's move away from logistics and the stock's valuation and determine whether investors should buy, sell, or hold shares.

Abandoning logistics has pros and cons

Shopify is an e-commerce software platform that lets businesses set up and manage online stores. Its low- and no-code tools mean entrepreneurs big and small can compete in a digital sales arena typically dominated by titans such as Amazon and Walmart. Its cumulative merchant base ran roughly $50 billion of sales (gross merchandise volume) through Shopify in the first quarter.

The company had begun investing in building a fulfillment network that would help merchants ship products competitively. A big part of this effort was the $2.1 billion purchase of a logistics start-up called Deliverr last year. However, Shopify reversed course in just one year, shedding its logistics business in exchange for an equity stake in the acquiring company, Flexport.

On the one hand, Shopify will save itself a lot of money. Amazon spent tens of billions of dollars on its logistics network, and Shopify's only generated $600 million in free cash flow in its best four-quarter stretch. But Amazon's logistics advantage could be an issue over time. It recently launched a competing service called Buy with Prime that gives entrepreneurs access to Amazon's supply chain.

How does this decision impact Shopify's valuation?

Shopify isn't having growth problems; gross merchandise volume grew 15% year over year in the first quarter. Investors should look for free cash flow to begin recovering to its prior levels now that logistics is no longer the focus.

The good news is that investors can now get a little better insight into share price valuation. Hypothetically, one might assume that free cash flow will rebound back to about $600 million over the next several quarters. You can see how cash flow already has started to recover.

SHOP Free Cash Flow Chart

Data source: YCharts

But at a market cap of nearly $83 billion, $600 million (the peak) in free cash flow is just a 0.7% yield. In other words, investors are getting less than one penny of cash profits for every dollar they invest into Shopify at these levels. That's just not going to cut it for a lot of investors. Shopify could double its previous free cash flow highs to $1.2 billion, and the stock would still have a cash flow yield of just 1.4%.

Should investors buy, sell, or hold?

The stock is still down 60% from its high, a stark example of how euphoric markets were a couple of years ago. Investors may want to approach cautiously or consider waiting until the valuation makes more sense. That may come through a market correction or better monetization on Shopify's part as it continues adding tools and services that can increase how much it earns from a merchant.

Whether it's a sell or a hold depends on an investor's situation. Shopify is a long-term winner that has returned more than 2,000% since its May 2015 initial public offering. There is nothing wrong with holding winners, even if valuations fluctuate over time. Those looking to sell can also use the stock's pricey valuation to justify locking in profits. Either way, keep an eye on Amazon's success with Buy with Prime as a sneaky threat to Shopify over the long term.