What happened

Amazon.com (AMZN -1.22%) stock gained 28.4% in 2018, according to data from S&P Global Market Intelligence

Despite the sharp pullback in the e-commerce and cloud-computing titan's stock since early October, that's still a great showing, considering the overall market was down last year. The S&P 500 and Nasdaq indexes returned negative-4.4% and negative-3.9%, respectively.

Moreover, Amazon was only one of two FAANG stocks, along with Netflix, that finished 2018 in positive territory. Facebook was a double-digit loser, while Apple and Google parent Alphabet suffered single-digit losses.

Check out the latest Amazon earnings call transcript.

AMZN Chart

Data by YCharts.

So what

We can largely attribute Amazon stock's solid performance in 2018 to the company's strong quarterly results. In fact, in all four quarters that were reported last year (the fourth quarter of 2017 through the third quarter of 2018), Amazon not only beat, but also whipped, Wall Street's earnings estimates, along its own operating income guidance. (Amazon doesn't provide earnings guidance.)

Here are Amazon's revenue, operating income, and earnings-per-share growth results for the first three quarters of 2018:

Quarter in 2018

Revenue Growth (YOY)

Operating Income Growth (YOY)

Earnings Per Share (EPS) Growth (YOY)

First quarter 

43%

92%

121%

Second quarter

39% 378% 1,168%

Third quarter

29% 966% 1,006%

Data source: Amazon. YOY = year over year. EPS results are based on generally accepted accounting principles (GAAP).

The two big themes for all three quarters were:

  • The North America segment's torrid operating-income growth.
  • Amazon Web Services' increasing profitability -- and AWS was already very profitable.

Now what

Amazon stock is looking more attractive from a valuation standpoint than it has in some time. That said, investors should proceed with caution with investing in stocks in general, as the macroeconomic factors -- such as slowing global growth, rising interest rates, and the trade war with China -- that led to the big stock sell-off that began in the fall remain largely unchanged.

That doesn't mean investors should stop buying stocks, but it does mean dollar-cost averaging is more important now. (Dollar-cost averaging involves building your full position in a stock by investing the same dollar amount at some set time interval, such as quarterly.)