Warren Buffett is waving the white flag on IBM (NYSE:IBM). After years of touting the tech titan as one of his best ideas, Buffett ditched nearly all of his stake in the company this past quarter. His holding company, Berkshire Hathaway (NYSE:BRK-A) (NYSE:BRK-B), dumped 94.5% of its IBM stock, leaving it with 2.05 million shares, or about $300 million in the company. At one point, Berkshire's stake in Big Blue topped $10 billion. 

The move signals the end to an odyssey that began in 2011 when Buffett first bought shares of the IT specialist, surprising his followers as he had historically avoided tech stocks. The so-called Oracle of Omaha endorsed IBM due to its history of executing on earnings goals and called it a value play. However, IBM's share price has actually fallen 18% since he accumulated much of his stake at the end of 2011, while the S&P 500 has more than doubled in that time, gaining 116%.

That poor result is a reminder that even the wisest of investors can make mistakes. Here are three of the biggest ones Buffett made when it came to IBM.

Warren Buffett at Berkshire Hathaway's annual meeting

Image source: Motley Fool.

1. Focusing on past achievements

Buffett explained his decision to buy IBM to CNBC in 2011, saying that the company had a pattern of laying out a road map of goals every five years, and consistently knocking them down. Buffett also gave credit to previous CEOs like Lou Gerstner and Sam Palmisano. However, in focusing on the company's track record and past management, he seemed to ignore the structural changes that were about to take place under new CEO Ginni Rometty as the company fought for position in cloud services and dumped its legacy businesses.

Back in 2011, IBM guided for EPS of $20 a share by 2015, up from $11.52 in 2010. However, that goal soon became more of an albatross than a guiding light. The promise was made by Palmisano, but was tasked to Rometty, who was named CEO in 2011. During the intervening years, IBM's revenue growth turned negative as enterprise customers switched from traditional IT solutions — IBM's strength — to cloud-based technologies. To try to meet the goal, Rometty aggressively bought back shares, laid off workers, and sold divisions, but it wasn't enough, and the strategy hurt both morale and the company's performance. IBM eventually backed away from the $20 goal at the end of 2014, and ended up reporting just $14.92 in EPS in 2015. 

The lesson here seems to be that past performance does not determine the future, especially in a fast-changing industry like tech and also when a new CEO is at the helm.

2. Cheering share buybacks 

Normally, investors aren't happy to see their stocks fall, but Buffett turned this logic on its head in his 2012 shareholder letter. "We should wish for IBM's stock price to languish throughout the five years," he wrote, due to the company's penchant for share buybacks. Lower stock prices make share buybacks more efficient, of course, as they allow companies to repurchase a greater amount of shares for the same amount of money.

However, Buffett seemed to be mistakenly focusing on the goal rather than the process. Share buybacks are easy to do, and are often a sign of management's lack of ideas. Prior to 2015, Rometty aggressively repurchased shares in the hopes of meeting the $20 EPS goal, but that did nothing to shore up the underlying business.

In 2014, IBM spent more than $12 billion on buybacks, and for a time the company was spending more on buybacks and dividends than it was bringing in in free cash flow, funding the difference with new debt. Spending on research and development, though, was flat. The company lost ground to competitors, and its revenue and profits fell. 

Buffett got his wish for the share price to languish, but it did so as a direct reflection of IBM's worsening performance and competitive position. For IBM and Buffett, the focus on share buybacks was a strategic mistake.  

3. Straying from his expertise

Buffett had long refused to invest in tech companies, claiming that he doesn't know how to value them, and that due to the changeable nature of the industry, their futures are difficult to predict.

In 1996, during the internet boom, he wrote in his annual letter to shareholders, "We are searching for operations that we believe are virtually certain to possess enormous competitive strength ten or twenty years from now. A fast-changing industry environment may offer the chance for huge wins, but it precludes the certainty we seek."  That "fast-changing industry environment" seems to be what torched his investment in IBM.

Historically, Buffett has focused on relatively simple, consistent businesses like banking and insurance companies, energy producers, and consumer goods companies like Coca-Cola. Notably, Berkshire increased in its investment in Apple and the same time it dumped IBM. With its reliance on the iPhone, Apple may be easier to model than most tech companies, but the sector is always going to be more unpredictable than the corners of the market that Buffett generally favors. That may be a lesson worth remembering for his followers and investors as well. 

Jeremy Bowman owns shares of Apple. The Motley Fool owns shares of and recommends Apple and Berkshire Hathaway (B shares). The Motley Fool has the following options: long January 2020 $150 calls on Apple and short January 2020 $155 calls on Apple. The Motley Fool has a disclosure policy.