Pershing Square sold out of its entire Alphabet position in favor of Microsoft.
Microsoft is growing both in enterprise software and cloud computing.
Alphabet is no slouch, but had a higher P/E ratio earlier this year.
Hedge fund managers are making big moves to capitalize on the artificial intelligence (AI)-driven stock market gyrations. Billionaire Bill Ackman made some in his portfolio last quarter, completely selling out of Alphabet (NASDAQ: GOOG) (NASDAQ: GOOGL) for his investment fund, Pershing Square. Given the timing of the buys and sells, it is likely that Pershing Square reaped multibagger returns from its investment in Alphabet.
What did Ackman buy with his Google proceeds? He turned to another AI technology giant: Microsoft (NASDAQ: MSFT). It had been a laggard in the first half of 2026 and was down about 20% from its Q2 highs when Pershing Square topped off its position.
Missed AI’s "Act 1"? Act 2 Could Be 15x Bigger. Most investors think they missed the AI boat because they didn't buy Nvidia in 2005. But according to our analysts, we’re only at the end of "Act 1"—the R&D phase. "Act 2" is the global rollout. Continue »
Bill Ackman. Image source: Getty Images.
Microsoft is now back near all-time highs and the largest position in the Pershing Square portfolio. Does that mean Ackman made the right move to dump Alphabet for Microsoft?
In early 2026, Microsoft's share price was facing two thematic headwinds. First, as the world's largest enterprise software company, Microsoft's stock dipped alongside the rest of the sector amid concerns that AI would disrupt everything.
It turns out that no AI disruption has occurred so far, or that it is taking much longer than pessimists assumed. Microsoft's commercial 365 software revenue rose 14% year over year in constant currency last quarter, showing no signs of disruption from AI.
Second, Microsoft had some weakness relative to other major technology players due to OpenAI's speed bumps in 2026. Previously, Microsoft was the leading cloud provider for OpenAI and was seen as reliant on OpenAI for revenue growth at its Azure cloud business. Microsoft has since diversified its AI cloud business beyond a sole bet on OpenAI, while also securing major commitments from its flagship partner.
Last quarter, Microsoft's cloud revenue increased 27% to $59.3 billion, with remaining performance obligations rising 84% to $678 billion. On these numbers, the stock price has begun to recover and is now down just 5% from the 2025 highs.
Image source: Alphabet.
Compared with other large technology players such as Alphabet, Microsoft had a much lower valuation in the first half of 2026. Earlier this year, when Pershing Square was buying, Microsoft had a forward price-to-earnings ratio (P/E) in the low 20s. For a business with revenue increasing in double-digit percentages with a huge order backlog, that is a low price, which was driven by the slump across the entire enterprise software sector.
Alphabet's forward P/E ratio was in the low 30s during the same period, while Apple's was in the high 30s. Pershing Square likely saw Microsoft as a better value because of this discrepancy in earnings ratios.

MSFT PE Ratio (Forward) data by YCharts
So far, Ackman's decision to sell Alphabet and buy more Microsoft is looking smart. Alphabet's stock is down 15% since the middle of Q2, while Microsoft shares are up 26% and close to breaking through to new all-time highs.
But what about the long term? Alphabet is no slouch of a business and is growing quickly. Its Google Cloud business is actually growing much faster than Microsoft, posting 82% year-over-year growth to $24.8 billion in Q2.
The one concern investors have with Alphabet right now is the potential disruption of Google Search. People worry that new AI agents like ChatGPT or Claude will take users away from Google, Alphabet's cash cow. Still, these concerns have not shown up in Alphabet's financial performance yet, with Google Search revenue up 17% year over year, which is actually faster than Microsoft's enterprise software revenue growth.
Microsoft may have been a better buy earlier in 2026 because of its cheaper P/E ratio. However, over the long term, if you are comfortable with the AI risks for both businesses, both Alphabet and Microsoft should do fine in your portfolio.
Before you buy stock in Microsoft, consider this:
The Motley Fool Stock Advisor analyst team just identified what they believe are the 10 best stocks for investors to buy now… and Microsoft wasn’t one of them. The 10 stocks that made the cut could produce monster returns in the coming years.
Consider when Netflix made this list on December 17, 2004... if you invested $1,000 at the time of our recommendation, you’d have $379,123!* Or when Nvidia made this list on April 15, 2005... if you invested $1,000 at the time of our recommendation, you’d have $1,396,103!*
Now, it’s worth noting Stock Advisor’s total average return is 933% — a market-crushing outperformance compared to 212% for the S&P 500. Don't miss the latest top 10 list, available with Stock Advisor, and join an investing community built by individual investors for individual investors.
See the 10 stocks »
*Stock Advisor returns as of October 1, 2026.
Brett Schafer has no position in any of the stocks mentioned. The Motley Fool has positions in and recommends Alphabet, Apple, and Microsoft. The Motley Fool has a disclosure policy.