Shares of Apple(AAPL) - Get Report were surging by over 5% in early morning trading on Wednesday, the day after the tech giant reported higher-than-expected earnings, revenue and iPhone sales for the 2016 fourth quarter. The results were a surprise to many investors who had been doubting Apple's ability to continue selling iPhones. 

"The beauty of Apple is that it goes through these great periods of euphoria and these great periods of doubt," Welch Capital Partners senior technology analyst Daniel Ernst said on CNBC's "Squawk Box" on Wednesday morning. 

The trajectory of the company's earnings has actually been "very consistent" over the past decade, he said. It's the sentiment around the stock that keeps changing, which is why the firm keeps a "relatively nimble" approach on the stock. 

Despite some people's belief that you should never trade Apple because it's a long-term play, Ernst says that he's learned that's not true. "If you go back to August of 2015, when there was a big China meltdown, Apple was $89. This time last year there was another china meltdown and actually the stock is up 25% year over year over that period so we actually took down our exposure to Apple before the quarter."

The firm still thinks it's a good long-term play and wants to own the stock through the iPhone 8 cycle, which is expected to launch in September, Ernst noted. The main issue he has is that everyone seems to have written a note saying that 2017 is the year to own Apple stock, which is worrisome. 

But Apple has the free cash flow to "weather all kinds of storms," he added. 

(Apple is held in Jim Cramer's charitable trust Action Alerts PLUS. See all of his holding with a free trialhere.)