The year 2017 was a great one to be an investor.

The S&P 500 gained 19% last year, ending every month higher than the month before -- the first time that's happened in history. Tech stocks within the S&P did even better. The S&P 500 Information Technology Index was the standout sector, gaining 36% for the year. 

With that in mind, let's find out why Activision Blizzard, Inc. (NASDAQ:ATVI), NVIDIA Corporation (NASDAQ:NVDA), PayPal Holdings, Inc. (NASDAQ:PYPL), and Micron Technology, Inc. (NASDAQ:MU) were the four best performers in the S&P's information technology sector for the year.

A spark and an graph arrow rising from a man's hand.

These tech stocks soared in 2017. Image source: Getty Images.

MU Chart

Data by YCharts.

Game on!

Video game developer Activision Blizzard had a banner year in 2017: It started on an up note and never looked back. Early in the year, the company revealed that Call of Duty, its first-person shooter game, became the No. 1 franchise in North America for the eighth consecutive year, and the No. 1 console franchise globally for seven of the last eight years. 

Later in the year, Blizzard announced that Overwatch, its multiplayer shooter game, became "the eighth billion-dollar franchise in Activision Blizzard's portfolio." The game reached $1 billion in sales and became the company's fastest-growing franchise. It also became the basis for Activision's recently launched esports league.

Overwatch characters Reaper and Sombra firing weapons at an unseen assailant.

Overwatch was a hit in 2017. Image source: Activision Blizzard.

Activision Blizzard beat its forecasts in each quarter it reported in 2017. Spending on virtual currency, downloadable content, and micro-transactions have helped the company exceed expectations in advance of major game releases to come in early 2018.

Activision Blizzard stock gained 75% in 2017, making it one of the best performers of the year.

A chip to rule them all

For many years, NVIDIA's graphics processing units (GPUs) have been the most sought after among serious gamers, and that didn't change in 2017. In the third quarter, the company commanded 72.8% of the discrete desktop GPU market. Gaming produced more than 59% of the company's revenue in its 2018 fiscal third quarter (which ended Oct. 29, 2017).

NVIDIA also continued to be the leading provider of GPUs for the artificial intelligence (AI) market, which has become an increasingly important part of the company's growth. Data center revenue for AI has produced triple-digit year-over-year growth in each of the last six quarters and now generates 19% of NVIDIA's total sales. 

The GeForce GTX 1080 GPU.

Gaming and AI made it a banner year for NVIDIA. Image source: NVIDIA.

NVIDIA shows no signs of slowing down. In fact, it announced that its latest Volta GPU became the processor of choice of "every major internet and cloud service provider and computer maker." 

NVIDIA crushed it in 2017, and its stock jumped 81%.

How do you want to pay for that?

PayPal investors couldn't have asked for a better year from the payment processor. In a move designed to give its users more choice, the company partnered with many of the largest credit card issuers and payment processors, putting together a veritable who's who of financial giants.

These moves resulted in record-breaking additions to PayPal's customer accounts, increasing its base to 227 million. Each customer is also spending more, with the number of payment transactions per active account growing to 33.6 over the trailing 12 months. 

PayPal headquarters building in San Jose, California.

PayPal partnered with ... well, everybody! Image source: PayPal.

One of the company's biggest growth drivers could just be getting started. "Venmo" became a verb in 2017, and the person-to-person social payments app grew like wildfire. Venmo produced $35 billion in total payment volume over the preceding 12 months, up 97% over the prior period. The app can now be used to pay merchants as well, providing PayPal with a new source of revenue.

Each of these factors played into PayPal's memorable year, and its stock gained 86% as a result.

Do you want chips with that?

Micron was another big benefactor of the developments in AI in 2017, providing the memory chips required. The company is one of the largest producers of DRAM and NAND flash memory chips. Significant shortages of memory and higher prices drove the company from losses the year before to substantial profits.

The company is also benefiting from advances in autonomous driving, as its processors are key to helping self-driving cars detect obstacles and road hazards.

Micron building in Allen, Texas.

Micron seized the moment. Image source: Micron.

These trends drove massive growth for the semiconductor company. In its fiscal 2018 first quarter (which ended on Nov. 30, 2017), Micron reported revenue of $6.8 billion, up 71% year over year, while net income grew to $2.68 billion, up nearly 15 times compared to the prior-year quarter.

These developments showed in the stock price, as Micron gained 87% last year.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.