(NASDAQ:AMZN) stock has clobbered the market over the mid and long terms. In just the past five years alone, through Nov. 22, shares of the e-commerce and technology behemoth have gained 425%, or more than six times the S&P 500 index's 67% return.

With this type of torrid performance, it's natural for investors to wonder if it's too to buy shares.  

So, is Amazon stock a buy?

View from above of an Amazon fulfillment center, showing solar panels on roof.

An Amazon fulfillment center. Image source:

Yes, Amazon stock is a buy, but...

Amazon stock remains a good buy, as we'll get to. However, there are two caveats:

  1. Only investors who are long-term focused should consider buying shares.
  2. Investors should build their full position by dollar-cost averaging -- investing the same dollar amount at some set time interval, such as quarterly. 

In times like these, both these things become even more important. Many economists are predicting a recession by 2021, so the stock market's decade-long bull market could be nearing its end. Dollar-cost averaging will prevent you from investing your entire position in a stock right before a major market downturn.

That said, here are four major reasons Amazon stock should remain a market-beating investment over the long run.

1. It's led by a founder-CEO who has a lot of skin in the game

Amazon is led by Jeff Bezos, who founded the company in 1994. The Motley Fool has always liked founder-led companies, and a growing number of studies suggests that the stocks of these companies tend to outperform. 

Moreover, Bezos owned 57.78 million Amazon shares after his most recently reported transaction, a sale, on Aug. 1. This stake is worth nearly $101 billion, as of Nov. 22, and gives him 11.7% ownership of the company. Moreover, Bezos isn't the only insider who's betting heavily on the company: Insiders own more than 16% of outstanding shares.

2. Prime is getting even better

This year is one of particularly heaving spending for Amazon, as it's in the process of making its Prime subscription loyalty program even more appealing to customers. It's transitioning its Prime standard free delivery benefit from two days to one. While this upgrade has already begun boosting sales, it's also depressing profits, as expected. This is classic Amazon: sacrificing some current profit to drive long-term growth.

Why is improving Prime so important? It's one of Amazon's most important competitive advantages. Prime members spend about 130% more money per year on its site than customers who are not members, according to Consumer Intelligence Research Partners. That same source estimates that there are 105 million Prime members in the U.S., as of July. (Amazon doesn't disclose its Prime member data.) 

3. It has plenty of growth opportunities

Despite its massive size, Amazon still has considerable room to grow its largest business, its e-commerce business in North America. In the third-quarter, online retail sales accounted for just 11.2% of total U.S. retail sales, according to hot-off-the-presses numbers from the U.S. Census Bureau. Moreover, the company also has much growth potential outside North America. In the third quarter, its international segment pulled in $18.3 billion in sales, considerably less than the North America segment's $42.6 billion. 

Its third segment, Amazon Web Services (AWS), also has a long runway for growth -- and this is a great thing because the cloud computing service is the company's most profitable segment, by far. In 2018, this global market continued to grew at a blistering pace -- 46% year over year, according to market research firm Canalys. That same source estimates that AWS, which is the market leader, had a 32% global market share of this space last year. 

In addition, Amazon continues to enter new markets with tremendous growth potential -- such as healthcare -- and expand its newer businesses, including its grocery and Alexa-powered smart-home businesses. Last year, for instance, it acquired smart-doorbell maker Ring.

4. Amazon stock's valuation is more reasonable than it's been in some time

Amazon stock is currently trading at 24.8 times cash flow from operations (CFO) per share. The five- and 10-year medians for this metric are 27.0 and 27.9, respectively.

AMZN Price to CFO Per Share (TTM) Chart

Data by YCharts.

Why choose this valuation metric? Cash flow metrics are often a better measure of a business' performance than those based on earnings, such as the popular price-to-earnings (P/E) ratio. That's because net income, or "earnings," is simply an accounting measure. And why operating cash flow over free cash flow? Free cash flow can bounce around considerably from quarter to quarter for a company like Amazon that's investing heavily in growth initiatives. Indeed, Bezos' prime (pardon the pun) financial aim has long been optimizing operating cash flow, rather than increasing reported earnings.