Shares in Apple (AAPL -2.88%) have risen 8% over the last month, hitting an all-time high of $237 per share in mid-July. The company's stock has outperformed many of the most prominent names in artificial intelligence (AI), including Microsoft, Alphabet, and even Nvidia. Apple's growth is a welcome turnaround after facing a slump in the first half of the year.

NVDA Chart

Data by YCharts.

This chart illustrates how, up until June, Apple's share price had fallen while many of its rivals enjoyed solid gains. The disparity was largely because Apple had yet to display any encouraging growth in AI. However, that changed on June 10 when the company announced Apple Intelligence, a software overhaul that will bring AI features across its product lineup.

As a result, recent stock growth shows Apple playing catch-up after a delayed start in the industry. Wall Street is growing increasingly bullish in the lead-up to September when the tech giant will unveil its first iPhone designed with AI in mind.

Here's why I'm doubling down on Apple despite its share price hitting a new peak this month.

Apple only just joined the AI rally, suggesting it could have more room to run

The launch of OpenAI's ChatGPT toward the end of 2022 triggered an AI rally that has yet to loosen its grip on Wall Street. The Nasdaq-100 Technology Sector index has climbed 31% in the last 12 months, driven mainly by excitement over AI. For reference, the S&P 500 rose by 24% during that period.

Tech giants like Nvidia and Alphabet delivered stock growth of 159% and 44%, respectively, since last July as they've rallied investors with new AI products. Comparatively, Apple's share price has risen 20%. The iPhone maker has taken a more gradual approach to AI, which has led to slower stock gains. However, the company appears to be ramping up its expansion into the arena, suggesting now could be an excellent time to invest before it's too late.

September is shaping up to be a critical month for Apple, with the release of Apple Intelligence and the company's latest iPhone. Apple Intelligence will bring new features like image and language-generation tools, photo updates, and a complete overhaul of its smart assistant, Siri. However, Apple has strategically made its AI upgrades only available on its newest products.

As a result, consumers will need an iPhone 15 Pro or higher to access Apple Intelligence through a smartphone. Meanwhile, iPads and Macs must be running the company's M1 through M4 chips. Apple's iPhone 16 launch in September is coming at the perfect time and could lead to a rush of smartphone updates by consumers.

Apple's product line has slumped over the last year, facing repeated sales declines. However, the company is now utilizing AI to encourage shoppers to upgrade their devices. Apple's stock has already begun trickling up since June, but it is still a long way from seeing the growth its peers have enjoyed from AI. Consequently, Apple's shares are a compelling buy right now, with plenty of room to run.

Apple's stock is potentially trading at one of its best-valued positions in months

AAPL PEG Ratio Chart

Data by YCharts.

According to the chart above, Apple's price/earnings-to-growth (PEG) ratio has decreased 98% over the last year to about 4.

PEG is a helpful valuation metric as it uniquely accounts for a company's growth prospects. It is calculated by dividing its price-to-earnings ratio (P/E) by its earnings-per-share growth rate over time. Generally, the lower the PEG, the better the value.

So, despite rises in its share price, Apple's stock has actually increased in value over the last year. Its lower PEG suggests its stock is trading at a bargain and at one of its best-valued positions in months.

The decline in PEG aligns with Apple's significant potential for the rest of 2024. In addition to AI, Apple has a booming services business. Its digital-services segment includes income from the App Store and subscription-based services like Apple TV+ and Music. In the second quarter of 2024, the services segment posted revenue gains of 14% year over year, beating all of Apple's other divisions in growth. Meanwhile, it hit a profit margin of 75%. For reference, Apple's products achieved a profit margin of 37%.

Apple had a challenging start to the year but appears to be back on a promising growth trajectory, which is why I'm doubling down on its stock this month.