All three companies have taken the lead as the world's most valuable company by market cap in recent days and all currently are worth more than US$860 billion.

Microsoft briefly held the top spot on Friday 28 November but was overtaken on 3 December by Amazon.

That lead only lasted seconds before it was eclipsed by Apple, which had a market cap of US$877 billion.

The race between the heavyweights reflects better economic conditions for the tech industry after US President Donald Trump and Chinese leader Xi Jinping agreed to temporarily call a ceasefire of sorts in their ongoing trade war.

Microsoft enjoying renewed success

Microsoft had fallen out of touch with the leaders in recent years and had not been the most valuable tech stock at any point since 2010.

Under CEO Satya Nadella, however, it has pivoted towards cloud-based services and its value has more than tripled. It has largely abandoned plans to compete in the smartphone market.

Microsoft has also been successful in diversifying its revenue streams, with core products Windows, Xbox and Surface only making up a combined 36% of its entire revenue. In contrast, 86% of Google’s revenue came from ads.

October 2018 saw most of the tech giants tumble. Netflix was down 40%, Facebook 35% and Amazon and Apple 25%. Microsoft bucked this trend, however, and overtook Alphabet, the parent company of Google, to push its way into the top three.

Optimism around tech stocks have tailed off recently

Earlier this year, both Apple and Amazon touched the US$1 trillion market cap mark but are now facing less rosy outlooks.

Apple has faced declining demand for its iPhone. The company announced lower than expected sales of the smartphone and forecast underwhelming holiday sales. Its stock also took a hit when a major supplier asked for reduced shipments of the iPhone. The company recently announced it would no longer disclose unit sales for iPhones.

Many of the tech giants, including Amazon, Alphabet and Facebook, also face ongoing uncertainty around whether they will face a more robust regulatory framework in the near future.

Writing in Bloomberg, Shira Ovide was not optimistic about Microsoft’s long-term prospects, despite its recent steadiness.

“Microsoft is the tortoise in a technology world obsessed with hares,” Ovide wrote. “We know how that race turned out.”

Header image credit: World Economic Forum