Here's why it's good to diversify: Things change

— -- Beating the Standard & Poor's 500-stock index used to be the holy grail of money management. In the 1990s, many fund managers tried and failed to beat the mighty S&P 500.

Over the past 12 months, though, you could have outperformed the S&P 500 with a lowly Treasury bill. Or a gold coin. Or a barrel of oil. The average loaf of bread, for that matter, has risen in value more than the beleaguered big-cap index, which has fallen 4.9% over the past 12 months and 12.3% since its October high.

Even lowly money market funds have beaten the average stock fund. The average money fund gained 4.2% for the 12 months that ended March 31, according to iMoneyNet.com.

What's an investor to do? In a word, diversify. In any given year, some investments fare better than others. If you want to protect your portfolio in stormy times, you need some investments that don't march in lockstep with stocks.

It's not that the S&P 500 has posted an unusually bad year. It's down about 5% over the past 12 months. The blue-chip index has fallen between 0% and 10% during 13 calendar years since 1926, according to Ibbotson & Associates, a research firm.

The S&P 500 has gained between 0% and 10% during 12 calendar years.

The items that have outgained the S&P 500 over the past year help explain the index's downfall. For example:

•Commodities. Prices of raw materials, from food to oil to steel, have soared for the past 12 months. The Reuters CRB commodity index jumped 26.7% over the 12 months that ended March 31.

The biggest gainer? Oil. A barrel of West Texas light intermediate crude cost $61.51 a year ago, vs. $109.09 Monday.

But even excluding energy, the Reuters CRB index has jumped 16.6%, fueled by rising prices for fats and oils (up 37.4%), raw industrial materials (up 16.2%), metals (up 31.6%) and grains (up 69.6%).

The surge in commodities prices squeezes stocks in more than one way. Higher prices for food and energy leave consumers with less disposable income. They're less inclined, as a result, to eat out, buy new cars or splurge on new electronics gadgets. Companies that rely on consumer discretionary spending then see their earnings lag.

Higher prices also hurt companies that produce finished goods, from autos to washing machines. That's because they have to pay more for raw materials. Those higher prices squeeze their profit margins.

•The dollar. The value of the U.S. dollar has taken a beating on the foreign currency markets. The euro now costs $1.57. That compares with $1.21 just 12 months ago. The Japanese yen has gained 15.4% against the dollar, too.

The dollar's fall is a mixed blessing for stocks. On the one hand, earnings from foreign subsidiaries gain in value once they're translated from foreign currencies back into dollars. On the other hand, a falling dollar makes U.S. stocks less appealing to foreign buyers.

•Bonds. Bond yields fall when bond prices rise. Lower interest rates generally benefit stocks. The problem is that bond yields fall when bond traders fear that a financial slowdown is coming.

Right now, the bond market is betting that the U.S. economy is still sliding. And because banks are less willing to lend, interest rates for corporate borrowers and mortgages remain stubbornly high. Until those rates drop, stocks are likely to struggle.

Unless you plan to stockpile bread or start a scrap metal smelter, your best bet is to look for funds that tend to fare well during inflationary times. A few suggestions:

•PowerShares DB Commodity Index fund DBC. It tracks a basket of commodities.

•Market Vectors Agribusiness ETF MOO: Tracks agriculture-related stocks.

•iShares Comex Gold Trust IAU: Tracks the price of gold; one share equals one-tenth the price of an ounce of gold.

Finally, if you're a long-term investor, be patient. Though a year of rising stock prices doesn't always follow a down year, most experts say stocks are now reasonably priced, relative to earnings. And that's the time to buy, not sell.