Even after its recent run-up, Apple (NASDAQ:AAPL) is still a bargain. But how long will the stock stay so cheap?

The opportunity
Tough revenue and earnings growth comparisons, or comps, have weighed heavily on Apple's stock price, giving investors a rare opportunity to buy a market leader at just 10 times free cash flow.

I've outlined why I think Apple is a buy from several points of view recently: It's fundamentally cheap, consumers still love Apple products, it's a great dividend stock, and the company's massive share repurchase program will create meaningful value for shareholders.

But now with a very likely iPad and iPhone refresh just around the corner, the days of a cheap Apple may soon be over.

The voting machine
"In the short run, the market is a voting machine, but in the long run, it is a weighing machine," said Benjamin Graham, commonly referred to as the father of value investing.

What does he mean? Here's my translation: The stock market is forward-looking, but it doesn't look very far -- maybe just a few quarters out. A stock's market value is therefore often determined by its short-term prospects. Over the long haul, however, the weighing machine that measures the underlying substance of the business will win.

So if Apple is likely to hand out unimpressive numbers for a few quarters, the stock becomes unpopular as the Street looks for ways to make money more quickly. This is exactly what happened with Apple's stock over the past six months.

The company's comps were far worse than the blowout Apple results the Street was used to. With a lull in new product launches and lower gross margin levels that looked like they would remain so permanently, the market sensed that Apple would struggle to bring any upside surprise. Sure enough, Apple reported poor to less-than-stellar numbers at best for the last two quarters.

MetricQ2 Growth (YOY)Q3 Growth (YOY)
Revenue 11.2% 0.9%
EPS (18%) (19.8%)
Gross Margin Down 990 basis points Down 590 basis points

Source: Data retrieved from quarterly earnings releases for quarters shown.

Now, looking forward out over the next few quarters, comps could start to look rosy again. Other than the obvious possible upside from some new products the Apple CEO Tim Cook said it would launch during the quarter, the company is guiding for a solid fourth quarter, too.

MetricQ4 2012 ResultsQ4 2013 Guidance
Revenue $36 billion $34 billion to $37 billion
Gross Margin 40% 36% to 37%

Source: Data retrieved from quarterly earnings releases for quarters shown.

Of course, Apple typically beats its own guidance, so positive EPS comps are actually possible.

The first quarter of 2013 looks like an easier comparison, too. In Apple's first quarter of 2013, the company reported a gross margin of 38.6%, only 160 basis points higher than what the company is guiding for this quarter.

The weighing machine
So maybe easier comps and upcoming product launches have something to do with Apple's recent run-up, but I'm not very good at articulating the reasoning behind price swings over just a few quarters -- that's not what I do. In fact, I feel pretty nauseated just from attempting to think like the Street for those few previous paragraphs.

But here's the meat behind it all: Apple's cheap, thanks to the market's shortsightedness, and opportunities like this don't come around every day.

When it comes down to it, Apple is still running a very profitable operation. In the trailing 12 months, Apple's return on invested capital, or ROIC, was 28.1%.

Comparatively, megacap blue-chip stocks McDonalds and Wal-Mart earned ROIC of 18.7% and 12.3%, respectively. Yet McDonalds and Wal-Mart both trade at price-to-earnings multiples greater than 15, compared with Apple at just 11.7.

In the end, the weighing machine will mostly likely win. The market will fess up and acknowledge that Apple has an uncanny ability to generate loads of cash for shareholders and consistently churn out solid products.