Shares of cloud computing leader Salesforce (CRM -1.10%)have surged roughly 20%  since the beginning of the year. Meanwhile, the S&P 500 is barely breaking even over the same stretch. And the tech sector at-large, represented by the Nasdaq, is up just more than 6%.

Here's a look at why Salesforce is pulling away from the market so far in 2018.

AI is trending; analysts are fawning

For starters, Salesforce shares came out of the gates strong in January, climbing 11% during the month. It was potentially due to the company's announcement of a partnership with IBM (NYSE: IBM) related to artificial intelligence (AI) and a stock upgrade by Barclays analyst Raimo Lenschow.

AI is such a hot topic right now, that the mere mention of it could have impacted the market's longer term opinion of Salesforce's growth potential. And the combination of the acronyms AI and IBM is important, as Salesforce is both collaborating with and emulating IBM in its creation of "Einstein," a product with artificial intelligence that brings to mind IBM's well-known "Watson." Salesforce sees Einstein as instrumental in making its customers better at their jobs -- i.e., closing sales, managing customer relationships -- and therefore creating a deeper relationship with large corporate clients.

The upgrade by Barclays meanwhile, was noteworthy because it was part of a trend of analysts increasingly fawning over this stock. The total percent of analysts recommending Salesforce as a "strong buy" went from 88% to 93% during the last month. For more context, one analyst thinks it's a "moderate buy" and one thinks it's a "hold." None consider it a "sell."

A crowd at a technology conference.

Salesforce's Dreamforce conference. Image Source: Salesforce

Salesforce records biggest quarter ever

Salesforce pulled away from the market even more in February, primarily due to its announcement of record fourth-quarter results.

Revenue for the quarter came in at $2.85 billion, a 24% increase over the $2.29 billion in the same period of the previous year. The company eclipsed the $10 billion mark in revenue for the year. More impressively, Salesforce generated $20 billion in backlogged contracts -- classified as both deferred revenue and unbilled deferred revenue -- which provides some visibility to revenue in the years ahead. 

Salesforce's service cloud -- one of four $1 billion-plus revenue cloud offerings -- was a key driver of growth in the quarter. It's smaller than the sales cloud, but indicates an important trend for the company's future: Salesforce is increasingly capable of cross-selling major customers from what I would call its "gateway" cloud (sales) to its service and marketing solutions. Successful cross-selling indicates customers are satisfied with the relationship, it creates a "stickier" customer base, and it involves less marketing spend for Salesforce. Analysts and investors love to see all of these things moving in a positive direction.

Salesforce's breadth of success will be hard to beat

Finally, Salesforce has its sights set on $20 billion in revenue sometime between 2020 and 2022. On the conference call, the company's president and COO said the latest quarter was evidence the company was "hurtling down the highway toward $20 billion."

At the moment, it's hard to disagree, no matter the type of investor. Salesforce is a darling of the tech sector because it's maintained top-line average revenue growth of 30% for five years.  Value investors like it for its expanding "economic moat", which is primarily attributable to high switching costs for customers and the network effect created by data and AI.

And investors keen on exceptional leadership and company culture can get on-board with the fact that Salesforce CEO Marc Benioff is recognized in the top 15 of Glassdoor's "Highest Rated CEOs" list and the company is Fortune's No. 1 Company to Work for in 2018.

The most important thing(s)

Truth be told, there's not one thing driving Salesforce's stock higher. There's a variety of very important things I would summarize as follows: a cloud product in high demand, a suite of complementary products that create an ecosystem, and a workforce that's well-trained to use predictive data to serve and cross-sell that entire suite.

As any great CEO will say, the results in a single quarter are not the result of work done in that quarter; it's the effect of work done and decisions made quarters -- even years -- prior. Salesforce's recent momentum is a result of the company reaping what it's been sowing for a long time.