Netflix (NFLX 2.47%) had the best-performing stock in the S&P 500 in 2013. Its shares rose 298%, making it a four-bagger for the year. You would think that CEO Reed Hastings would be pretty happy with that result.

In reality, his reaction wasn't quite what you might expect. Back in October, he said:

Every time I read a story about Netflix is the highest appreciating stock in the S&P 500 it worries me because that was the exact headline that we used to see in 2003.

Hastings is understandably leery of the run-up given the historical volatility of Netflix's share price. Despite those concerns, I'm actually very optimistic about the stock for 2014 and beyond.

A person watches streaming video on a tablet.

Image source: Getty Images.

The formula for success
So what was responsible for those dramatic returns in 2013? It was simple. The actual business made a big turnaround, and the market fell in love with the stock again as a result.

A bit of recent history provides some context. Knowing that its DVD rental business was about to be disrupted by streaming video, management made a difficult decision in 2011 to split Netflix into two parts. One part, which they called Qwikster, would house the DVD-by-mail segment. The streaming video segment would keep the Netflix brand. As everyone knows, it didn't go well. Customers started canceling, revenue growth declined, and the stock price fell far and fast.

Management eventually decided to reverse course, keeping everything under the Netflix umbrella, while investing heavily to grow its streaming business. And that plan is working beautifully.

Subscriber growth picked back up and marched higher in 2013. More importantly, Netflix's contribution margin reversed course in 2013 and is back on the rise. Contribution margin measures how well a company is covering its fixed costs. For Netflix, content acquisitions act as a fixed cost. So a rising contribution margin means that each additional subscriber is contributing more and more profit, which is exactly what investors want to see.

Seeing more subscribers and higher profits, investors got excited and began buying the stock again with tremendous zeal. And it's easy to understand why. Netflix has a huge advantage over the competition in streaming movies and TV shows over the Internet. Investors appear to be confident that Netflix will use that advantage to continue growing its subscribers and cash flow. I think they're right.

Let the good times roll
History shows that companies with sustainable competitive advantages do two things. They deliver more sales growth and earn higher returns on invested capital than the competition for longer periods of time. Those two things usually translate into excellent shareholder returns. 

Netflix has a clear competitive advantage that is bolstered by the following factors:

  1. Netflix provides the best entertainment value out there.
  2. Netflix is everywhere you want to use it.
  3. It benefits from huge amounts of data.

With a price tag of as little as $8 a month, it's easy to understand why people keep signing up for the service. That is an incredible price to access a big (and growing) library of content, ranging from TV shows to movies to original programming. And to make things even better, Netflix is available on a wide variety of devices: smartphones, tablets, smart TVs, gaming consoles, etc., etc. That enables viewers to watch what they want, when they want, without breaking the bank.

Netflix ended the third quarter of 2013 with 40.3 million total streaming members, who logged almost 5 billion hours of viewing. On the surface, both of those numbers show that its business is very strong. But it's the data underneath those numbers that set the stage for the future. Because Netflix knows what people watch, when they watch it, and for how long, it's able to optimize its library of content. In addition, when it's time to negotiate for the price of the content, Netflix knows exactly how much it can pay and still earn a healthy return. And as we've seen in the past, Netflix is willing to walk away from deals if they don't meet management's requirements.

Over the years, Netflix has used its advantage to become one of the most recognizable brands in the United States. And now the company is going global. Although there are still plenty of challenges ahead, and I am sure there will be bumps along the way, Netflix offers plenty of promise to long-term investors. Analysts expect $8.55 billion in sales five years from now and $1.82 billion in EBITDA -- 14.4% and 39.7% annual increases, respectively. That type of continued growth will translate into excellent returns in 2014 and beyond.

The Foolish bottom line
I don't expect Netflix to generate 298% returns again in 2014. But it doesn't have to. Reed Hastings and Co. are running the business for the long term. People can stream entertainment with just about any device they want without paying an arm and a leg. And by offering a wide selection of titles, along with a great viewing experience, Netflix will be able to attract new members in the coming years and keep them coming back month after month. And as the company grows, its financial performance will continue to improve.

As someone who looks to own shares of outstanding companies for the long term, I think Netflix is an excellent opportunity for like-minded investors. When I recommended buying shares of Netflix in the summer of 2012, I was really excited about the company's new direction as a streaming video provider. I'm still excited today, and believe it has a lot of growth ahead of it in the future.

More Foolish stock ideas
Be sure to check out our new exclusive investor hub. The hub features Fool co-founder and legendary tech investor David Gardner discussing some of the most important trends today across all of tech. As a bonus, he also selects a handful of exclusive stock picks that stand to benefit the most from those trends. This free site is available for a limited time only, so click here to get started.