BOSTON (MarketWatch) — Copper is booming. Oil is booming. Cotton is near historic highs. Soaring raw-material costs are driving up prices for consumers, from the gas pumps to the grocery aisles. And speculators are taking record bets that prices are going to keep going up even higher.

Kasper Kierkegaard, an analyst at Danske Bank, reports from the futures markets that the speculative net bullish positions on many commodities are at, or near, record highs.

When I walked past a TV earlier today someone on CNBC was asking if copper was “the new gold.” That’s funny — I thought silver was the new gold. Maybe silver is the new copper?

Flooding, markets, gas prices

But could the wheels be about to come off this bandwagon? Could commodities be heading for a massive price slump?

Maybe. And that’s the view of someone who is nonetheless incredibly bullish, over the long term, about all of them.

Jeremy Grantham, the chairman of Boston fund firm GMO, needs no introduction. He is Wall Street’s best-known Jeremiah, a skeptical contrarian who presciently warned about the bear market that began in 2000 and the crash of 2007-09.

In his latest letter to investors, Grantham warns that we may be heading toward a major crash in commodity prices — leading to the biggest buying opportunity of a lifetime. Read Grantham’s warning on GMO’s website.

Long-term, Grantham is a huge bull on commodities. He thinks we’re running out of everything. His latest note reads like the treatment for a remake of “Soylent Green,” the apocalyptic 1973 Charlton Heston flick about a starving, baking, overcrowded Earth.

Yet despite this, Grantham puts the chances of a serious price slump across commodities next year at an astonishing 80%. And he gives a smaller, but still significant, chance of a massive collapse.

Yes, it’s hard to imagine, at these prices, that commodities might ever be cheap again. But isn’t that always how it feels in a boom?

Grantham’s logic is simple. It comes in two parts.

First, agricultural commodities are set up for a fall.

We have just lived through the worst year for farmers in memory. Any farmland that wasn’t scorched by drought, as in Russia, was probably destroyed by floods, as in Australia. No wonder prices for so many goods have skyrocketed.

But the chances that this year will be as bad have to be remote.

Agricultural commodities are quicker to respond to prices than almost any other. Farmers just plant more crops. If this year’s weather turns out to be better than last year, says Grantham, “we will drown, not in rain, but in grain, for everyone is planting every single acre they can till… Should both the sun shine and the rain rain at the same time and place, then we will have an absolutely record crop.”

The second factor?

China.

It’s the force driving so many commodities right now. But Grantham, along with some others, increasingly fear that the Chinese bandwagon is about to blow a tire. The country has simply grown so fast, for so long. Trouble is bound to crop up sooner or later.

The warning signs now? Wages are soaring, and that makes China’s cheap labor less cheap. China is pouring just too much money into capital spending — an astonishing 50% of GDP. That must surely be leading to tons of waste and overcapacity — “unnecessary airports, roads, and railroads and unoccupied high-rise apartments,” as Grantham notes. China’s debt levels have grown quickly. And, most ominously of all, China is now deep into a massive housing mania. By some measures it rivals the Japanese housing bubble of 1989.

University of Toronto business school professor Wendy Dobson, a leading expert on the Chinese economy, tells me that Chinese families “are buying real estate at a fast pace in part because prices always rise (sound familiar?)” and because “there are so few investment alternatives to low-interest bank deposits.” She also warns that the country’s entire financial system is “bank-dominated and government-owned,” and there are “a lot of bad loans coming due which governments demanded during the global financial crisis.”

Grantham thinks there’s at least a 25% chance that China will stumble in the next year or two. Some of his colleagues put the figure much higher.

If China does stumble, you can probably just take a red pen and slash the price of every commodity.

Grantham’s conclusion? If either China stumbles, or this year’s weather is better than last year’s, “the commodity prices will decline a lot.” The chance of either event happening? Maybe 80%, he says.

And if both events occur together, “it will very probably break the commodity markets en masse. Not unlike the financial collapse.”

That event, he says, was a “once-in-a-lifetime opportunity” for quick profits, as markets collapsed and then surged again. “If the weather and China syndromes strike together,” he says, and cause a commodity price collapse, “it will surely the produce the second ‘once-in-a-lifetime’ event in three years.”

(Never mind the semantics about two once-in-a-lifetime events in your lifetime. You get the point).

Is Grantham right?

Forecasts are always guesses, and they are subject to events. Lots of things could happen.

But there are reasons, at the least, to be nervous about commodity prices.

They’ve jumped a long way, very quickly. Copper and oil are up by more than 50% in just under a year. Cotton and wheat have doubled from last year’s lows. Many are near historic highs. And this is after an extraordinary decade of price gains. These things rarely occur without plenty of volatility along the way.

Someone buying into commodities at these levels is inevitably taking on a lot of risk for their potential return. Investors’ instincts make them want to buy the things everyone else wants right now. But the way to make real money is to buy the things everyone will want next year.

Grantham’s Soylent Green argument may make sense long-term. But, in the meantime, human beings are pretty good at adapting. They plant more crops, they use less fuel, and they change their consumption patterns. Factories switch from expensive raw materials to cheaper alternatives. Scientists find substitutes. It’s a risky bet to wager on shortages when lots of people are already making the same wager.

And sentiment feels too bullish. Almost everybody seems to agree that high commodity prices are here to stay. And anyone who’s a contrarian starts to get very nervous when everybody else agrees on something.

This isn’t purely subjective. Data from the futures market back it up. Speculators, as noted above, are now sitting on huge bullish commodity bets. That frequently precedes a serious correction. A fair number of these speculators are semi-pro hedge fund managers who are back in the game and gambling, once again, with borrowed money. They are frequently paid to take big gambles, and they will have to buy back positions, quickly, if markets turn.

Anyone who still wants to bet that commodities will rise further might take a look at the equities of commodity-related companies. Miner Freeport-McMoran FCX, +2.08% trades on a modest nine times forecast earnings, Chevron CVX, +0.13% is just eight and a half times. And big gold mining companies look pretty cheap compared to gold itself. Barrick Gold ABX, -1.24% is just eleven times forecast earnings.

As ever, you pays your money and you takes your chances.