What happened

Shares of Microsoft Corporation (MSFT 0.37%) are up about 23% so far this year, according to data provided by S&P Global Market Intelligence, as a positive analyst note at the beginning of the year and strong third-quarter earnings boosted investor sentiment.

So what

Microsoft's shares followed the market fairly closely for the first couple of months this year, but then started their upswing shortly after a positive note from Morgan Stanley's Keith Weiss. The analyst made the case that Microsoft was on its way to becoming a $1 trillion company and that Microsoft's dominance in the cloud computing market will continue to spur growth. Weiss also increased his price target from $110 to $130.

Microsoft's logo in front of one of its buildings.

Image source: Microsoft.

Microsoft shares then began to climb higher at the end of April, and continued through May after Microsoft reported its third-quarter results. The tech giant's sales were up 16% year over year to $26.8 billion, and net income jumped 35% to $7.4 billion.

"Our results this quarter reflect the trust people and organizations are placing in the Microsoft Cloud," CEO Satya Nadella said at the time.

Microsoft continues to benefit from its cloud computing moves. With the company currently taking the No. 2 position in the public cloud market, behind Amazon, Microsoft investors are seeing the benefits of the company's long-term cloud pursuits.  

Now what

Microsoft's shares continued to climb this month, likely on news that the company had purchased GitHub, a platform where software developers create and share code. Microsoft is buying the company in a $7.5 billion all-stock deal, and management said that the "acquisition will empower developers, accelerate GitHub's growth, and advance Microsoft services with new audiences."

The purchase likely won't bring significant revenue to Microsoft's bottom line, but it will help the company continue to build a strong community of developers that it hopes it can then bring into its product and services ecosystem.

The company's shares may also be ticking up as investors anticipate Microsoft's fourth-quarter results, which will be released on July 19. Analysts' consensus earnings estimate for the quarter is $1.08 per share, which would be an increase from the company's $0.98 per share in the year-ago quarter.