Many readers know that I and others at the Fool are tremendous fans of Apple (AAPL 0.42%). The iPhone giant is an absolutely dominant consumer franchise, and it's no surprise that Forbes magazine ranked it as the world's most valuable brand earlier this year.

I had trimmed some of my very large position in February and sold a call against my Apple shares in January as the stock surged toward new all-time highs. However, given recent global events, I reluctantly sold more of my shares in the mid-to-high $200s in recent weeks, and then completely out of the stock on Wednesday, March 18, at prices I would have scoffed at as recently as one month ago.

That looks to have been an OK decision in the short term, as Apple's price has traded lower since then. Yet the Motley Fool's disclosure policy has precluded me from writing about the sale until now.

Obviously, coronavirus has changed my outlook on Apple quite substantially from the bullish opinion I had even fairly recently. However, I'm not recommending every investor sell now -- even if you think Apple may trade lower in the near term.

Still, I feel the sale was the right decision for my own situation, so check my reasons to see if they apply to yours.

A guy in his 30s in business casual wear cringes at his smartphone.

Image source: Getty Images.

Reason No. 1: There's uncertainty about Apple in a recession

While iPhone owners will no doubt continue to make their phones the center of their daily lives, Apple's near-term revenue and earnings will largely depend on new devices sold in the current year. In addition to devices, Apple has also been growing a slew of new services in 2019. The prospect of these new services, as well as rejuvenated iPhone 11 sales, were factors that got me excited about Apple back in the fall, right before Apple's multiple expanded from a value multiple to a growth multiple and the stock surged 50%.

However, with the prospect of a potential looming recession resulting from the coronavirus, investors now have to shift from a growth-oriented bull market mentality to perhaps a recession-oriented mentality. And while Apple has proved itself to be a fantastic brand over time, it does sell premium-priced products.

There also isn't a whole lot of historical data regarding how iPhone sales, which make up over half of Apple's revenue, might perform during an economic recession. After all, the iPhone was only introduced in June 2007, just a year before the great financial crisis of 2008. Therefore, Apple is now in uncharted territory as to how global phone sales will perform in the near term, given both demand and supply shocks it's experienced during the outbreak.

In addition to its core devices, it's also a dubious proposition to think Apple might sell a lot of its new services in the near term. After all, consumers are now probably trying to limit the amount of subscriptions they have, not try new ones. That will make it harder for Apple's new streaming service to catch on against the known quantity of Netflix (NFLX -0.31%), or for the Apple Arcade video to go against existing video game platforms, and it will probably dampen new Apple card signups.

Reason No. 2: It's relatively expensive

I also don't think these headwinds have been fully reflected in Apple's stock price as of yet, as Apple had recently surged to a decade-high P/E valuation in the October-February period. While the stock has of course given up some of those gains, it hasn't reverted all the way back to prior valuation levels seen in the troughs of 2014, 2016, or late 2018, despite this uncertainty.

AAPL PE Ratio Chart

AAPL PE Ratio data by YCharts

In fact, Apple has outperformed during this downturn thus far, especially when compared with the broader market. Despite its recent fall, Apple's stock is still up about 60% from its January 2019 lows. If you had told me in January 2019, when I was buying more Apple stock, that the stock would be up 60% in a little over a year, I would have taken that in a heartbeat. Now everyone thinks the current price is cheap.

That's a big difference from the S&P 500 Index (^GSPC 0.13%), which has fallen below even its December 2018 lows, or the Russell 2000 Index ETF (IWM -0.47%) small-cap index, which has incredibly fallen all the way back to January 2016 levels.

AAPL Chart

AAPL data by YCharts

Reason No. 3: I wanted to raise cash...

Of course, Apple is a much better company than most in the index, and it's also why Apple had held an outsize allocation in my personal portfolio. With Apple beginning to make up such a huge portion of my net worth -- especially as other stocks I owned have fallen by much more -- and with shares down "only" about 20% from recent all-time highs at the time of sale -- selling Apple was my best opportunity to raise liquidity in the interim.

Raising cash was necessary for two reasons. First, I wanted to boost my cash on hand. In retrospect, my personal emergency fund should have probably been larger than it was. Every investor should make sure he or she has enough cash and liquidity available for a few months, especially in these unpredictable times, and given the historically fast and unpredictable nature of the current crisis, I felt raising a bit more cash was prudent. Perhaps this is being too conservative, but it's probably better to be more conservative this early on in the crisis than not. For that reason, selling Apple was my best option. 

Reason No. 4: ...and go bargain-hunting

Still, not all of my Apple proceeds have gone into cash. The second reason for raising cash is to carefully go bargain-hunting for other stocks that have been hit much, much worse than Apple. In fact, while I made the large Apple sale, I've also been making several buys -- though I'm wading into these positions more carefully.

For instance, on Wednesday I bought more shares of Starbucks (SBUX 1.67%), which at that point was down nearly 50% from its all-time highs. I also went bottom-feeding on Ulta Beauty (ULTA -0.46%), which at one point was down over 65% from its all-time highs. These are both strong consumer discretionary franchises like Apple that, while sure to experience a tough 2020, should survive the crisis and continue normal operations at some point in the future.

Even more remarkable is that both companies have traditionally traded at much higher P/E ratios than Apple in the past. Yet during this crash, both actually became cheaper than Apple last week, at least temporarily -- a hugely rare occurrence.

AAPL PE Ratio Chart

AAPL P/E ratio data by YCharts

I also added to my stake in small-cap server company Super Micro Computer (SMCI -6.78%). This company sells servers to businesses and cloud giants, and recent reports have pointed to a huge surge in demand for bandwidth from businesses and consumers alike, which should increase demand for server capacity. A March 10 report from memory and storage research site DrameXchange described rising server demand for the current and next quarter, both from the new JEDI cloud contract and the recent surge in demand for teleworking services. That should lead to rising demand for Super Micro Computer's products, even while consumer demand for iPhones and Apple devices could decline.

Like Apple, Super Micro also has a strong balance sheet, with about $200 million in net cash -- nearly a quarter of its market capitalization. With the stock falling almost 50% to just a 10 P/E ratio, its balance sheet in solid shape, and a potential increase in demand for its servers, Super Micro became another bargain-priced stock that I couldn't resist. To buy more Super Micro, I needed to sell something, and that was Apple.

AAPL PE Ratio Chart

AAPL P/E ratio data by YCharts

But not every investor should do what I did

While my Apple sale was appropriate for my situation, investors need to assess their own investing style and allocation risk. Foolish investors will probably be more diversified than I was, which not only eliminates near-term risk but also allows one to stay invested for the long term. I'm absolutely positive Apple will one day be making new highs, so those with a long enough time horizon, an ample emergency fund, and more diversification wouldn't necessarily need to make the sale that I did. 

I could also very well be making a mistake. After all, Apple has one of the best balance sheets in the business, and should the economic slowdown prove short-lived, it's quite possible Apple could surge to new highs as recently as this year. By selling, I also have to pay capital gains taxes on my long-term profits -- though fortunately (or unfortunately?) I have offsetting losses from other positions I've sold this year as well.

Still, I also think there is a real possibility that Apple hasn't yet caught up with the rest of the market in falling to its December 2018 valuation levels. Given the absurd bargains that have arisen in other parts of the market, selling Apple and rebalancing to other opportunities as described seemed like the best option. For those with outsize positions in Apple, it's a risk you need to consider.

Still, I'm fairly sure there will be a day when I will be an excited Apple shareholder again -- perhaps soon. While I offloaded shares, I also sold a put option on Apple's stock last week. That means I collect a cash premium now, but if Apple shares fall below the strike price of the put option, I'll be on the hook to buy 100 shares at those lower levels -- though the strike price on the option I sold is $100. It's a pretty huge long shot we'll ever see those prices again, even in a recession. Yet if Apple shares fall significantly from their current perch, I'll be looking to buy back in to this top stock that, despite last month's decline, had delivered outstanding gains for me over many years. One day, I'm sure it will again.