Investors have piled into artificial intelligence (AI) stocks over the past couple of years, and some of the world's top investors have been leading the charge. One of these players is Stanley Druckenmiller, head of the Duquesne Family Office. The billionaire has invested in -- and continues to invest in -- a variety of major players in this high-potential field.

Why is everyone, from billionaires to the smallest retail investor, so excited about AI? The technology promises to be a gamechanger, following others like the Internet or smartphones. These sorts of technologies have what it takes to generate billions of dollars for the companies involved in them -- and for investors. In the case of AI, analysts predict today's billion-dollar market may even reach beyond $2 trillion in the early part of the next decade.

This potential hasn't escaped Druckenmiller's attention. He invested in two of today's most successful AI companies -- Nvidia and Palantir Technologies -- earlier in this AI story, then sold all of those shares in recent quarters. And in the latest quarter, the billionaire dropped yet another AI giant. But don't worry: Druckenmiller still is bullish on AI, and he even opened a new position in a key AI player. Let's find out more.

Two investors standing outdoors look at something on a tablet.

Image source: Getty Images.

A brilliant 30-year track record

First, a quick note about Druckenmiller. This billionaire founded Duquesne Capital Management and ran the fund for 30 years prior to opening his family office. His track record? He posted a 30% average annual return, and he did this without any money-losing years. So, Druckenmiller has clearly proven himself, meaning when he makes a move, investors take notice.

About a year ago, the billionaire shocked investors when he closed out his position in AI chip giant Nvidia, and earlier this year, he sold all of his shares in Palantir. These stocks have soared more than 1,000% and 2,000%, respectively, over the past three years, and the companies continue to report strong revenue growth and customer demand.

We don't know the exact reason for Druckenmiller's moves, though it may be fair to say it has to do with these stocks' valuations. Druckenmiller mentioned in a Bloomberg interview shortly after selling Nvidia that the valuation "was rich." And some analysts have said that Palantir, trading for 278x forward earnings estimates, has become overvalued.

Druckenmiller's selling spree

But Druckenmiller's AI selling spree wasn't over. In the second quarter of this year, he made one more major move: He closed out his position in Amazon (AMZN 0.82%), an e-commerce giant and an AI leader through its cloud computing unit Amazon Web Services (AWS). As the world's biggest cloud provider, AWS offers a variety of AI products and services to customers, and this has resulted in a $123 billion annual revenue run rate for the unit.

Still, Druckenmiller shifted out of this bet and into another AI giant in the second quarter. He opened a position in Microsoft (MSFT -0.77%), adding 200,930 shares. This isn't a massive position, as it represents about 2.5% of the portfolio, but it gives the billionaire exposure to a key player that may offer him yet another AI win.

Software powerhouse Microsoft has gone all in on AI, and this technology has been driving growth in recent quarters. In the latest fiscal year, the company's cloud business, Azure, topped $75 billion in revenue, representing an increase of 34%, amid AI demand. Microsoft is growing data centers more quickly than rivals and now has more than any other: about 400 over 70 regions.

A key partner of OpenAI

The company, having invested almost $14 billion, is a key partner of OpenAI, the AI research lab that created chatbot ChapGPT and is positioned to drive AI development. Meanwhile, the stock trades for 33x forward earnings estimates, offering it plenty of room to run as the demand for AI potentially lifts revenue in the quarters ahead.

So, should you follow Druckenmiller's moves? All of the AI stocks I've mentioned here represent smart long-term buys, and decisions to sell may not represent a vote against the particular player -- but rather a move to lock in a profit after holding on for a certain period of time, especially on a stock that's gained in valuation, or the desire to shift into another potential winner. This means you don't have to copy Druckenmiller's -- or any other investor's -- exact moves.

But a purchase of Microsoft right now is a smart bet -- for Druckemiller and the rest of us -- considering this company's market leadership, investments in AI, recent revenue growth, and the idea that this AI boom has a lot farther to go.