Warren Buffett. Source: Motley Fool Flickr.

It has been a rocky week for Warren Buffett. Two of his biggest holdings, Coca-Cola (KO 0.31%) and IBM (IBM -8.25%), delivered disappointing financial results, and they have caused considerable damage to the portfolio value of Berkshire Hathaway (BRK.A -0.30%) (BRK.B -0.26%). However, there is no reason to feel sympathetic for Buffett; in fact, the Oracle of Omaha is probably thrilled about his short-term losses.

Don't worry about Warren Buffett
In Berkshire Hathaway's 2011 letter to shareholders, Buffett explained the rationale for taking a big position in IBM stock. Earnings consistency and operational improvements over the years were major considerations, as was the company's generous share buyback policy and smart financial management.

In the same letter, Buffett expressed what his hopes are for IBM's stock price in the years ahead: 

Today, IBM has 1.16 billion shares outstanding, of which we own about 63.9 million or 5.5%. Naturally, what happens to the company's earnings over the next five years is of enormous importance to us. Beyond that, the company will likely spend $50 billion or so in those years to repurchase shares. Our quiz for the day: What should a long-term shareholder, such as Berkshire, cheer for during that period?

I won't keep you in suspense. We should wish for IBM's stock price to languish throughout the five years.

Things are hardly any different for Buffett when it comes to Coca-Cola. Buffett has never sold a share of Coca-Cola since he started investing in the company in the late 1980s, and he said at Coca-Cola's annual meeting in April 2013 that he never plans to sell, either. 

When you invest in high-quality companies, the value of the business tends to rise over the long term. Falling stock prices are generally buying opportunities as long as the company's fundamentals are not deteriorating in a permanent way. As Buffett put it in his 2011 letter:

The logic is simple: If you are going to be a net buyer of stocks in the future, either directly with your own money or indirectly (through your ownership of a company that is repurchasing shares), you are hurt when stocks rise. You benefit when stocks swoon. Emotions, however, too often complicate the matter: Most people, including those who will be net buyers in the future, take comfort in seeing stock prices advance. These shareholders resemble a commuter who rejoices after the price of gas increases, simply because his tank contains a day's supply. 

Get what you wish for
Coca-Cola and IBM are both industry leaders with rock-solid competitive strengths that generate tons of cash flow on a consistent basis. However, the two both companies face considerable difficulties when it comes to generating sales growth, and their recent earnings reports have been quite disappointing.

Consumers around the world, especially in developed markets, are moving away from soda consumption due to health concerns. Coca-Cola is betting on healthier drinks and emerging markets expansion for growth, but this has not been sufficient to compensate for the weakness in its traditional sodas business. In this context, Coca-Cola reported just a 1% year-over-year increase in global volume during the third quarter, while reporting revenue was flat versus the same period in 2013.

IBM is going through a profound transformation process. The company is cutting costs and selling its hardware-related businesses to focus on software and services, which generate substantially higher profit margins and better opportunities for growth. Transformations are seldom easy, and corporate spending has been below expectations lately, dropping IBM's reported revenue by 4% during the third quarter and forcing adjusted revenue down by 2%.

Mr. Market has not taken the disappointing news well: Coca-Cola stock fell by more than 6% after releasing earnings, while IBM is down by almost 11% over the last week. Coca-Cola and IBM are Berkshire Hathaway's second- and fourth-largest positions, respectively, and the losses in these two names amount to roughly $2.5 billion in the last week.

Buffett has built one of the largest fortunes in the world by capitalizing on opportunities to buy high-quality companies at discounted prices, so he understands that falling stock prices can be good news for investors. His words are an extraordinary piece of advice to keep in mind in times of increased market volatility.