If only investors could rewind time and go back to the beginning of the year and put all their money in Apple (AAPL -0.65%) stock. You'd be sitting on a cool gain of more than 41%. Unfortunately, this isn't possible. All we have is today. So, what about now? Are still attractive, like they were earlier this year? Or has the big run-up in the stock price made the stock a hold or even a sell?

Unfortunately, Apple stock simply doesn't look as attractive as it did in January. But my opinion may surprise you on whether I think the stock is a buy today. While it's certainly not worthy of as much capital as it was earlier this year, the stock could still reward investors reasonably well over the long haul from here.

Why Apple stock is still a buy

On the surface, Apple may not look like a good investment today. Its price-to-earnings ratio of about 32 is up from approximately 22 earlier this year. Further, revenue in the tech giant's most recent quarter actually fell 3% year over year. 

But here's where Apple shines. First of all, a 3% decline on top of tough comparisons of 9% and 54% growth in the same quarters for fiscal 2022 and fiscal 2021, respectively, is actually quite impressive. Year-to-year volatility in sales from a company that generates most of its revenue from just a handful of product lines is normal. Even more, for sales to decline only 3% year over year in an inflationary and uncertain market is impressive, particularly given Apple's tough year-ago comparison.

Overall, Apple's performance over the last few years has highlighted the great job the tech company has done at continuing to grow its market share, win new customers, and profit from its loyal customer base.

Additionally, Apple's balance sheet strength continues to be a major selling point for the stock. While its standard for some profitable companies like Apple to carry more debt than cash on their balance sheet, Apple has so much cash and cash equivalents that they exceed its debt by $57 billion. Even more, the company generates around $100 billion in free cash flow annually. Free cash flow, defined as the company's regular cash left over after both regular operations and capital expenditures are taken care of, represents the stream of cash the company can do shareholder value-building things like dividends, share repurchases, and acquisitions.

Apple, of course, hasn't been shy to put its money to work. When the company reported its fiscal second-quarter results in early May, it also increased its dividend for the eleventh year in a row and authorized an additional $90 billion for share repurchases.

A higher risk profile

Even though Apple stock still looks like a buy, investors should be mindful that a higher valuation multiple for the stock increases its risk. Since investors who buy shares today are paying more than 30 times earnings, there's not much room for error baked into the price. If the company's future performance disappoints, therefore, the stock price could flounder or even fall significantly. For this reason, investors who want to buy shares today should keep their positions in the stock small as a percentage of their total portfolio.

But given Apple's strong balance sheet, loyal customer base, and history of product innovation, it may make sense to take on some risk in order to get in on this stock's long-term potential.