Warren Buffett's the most famous buy-and-hold investor on the planet, so if his company, Berkshire Hathaway (BRK.B 0.54%) (BRK.A 0.64%), is selling a stock in its portfolio, you might want to consider selling it, too.

Fortunately, Berkshire Hathaway reveals which stocks the Oracle of Omaha is selling in its quarterly 13F filing with the Securities and Exchange Commission. The company's latest filing shows he sold shares in Verisk Analytics, Inc. (VRSK 0.49%), IBM (IBM -0.89%), and Phillips 66 (PSX -2.51%). Is it time for these stocks to exit your portfolio, too?

A long relationship ending?

When Verisk went public in 2009, Warren Buffett was the only owner not to sell any shares. Clearly, he believed that the long-term opportunity associated with crunching actuarial data for insurers was undervalued in the IPO, but he might not think that anymore.

Warren Buffett smiles at someone as he walks through a crowd at a conference.

Image source: The Motley Fool.

In 2018's first quarter, Berkshire Hathaway reduced its stake in Verisk by 82%, leaving it with 284,778 shares worth only about $30.5 million, as of this writing. That's an ant-sized position for Berkshire Hathaway, which manages an equity portfolio that's valued at nearly $200 billion.

Warren Buffett isn't saying why he sold so many of his Verisk shares last quarter, but you can hardly blame him for ringing the register. Verisk's stock finished the first quarter above $100, which is miles higher than the $22 fetched in its IPO. 

Berkshire Hathaway's relationship with Verisk was a long one. Alongside other property and casualty companies, Berkshire Hathaway founded Verisk in the 1970s to combine data to reduce the risk of unexpected insurance claims and costs.

Verisk has grown substantially over the years. Its customers are responsible for about 85% of all the property and casualty insurance written, and acquisitions have expanded it into other markets, including energy and finance.

Excluding tailwinds from acquisitions, organic revenue growth clocked in at a healthy 7% year over year in Q1 2018. That's far from worrisome, but Buffett may have decided that Verisk's changing business model makes the company less intriguing. As of Q1, insurance accounted for only 72% of Verisk's revenue, and given that about 20% of sales are now coming from the volatile energy sector, pocketing his profit may have become too irresistible. 

Big Blue disappears

Once upon a time, IBM was one of Warren Buffett's top stock picks. Not anymore. He's soured on Big Blue's plans to transform itself from a legacy networking company into a nimble cloud-based solutions company. As a result, he's been selling IBM stock for over a year, and in Q1 2018, it vanished entirely from Berkshire Hathaway's portfolio.

In the past, Warren Buffett's said he avoids technology stocks because their competitive advantages are often fleeting, and identifying winners early enough to buy them at a reasonable price is difficult. A value investor, Buffett favors companies with deep moats protecting their business model that he can buy on sale.

Technology stocks are rarely cheap based on key valuation metrics, such as price-to-earnings ratios, and when they are cheap, it's often because competitors are threatening their core business. 

That's certainly been the case for IBM. It once dominated the enterprise hardware and software market, but increasingly, companies are embracing cloud and hybrid platforms that don't cost as much money up front and that are more easily upgraded. IBM has responded to the change by entering these high-growth markets -- but that space is fiercely competitive, and challenges from Amazon.com's AWS, Alphabet, Microsoft, and others have crimped its progress. 

As a result, the additional sales it generates from these fast-growing markets hasn't offset declining demand for its other products, causing a steady decline in its sales and profitability.

Given the risk of IBM's turnaround taking longer than planned (or failing altogether), Buffett sold 64.5 million IBM shares between Q1 2017 and Q1 2018, including his final 2 million shares last quarter.

A refinery at sunset.

Image source: Getty Images.

The best of the three

Phillips 66 has been a staple in Berkshire Hathaway's portfolio since 2012. But its impact on Warren Buffett's portfolio will be smaller following the sale of 35 million shares in the oil and gas transport, storage, refining, and marketing company last quarter.

Although Warren Buffett sold a considerable chunk of his Phillips 66 holding in Q1, he doesn't appear to have plans to sell his remaining 46 million shares. Phillips 66 bought the shares directly from Berkshire Hathaway as part of its buyback program, while Buffett's decision to sell was driven by a desire to cut his ownership below 10% to reduce regulatory burdens, not because of worry over the company's business outlook. Berkshire Hathaway owned about 16% of Phillips 66 prior to 2018 and currently owns about 9.8% of the company. 

In exchange for his 35 million shares, Buffett received about $3.3 billion, or $93.73 per share. That price may have netted him a nearly 20% gain, according to number-crunching by fellow Fool Jason Hall.

Admittedly, there's no guarantee Warren Buffett will hold his remaining Phillips 66 stock. Still, the company's business continues to hum along nicely, and absent any deterioration in commodities markets or its performance, I think he'll be content to hold on to his remaining shares for a while.

Phillips 66 is among the few energy stocks that continued posting profits during the steep decline in oil prices that began in 2014. Now that commodity prices are climbing again, its income is accelerating. For instance, its adjusted earnings skyrocketed to $512 million in Q1 2018 from $294 million in Q1 2017.

PSX Net Income (Annual) Chart

PSX Net Income (Annual) data by YCharts.

With new pipeline projects that can boost revenue coming on line and increasing margins, Phillips 66 should be able to continue buying back shares and increasing its dividend. Since 2012, it has returned over $20 billion to shareholders via dividends, share repurchases, and share exchanges; undeniably, Warren Buffett has benefited significantly from that track record.

Because a growing global population and expanding economic growth support Phillips 66's profitability, and Warren Buffett doesn't appear in a hurry to sell his remaining stake, this could be the best stock of the three to hold on to in your portfolio.