Apple (NASDAQ:AAPL) shares are up about 18% since the company announced its second-quarter earnings a few weeks ago. The jump is most likely inspired by the company's aggressive boost to its share-repurchase program. The stock was definitely cheap before the company announced its second-quarter earnings, but is it still cheap? More importantly, is the stock a buy?

In the following video, Fool contributor Daniel Sparks explains to Motley Fool analyst Rex Moore that whether Apple is a buy ultimately depends on the strength of Apple's competitive advantage. There's no doubt the company is cheap; a look at valuations for Microsoft (NASDAQ:MSFT), IBM (NYSE:IBM), and Google (NASDAQ:GOOGL) compared with Apple makes that obvious. Even so, is Apple doomed to increasing competition? Or has it carved out its own lasting niche?