Warren Buffett once said that his "favorite holding period is forever." However, there are plenty of stocks that he doesn't even hold for five years. Why doesn't the legendary investor always live up to his ideal? Things change.

I'm optimistic about all of the stocks in my portfolio over the long term. Otherwise, I would sell the ones that I didn't feel good about. Of course, my confidence level is much higher for some than for others. I won't predict that I'll hold any given stock forever. But here are five stocks I'll almost certainly still own in 2030 (listed in alphabetical order).

1. Alphabet

Alphabet (GOOG -1.62%) (GOOGL -1.69%) ranks as my favorite of the FAANG stocks right now. I love the company's moat, especially with its core Google search business. It's hard for me to envision another search engine dethroning Google by 2030 or even by 2050.

I also think that Alphabet has a huge growth opportunity in artificial intelligence (AI). The most obvious one is with its Waymo self-driving car technology business. However, the company is also an AI leader in home technology, virtual assistants, and healthcare. 

2. Apple

Buffett once referred to Apple (AAPL -2.05%) as "probably the best business I know in the world." I wouldn't argue the point. The company has built an incredible ecosystem around its iPhone that generates strong revenue year after year. 

Apple should still have plenty of growth drivers for iPhone and its other products and services. CEO Tim Cook singled out low global 5G penetration as a reason for optimism in the company's recent quarterly conference call. Apple also continues to develop innovations on other potentially big fronts such as augmented reality/virtual reality.

This stock is currently my biggest holding. I doubt that will change over the next eight years.

3. Disney

Never underestimate The Walt Disney Company (DIS -0.86%). Several years ago, some pundits bemoaned the fact that Disney's broadcast and cable networks faced a serious threat from streaming services and missed out on its chance to acquire Netflix. Today, there are predictions that the Disney+ streaming service could soon overtake Netflix.

I fully intend to hold onto my shares of Disney at least through 2030 for three overriding reasons. First, the company has one of the most beloved brands on the planet. Second, it owns a massive and growing content library featuring many of the most popular movie and TV franchises ever. Third (and perhaps most important), Disney is exceptionally adept at monetizing its creative work. Underestimating a company with those advantages will almost always backfire over the long term.

4. Intuitive Surgical

I often call Intuitive Surgical (ISRG -1.58%) the 800-pound gorilla of the robotic surgical systems market. The company has a market share in the ballpark of 80%. Rivals can't come close to touching Intuitive's track record of more than 20 years. Neither can they top the company's impressive recurring revenue that made up 81% of total revenue in the latest quarter. 

What I like the most about Intuitive Surgical, though, is its long-term growth prospects. The company's robotic systems will probably be used in a little under 2 million procedures this year. Intuitive estimates that there are roughly 20 million procedures performed annually for which its current technology and innovations already in development can address. I predict this big gorilla will still be beating its chest in 2030 and beyond.

5. Nvidia

Sure, Nvidia (NVDA -1.58%) is in a slump right now with declining demand for graphics cards. But the company operates in a cyclical industry. My view is that the future remains as bright as ever for Nvidia.

The company stands front and center in several markets that I expect will be much larger by 2030, including AI, gaming, and digital twins (simulated virtual models of real-world facilities). Nvidia could also have a significant opportunity down the road in powering quantum computers. 

Despite the current malaise for the stock, Nvidia has delivered big gains for me through the years. I fully expect that it will return to its winning ways.