Microsoft (NASDAQ:MSFT) shares have rallied nearly 70% over the past three years, crushing the Nasdaq's 40% gain and surprising investors who saw the tech giant as a slow-growth stalwart. That rally was sparked by CEO Steve Ballmer's retirement in early 2014, and then supported by enthusiasm for the ambitious plans of his successor, Satya Nadella.

Image source: Microsoft.

Unlike Ballmer, who milked Microsoft's cash cows of Windows and Office but missed key shifts toward mobile and cloud-based technologies, Nadella pivoted the company toward cross-platform strategies, subscription-based cloud software, cloud platforms, and innovative new hardware such as the HoloLens and Surface Studio.

These moves were costly, but many analysts believe they can get Microsoft back on track. However, some of that enthusiasm might have caused the stock to get ahead of itself. Let's look at six signs that it might be smarter to sell Microsoft instead of buying it at current levels.

1. High valuations

Microsoft currently trades at 30 times earnings. That's higher than the industry average of 29 for business software companies and the S&P 500's current P/E of 25. Part of that valuation can be attributed to the attractiveness of its 2.5% forward yield in a low-interest-rate environment.

Analysts expect Microsoft's earnings to grow 9% annually over the next five years, which gives it a 5-year PEG ratio of 2.3. Since a PEG ratio under 1 is considered fundamentally "cheap," Microsoft can't be considered a value play at current prices.

2. Weak revenue growth

Microsoft also trades at nearly six times sales, which is more appropriate for companies with double-digit sales growth instead of Microsoft's estimated sales growth of 2% this year. By comparison, some peers trade at two and three times sales.

Microsoft's sales growth has accelerated on the strength of its cloud services and platforms, but sales of Windows consumer licenses were throttled by its year-long giveaway of Windows 10 for most Windows 7 and 8 users. Microsoft's growth isn't strong enough to justify its premium valuation.

3. Expensive growth strategies

Giving out Windows 10 as a free upgrade, investing in new features for its cloud services, developing new hardware, and buying big companies like LinkedIn to expand its ecosystem is a costly strategy. Moreover, many of the cloud and mobile markets Microsoft is expanding into are highly competitive ones with declining margins.

Microsoft has kept its costs under control and its margins stable, but there's always the chance that big buys such as LinkedIn, which it closed on for over $26 billion earlier this month, will lead to "diworsification" and result in big writedowns similar to its ill-fated acquisition of Nokia's handset division.

4. The mobile death of "One Windows"

The crux of Nadella's new Windows strategy is to make it a multiplatform OS. That "One Windows" vision includes the same OS and app store running across PCs, tablets, smartphones, and Xbox consoles. For tablets and smartphones, a feature called Continuum converts the devices into full desktops.

That strategy sounds great, but Microsoft has failed to penetrate the key smartphone market, which is dominated by iOS and Android. Windows Phone and Windows 10 Mobile devices account for less than 1% of the global smartphone market, and aggressive discounts on flagship devices failed to win over new users. Without that foothold, Microsoft remains at a major disadvantage in mobile.

5. Lagging behind Amazon

The core of Microsoft's cloud strategy is Azure, its cloud Infrastructure-as-a-Service (IaaS) platform that provides computing power and analytics services to businesses and lets developers create apps within the cloud. It also serves as the backbone to many of Microsoft's cloud services, including Office 365 and Dynamics CRM.

Azure is the second-largest cloud platform in the world, after Amazon Web Services, but it generates only about a fourth of its annual revenue, according to most industry estimates. To close that gap, Microsoft may need to pile on more features while slashing prices -- which would dent its margins.

6. Lack of insider confidence

Over the past six months, Microsoft's insiders have sold over 16 million shares but haven't bought a single share on the open market. That lack of insider confidence, coupled with the stock's high valuations and expensive growth plans, indicates that the stock could slip lower in the near future.

The key takeaway

I'm not saying Microsoft is a bad long-term investment. It has an incredibly wide moat in the consumer PC and enterprise markets, and its cloud growth looks promising. But it's probably not wise to buy Microsoft as it hovers near historic highs, and investors should wait for the stock to cool off before starting a new position.