Over the past week, the Dow Jones Industrial Average has fallen by nearly 700 points, mainly fueled by fears of a global trade war. And there's no reason to think the volatility will subside anytime soon.

However, instead of panicking, it's important to take a step back and assess the situation from the standpoint of a rational, long-term-oriented investor. And there's no better rational long-term investor to learn from than Berkshire Hathaway (NYSE: BRK-A) (NYSE: BRK-B) CEO Warren Buffett. Here are five principles that the Oracle of Omaha uses during volatile markets that you can implement in your own investment strategy.

The stock market is unpredictable -- all the time

In his most recent letter to Berkshire Hathaway shareholders, Buffett said: "The years ahead will occasionally deliver major market declines -- even panics -- that will affect virtually all stocks. No one can tell you when these traumas will occur."

The takeaway: The stock market is unpredictable, and large price swings are normal. And to be perfectly clear, this applies to the upside as well. I'll spare you the statistics lesson, but a gain of 45% or a loss of nearly 23% on the S&P 500 in any single year would not be considered unusual. Manage your expectations (and your reactions) accordingly.

Over the long term, there's only one direction the market will go

"Successful investing takes time, discipline and patience. No matter how great the talent or effort, some things just take time: You can't produce a baby in one month by getting nine women pregnant," Buffett has said.

While stocks can be wildly unpredictable over shorter time periods, they are surprisingly predictable over long periods. Over periods of several decades, the stock market has generated annualized returns of 9% to 10% per year. Since 1965, the S&P 500 has produced annualized total returns of 9.9%, for example, and this includes the dot-com bust, Black Monday in 1987, and the Great Recession. The point: Even the worst crashes are rather meaningless when it comes to long-term returns.

A correction or crash is not a bad thing for long-term investors

Of course, nobody enjoys watching the value of their brokerage account go down. I still look back on 2008 as a particularly traumatic period, and in full honesty, there were times when I considered throwing in the towel when it came to the stock market.

Thankfully, I didn't. I understood one important concept that all long-term investors should know: that corrections and panics are the best opportunities. When Buffett wrote his 2008 letter to shareholders in early 2009, when the market was close to the bottom, he took the opportunity to address the company's declining investment portfolio by saying: "This does not bother Charlie [Munger] and me. Indeed, we enjoy such price declines if we have funds available to increase our positions."

Think of it this way. If you were shopping at your favorite clothing store and everything suddenly became 30% cheaper, would you panic and run to your car? Of course you wouldn't -- you'd probably stock up while the sale was going on. The same logic applies here. From a long-term perspective, a correction or crash is nothing more than a really good sale.

When stocks start to fall, you'll want some financial flexibility

Look back to the Buffett quote I used in the previous section. By far, the most important part is "... if we have funds available to increase our positions."

In other words, a sale is only a good thing if you have the money available to take advantage of it. While I'm not an advocate of keeping large portions of your portfolio in cash, that doesn't mean that you should be 100% invested at all times either. Buffett loves to keep $20 billion to $30 billion in cash at all times on Berkshire's balance sheet (right now there is much more), and my personal preference is about 5% of my total portfolio in cash for the specific purpose of taking advantage of opportunities.

As Buffett says, "Opportunities come infrequently. When it rains gold, put out the bucket, not the thimble."

On a similar note, it's important to avoid using debt (margin) to invest in stocks. While margin investing can make you look like a genius when things are going well, it can amplify your losses and even wipe your entire portfolio out during tough times. In his most recent letter, Buffett wrote: "There is simply no telling how far stocks can fall in a short period. Even if your borrowings are small and your positions aren't immediately threatened by the plunging market, your mind may well become rattled by scary headlines and breathless commentary."

Avoid a herd mentality

One fact that has been well-documented in several studies is that the average stock investor underperforms the market over long periods of time, and by a wide margin.

A major reason for this is over-trading, and at the wrong times. As stocks are going through the roof, investors see everyone else making money, get greedy, and decide to throw as much money as possible into the "it" stocks. And when a correction or crash occurs, these same investors figure that they'd better sell while they still have some of their investment left. Too many investors buy high and sell low -- the exact opposite of the primary goal of investing.

"The most important quality for an investor is temperament, not intellect. You need a temperament that neither derives great pleasure from being with the crowd or against the crowd," says Buffett. In other words, keep your eye on the prize (long-term returns). The short-term noise is a dangerous distraction.

The bottom line: Don't panic

To sum up Buffett's attitude toward volatile markets: Don't fear volatility, keep some cash on the sidelines, and don't be afraid to take advantage of low stock prices even though it seems like everyone else is selling.