Investor Dan Niles highlighted two of the “Magnificent Seven” tech cohort as his favorite stock picks for the rest of the second-quarter earnings season. This first of these two names was Microsoft , which reports its fiscal fourth-quarter earnings after next Wednesday’s closing bell. Shares have surged about 22% this year. Part of the reason the stock looks attractive, the founder of Niles Investment Management said, is because “they had such a rough time last year.” Azure, Microsoft’s cloud computing platform, was “a disappointment” for the company three quarters in a row, he said. Microsoft finished 2024 with a 12% gain, while the S & P 500 rose 23% in that same time period. But things started picking up for the company after Microsoft partnered with OpenAI on the Stargate AI supercomputer in January of this year, Niles said. The OpenAI program runs on Azure, and OpenAI also announced it would make a “new, large Azure commitment.” “Then they did the Stargate deal, where they restructured their agreement with OpenAI — and in the March quarter, they actually saw Azure reaccelerate. It grew 2% faster than it did in the December quarter. And I think you’re going to see that continued benefit as you go into June,” Niles, the founder of Niles Investment Management, said Friday morning on CNBC’s ” Squawk on the Street .” However, Niles did voice some caution that the bar may be high heading into Microsoft’s print. “Obviously, everybody expects good results, which is the one concern.” Niles’ second stock pick for the season was AI poster child Nvidia , which reports second-quarter results on Aug 27. He said he became particularly bullish on the stock after it had to write off inventory that could no longer be sold to China due to a ban from Washington . However, last week the company said that it can continue selling its H20 chip to China, reversing this previous ban. “I got bullish on that after the write-down, and now China comes back into the models when it got taken out of the models, and you’re seeing capex now really strong, driven by inference , which is much more sustainable than training,” Niles said. AI inference refers to the process of coming up with conclusions using brand new data that’s fed into a machine learning model. Training refers to the process of “teaching” a model so that it can recognize patterns. “Because we all want answers to our questions. We don’t care about the training, and so I think you’re going to see that continue to do well,” Niles said. The H20 chip is less advanced and designed specifically to comply with U.S. export restrictions to China. Nvidia CEO Jensen Huang has voiced his desire to ship more advanced chips into the country.