It's good to have some commodities in your portfolio, according to a recent academic study slated for publication in the Journal of Investing. The study, Is Now the Time to Add Commodities to Your Portfolio? asserts that commodities are a valuable hedge against inflation and that they will protect long-term stock portfolios from big declines.

That's probably true, and especially so when an economy is in recovery and flirting with inflation. But also true is the fact that the commodities markets carry risks of their own. Their prices can be subject to manipulation and whip-sawing trades by big institutional investors. Values can jump or plummet in a hurry. Commodities can be expensive to hold, and they can cost you more in taxes than other investments.

Here's how to make the commodities market pay for you, instead of the other way around.

-- Time it right. The study's authors, a group led by Robert R. Johnson of the Certified Financial Analyst Institute, assert that commodity investments perform best at certain times, and investors should be tactical about when they buy them. Specifically, they suggest that commodities should be held while the Federal Reserve is pursuing a restrictive economic policy, tightening money and raising short-term interest rates. We are on the cusp of just such a period. Typically, the Fed starts to tighten when a recovery has taken secure hold and the top economists start to worry more about inflation than they do recession.

-- Buy enough, not too much. The study says a stock portfolio should be more than 5 percent in commodities. A traditional rule of thumb has been to keep 10 percent of your portfolio in commodities.

-- You're already too late to get in early. Oil prices have doubled in a little more than a year, and gold has gone from $650 an ounce to $1,172.50 in three years. Commodities mutual funds have returned 46 percent in a year. So, if you were intending to jump on commodities, you should have already done that. However, producer price and consumer price inflation have both mainly been under control. If they start to spiral, commodity prices have more room to increase.

-- There are many different ways to buy commodities. You can buy a mutual fund that specializes in companies -- like paper and metal firms -- that produce commodities, on the theory that they will profit if those underlying prices rise. Funds in that category include Fidelity Select Natural Resources and Vanguard Precious Metals and Mining. You can purchase the real commodities, via exchange traded funds like SPDR Gold Shares, which actually owns stockpiles of gold. You can purchase Exchange Traded Funds that follow broad commodity indexes, such as the S&P GSCI Index Trust or PowerShares DB Commodity Index Tracking Fund. They all have advantages and disadvantages; company stock index ETFs may be the cheapest way in, but they may not be as rewarding as some more direct methods. Whatever route you choose, look for low fees as compared to the rest of the same category.

-- Taxes may be an issue. Profits on collectibles are taxed at a higher rate than profits on stocks and bonds, and actual commodities -- like the gold in that gold fund -- may be considered collectibles. Their profits could be taxed at 28 percent instead of the 15 percent long-term capital gains rate that applies to stocks. Furthermore, exchange traded funds that trade futures contracts could be subject to additional taxable gains at year-end as they are required to count and distribute profits in unsold contracts.

Bottom line? This makes tax-deferred retirement funds a good place to hide those commodity investments. You won't have to pay taxes on them until you withdraw the money in retirement, and then it will be taxed as ordinary income.

-- TIPS may be an alternative. Treasury inflation protected securities will protect your money from inflation too. In fact, the well-known and widely held Pimco Commodity Real Return Strategy Fund is stuffed full of them. They won't provide the kind of skyrocketing returns that metals will in the middle of an inflationary boom. But they will make sure your earning power stays stable.

(editing by Gunna Dickson)