Apple’s shares hit a peak closing price of $336.91 on July 27, pushing its market value near $4.93 trillion and briefly surpassing Nvidia as the world’s top publicly traded company.

The tech giant is set to reveal its fiscal third-quarter earnings on July 30.

Dan Niles, founder of Niles Investment Management, described Apple’s slow adoption of artificial intelligence as “incompetent,” but suggested this stumble ended up benefiting the company by avoiding heavy AI spending that has strained competitors’ cash flows.

On CNBC’s Squawk on the Street, Niles said Apple’s failure to integrate AI aggressively into iPhones which he called “horrible” turned out to be a fortunate break.

While Alphabet ramped up its 2026 capital expenditure forecast to between $195 billion and $205 billion for AI infrastructure, pushing its free cash flow into the red for the first time since its 2004 IPO, Apple took a different route.

Instead of building AI models from scratch, Apple reportedly pays Google about $1 billion annually for access to a custom Gemini model powering Siri’s AI improvements. This licensing fee is a fraction of the massive investments rivals are making in AI development.

This conservative approach has helped Apple climb back to the top of the market value rankings without taking on the same financial risks.

Niles cautioned, however, that Apple’s high valuation is a concern. Its price-to-earnings ratio sits in the high 30s, well above the S&P 500 average near 22.

He warned that disappointing earnings on July 30, especially if rising semiconductor costs squeeze margins, could hurt the stock. Memory chip prices have surged this year, forcing price increases across smartphone makers.

“You can’t put all the money in the world into this one stock because they’re just not spending on AI,” Niles said. “It doesn’t make sense at a certain valuation.”

Wall Street expects Apple to report revenues around $108.9 billion and earnings per share of $1.89, up from $1.57 a year earlier.

Apple’s earnings arrive amid a busy week for Big Tech, with Meta and Amazon also reporting under close scrutiny for AI spending.

Niles mentioned he plans to stay cautious on these names as well, given concerns over capital expenditures.