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?

Fool contributor Daniel Sparks has no position in any stocks mentioned. Rex Moore owns shares of Microsoft. The Motley Fool recommends Apple and Google and owns shares of Apple, Google, IBM, and Microsoft. Try any of our Foolish newsletter services free for 30 days. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.