If first-half trends continue over the next six months, this could be the year of commodities. Stocks have fared poorly, bonds worse, but commodity investors have seen gains from the rising prices of everything from oil to steel to meat.

So, if you're looking for a piece of the action, investment professionals say it's best to spread the risk throughout the futures markets, rather than betting big on soybean contracts and taking a beating in these fast-moving and often volatile markets.

Whether investors buy into mutual funds that invest in commodity baskets or commodity-related equities, or take on a bigger commitment with some of the closed-end partnerships that follow futures indices such as the Goldman Sachs Commodity Index or the Dow Jones AIG Commodity Index, financial advisers warn that any move into these volatile markets requires a good deal of research to make sure you know what you own. Most funds that offer some type of commodity exposure are heavily weighted to the energy sector, which has been especially volatile over the last several months.

But once you know what you're buying, many investment professionals say a small allocation of 5% to 10% of your portfolio is a smart move.

"That would be the maximum allocation," says Jim Baer, managing member of Uhlmann Price Securities, which sells the Rogers International Raw Materials Fund, a limited investment partnership based on an index devised by the high-profile investor Jim Rogers, best known for his book Investment Biker.

"As far as your portfolio's concerned, this will give you a noncorrelated investment that normally works the opposite of stocks and bonds, and real estate," Baer says.

Lynn Russell, a mutual fund analyst at Morningstar, says most small investors get exposure to commodities through funds, either the ( PCRAX) Pimco Real Return fund or the ( QRAAX) Oppenheimer Real Asset fund, which invest in commodity indices, or in any of the 40 or so natural resources equity funds, which led the fund tracker's performance categories last year with an average return of 32%, well ahead of the S&P 500's 22.3% gain.

Russell says resource funds -- which take on commodities by investing in oil, timber, mining and agricultural companies, for example -- continue to outpace the S&P this year, but that buyers should know funds such as the ( VGENX) Vanguard Energy don't offer the same diversification as the direct commodity buys.

"It's not just that it's apples and oranges," she said. "Some are actually kumquats. Equities don't move in lockstep to the commodities themselves. The funds that invest in equities are going to move differently than the commodity funds do, and there is much more variability in how different types of equities behave."

She and others say the recent boom in commodities owes much to the rapid pace of development in large emerging markets, especially China and India. That opens an investor up to geopolitical risk, and that can mean wide price swings if a national economy slows. Combine that with the recent volatility of the oil market, and it's no surprise that Michael Kitces, a financial planner in Columbia, Md., urges caution, telling small investors to avoid any sort of individual futures contract.

"They're big markets and they move very quickly, and you can't possibly have more information about them than the people on the trading floor," he says. "By the time you hear the Florida orange crop is bad and orange juice futures are tanking, the price is already down. It's virtually impossible for you to make winning trades on information that others don't already have. You can't analyze commodities like stocks."

But investors who want to try their hand at timing those markets in some fashion can head for a quartet of funds offered by Maryland fund company Rydex, which allows rapid trading of its funds. The no-load funds that focus on exposure to commodities are ( RYBIX) Rydex Basic Materials , ( RYEIX) Rydex Energy and ( RYVIX) Rydex Energy Services , all of which carry a 1.39% expense ratio. The ( RYPMX) Rydex Precious Metals fund charges investors 1.27% a year.

Private partnerships such as the Rogers fund and the Price Fund I, which Uhlmann also sells, are only a few of the offerings investors with slightly larger portfolios can consider. Since he recommends a relatively low percentage allocation, putting a 5% stake in the Rogers Fund, which requires a $10,000 minimum, might be appropriate for someone with an investment portfolio of about $200,000.

Large financial institutions such as Merrill Lynch, ABN Amro and Morgan Stanley all have large commodity futures trading programs, but investors can only gain access through registered broker-dealers.

While investors don't face the same restrictions as they would with hedge funds, which generally require a minimum investment of $1 million, there are a variety of state-level restrictions that require investors to prove a certain net worth.

The Rogers fund has monthly liquidity, which allows investors to withdraw or deposit money on the first of the month. It charges a 6% subscription fee for investments of $10,000 to $25,000. Fees drop as the size of the investment increases, with a 5% bite up to $250,000 and 4% thereafter. It charges annual fees of about 1.85%. The Price Fund charges a 4.5% sales fee.

Baer says the Rogers index is also weighted heavily toward energy, with oil representing 35% of its contracts and another 9% in gasoline, natural gas and heating oil futures. Crude futures rose sharply this spring, largely because of high demand and terrorist attacks that threatened supplies, but Baer says that movement benefited even relatively small investors, who had gains to offset losses in stocks and bonds.