It's been a quiet year for me so far as an investor. I haven't made too many big portfolio moves and have actually been focusing on building positions in my favorite index funds lately.

However, I recently made a pair of significant investment decisions. I decided to finally add shares of Starbucks (SBUX 3.41%) to my portfolio after its recent post-earnings drop, and I also decided to cut my losses and sell a technology company that could be losing its long-term advantages.

Here's why I decided to add the coffee giant to my portfolio, and what stock I decided to sell.

I've been a fan for years, and now I'm a shareholder

I've had Starbucks on my radar for several years, and I've been a fan of the business since the first time I visited one of its coffee shops in the late 1990s. As someone who knows the restaurant business well, I can say that Starbucks' profitability and execution of its growth strategy has been impressive, to put it mildly. But for one reason or another, I never bought the stock.

That's changed now. After disappointing first quarter results, Starbucks plunged by about 17% and it became too attractive to ignore.

Let's get the bad news out of the way first. Starbucks surprised investors by reporting a same-store sales decline of 4% year over year. Analysts had expected a 1% increase. Customer traffic was down by 6%, revenue declined 2% year over year, and the company lowered its full-year guidance. That's a perfect storm of disappointment, and it isn't surprising the stock reacted how it did.

CEO Laxman Narasimhan acknowledged his disappointment and mentioned a few growth initiatives, such as making it easier for occasional customers who aren't Starbucks Rewards members to order. Currently, they can't use the app.

However, there are a few reasons I bought the stock despite the latest results. First, these are temporary headwinds as consumers cut down on discretionary spending. It isn't just a Starbucks problem. Plus, Narasimhan revealed that expected supply chain cost savings will be $4 billion over the next four years, $1 billion more than previously expected. And finally, buying an iconic brand at its lowest P/E ratio since the depths of the COVID-19 crash, and at its highest dividend yield ever, seems like a smart move.

I love the platform, but I'm deeply concerned about the business

The stock I recently decided to sell is real estate technology platform Zillow (Z -1.45%) (ZG -1.27%). My investment was down by about 60% since I initially bought it, because of missteps in its now-closed iBuying business and the real estate market slowdown. But instead of waiting for a comeback, I've decided to cut my losses and move on.

To be fair, Zillow's recent results have been strong. In the first quarter, revenue and adjusted EBITDA both came in above Zillow's own guidance, and the rental platform is growing exceptionally well.

However, the future doesn't look as bright as I'd like. Traffic to Zillow's app and website was flat year over year, and second-quarter revenue guidance calls for a significant slowdown.

And this is before the National Association of Realtors settlement goes into effect in July. When it does, buyers' agent commissions will no longer be part of MLS listings and will become a separate agreement between the agent and the buyer bring represented. To put it mildly, this could cause buyers' agent commissions to plunge, and in many cases, for buyers to simply forgo having an agent. Since 48% of Zillow's revenue comes from the buy side of transactions, this has me seriously concerned about the future growth potential of Zillow's business.

I'm taking a cautious approach with Starbucks

As a final thought, it's worth clarifying that I bought a rather small position in Starbucks to start. I'm not completely convinced of the CEO's turnaround strategy, or if there really is one at this point, and I think consumer spending could remain depressed for some time. So I have no idea what the stock will do in the next few weeks or months.

So I'm taking a cautious approach to the stock and plan to average into a position over time, assuming no further red flags appear with the business. If you find a stock that you love as a long-term investment, but you aren't convinced about its near-term plans, averaging in can be a smart way to go.