At the beginning of every year, the legendary Warren Buffett publishes his annual letter to Berkshire Hathaway shareholders. By now, it's become more of an annual letter to the world, and in it, Buffett offers his  opinions on everything from politics to investment company fees. 

This year's letter came out over the weekend and in addition to his usual folksy pronouncements on the economy and his company's performance, Buffett offered some invaluable advice to investors, even if they've never owned a single share of Berkshire Hathaway. 

It's advice anyone would be wise to follow. Here are the key points.

1. If the stock market tanks, consider it an opportunity.

A week ago, the stock market shocked just about everyone by tumbling 10 percent--into official "correction" territory--for the first time in two years. It bounced back quickly, but it's been volatile and there may be an even bigger drop to come. 

If that happens, it will be a difficult moment for small investors. There's nothing like watching 10 percent or more of your assets vanish in a day to make you start thinking you should sell the rest before all their value evaporates. Buffett counsels the exact opposite--if the market drops steeply, you should buy, not sell. 

The market can turn on a dime and without warning, he admits. "When major declines occur, however, they offer extraordinary opportunities to those who are not handicapped by debt," he adds. And then he launches into quotes from the classic Rudyard Kipling poem "If--": 

If you can keep your head when all about you are losing theirs...

If you can wait and not be tired by waiting...

If you can think -- and not make thoughts your aim... 

If you can trust yourself when all men doubt you...

Yours is the Earth and everything that's in it.

I don't know if Kipling wanted you to buy stock if the market tumbles, but Buffett definitely does. Or at the very least hang on to the investments you already have until the markets turn upward again. Of course, if you've bought on margin or borrowed money to buy shares, and then they suffer losses, you may be forced to sell to pay your debt. That's why Buffett recommends against using borrowed money for any investment. "There is simply no telling how far stocks can fall in a short period," he warns.

2. Avoid bonds.

In 2007, Buffett famously bet hedge fund company ?Protégé Partners that an index fund that simply held shares in the S&P 500 would outperform any expertly managed fund they could come up with over 10 years. The 10 years ended last year and Buffett won resoundingly.

The bet was for $1 million, to be donated to a charity of the winner's choice, of which each party would pay half. Thus, Buffett and ?Protégé each had to put up $500,000--or at least, investments that would be worth $500,000 by the end of the bet. Accordingly, they each invested $318,250 in 10-year Treasury Bonds that would be worth $500,000 when they matured in 2017. That represented a very decent, if unexciting, 4.56 percent annual return.

But by 2012, Buffett writes, "some very strange things took place in the bond market." As a result, the bonds were now worth 95.7 percent of their face value and could only increase in value another 4.3 percent--or less than 1 percent per year. So the bettors agreed to sell the bonds and buy Berkshire Hathaway shares instead, which means Girls Inc. will now get more than $2 million instead of the $1 million originally planned.

Buffett doesn't point out that the only reason the move was a good idea is that the bonds had already had great returns--more than 10 percent per year--because of the way their price rose in the market. Instead, he wrote: "It is a terrible mistake for investors with long-term horizons ... to measure their investment 'risk' by their portfolio's ratio of bonds to stocks." A bond earning less than 1 percent a year won't even keep pace with inflation, thus losing buying power, he noted. The one exception was for investors who may need their money in the short term, since the stock markets can have a down day, week, or year.

3. Don't do too much buying and selling. 

In another lesson from the bet, Buffett wrote: "Stick with big, 'easy' decisions and eschew activity." During the 10 years of the bet, he estimated the 200 or more hedge-fund managers who worked on Protégé's funds made tens of thousands of buy and sell decisions, backed up with the best research they could find.

Buffett and Protégé made exactly one decision: to sell the bonds and buy Berkshire Hathaway. And their average returns outperformed the funds.

4. Watch out for fees.

The whole point of the bet was for Buffett to prove his contention that money manager fees make managed funds a bad investment because--no matter how smart those managers are--they never outperform the market over time by enough of a margin to make up for the fees. He won the bet handily: His S&P 500 index fund had an average annual return of 8.5 percent per year, whereas the best-performing fund came in at 6.5 percent, and all the others yielded less than 4 percent. (One particularly pathetic fund only earned an average 0.3 percent per year.)

But whether their funds did poorly or well, the money managers kept right on collecting fees, he wrote. "While this group prospered, however, many of their investors experienced a lost decade." His message was clear: Don't let this happen to you.