What would happen to gasoline prices if commodities traders investing hundreds of billions of dollars could bet only that oil prices could go one direction - up - in the future?

If your response is that no one in his right mind would design a market like that, you'd only be partly correct.

You'd be right because it would mess up the market, big time, and be a recipe for volatility. Oil prices would regularly be pushed up beyond the natural results of supply and demand - the fundamental forces that, in balance, are supposed to produce what economists call efficient pricing. And at the end of that unnatural boom in prices, you'd get a bust.

But you'd be wrong in one key respect, according to experts such as Wallace Turbeville, a former Goldman Sachs vice president: Over the last 15 years, and especially since 2004, that's exactly how a crucial portion of the commodities market has developed - less because of some foolhardy design than because of the unintended consequences of deregulation and too-clever-by-half "financial innovation."

As U.S. gasoline prices again approach a national average of $4 a gallon, consumers are understandably worried, much as they were four years ago, when worldwide oil prices peaked at more than $145 a barrel and gasoline neared prices unseen, in real dollars, since 1981.

Back then, $4-a-gallon gas offered a campaign issue for Democrats - though one that vanished long before the election, thanks to the financial crisis that led oil and gas prices to plummet. This year, Republican candidates have seized on gas prices in their fight against President Obama. But this issue, which also affects other critical commodities such as food, is too important to dismiss as an ordinary political football.

Plenty of sophisticated people like to dismiss the idea that excessive speculation can play an important role in the price of oil. Instead, they insist that more fundamental factors, such as rising demand from China or Middle East tensions, are always the primary drivers.

But critics of loose regulation such as Turbeville, an expert in the complex financial instruments known as derivatives, say such excess faith in markets overlooks a critical issue: While some speculation is essential to making commodities markets work, poorly designed investment vehicles can be hugely damaging.

Futures contracts - which set a price for the delivery of a particular commodity in, say, six months or a year - are not themselves to blame. They're the grease that makes these markets function. Futures allow businesses like power companies or airlines to hedge against increases in fuel costs, or food processors to smooth over fluctuations in the price of wheat and corn. Wall Street plays an invaluable role, too, since financial investors - those betting that prices will fall, as well as those betting they'll rise - provide crucial liquidity.

The problem is that speculators have come to dominate the oil futures market, holding an estimated 80 percent of futures contracts. And Wall Street has proved again that it can make billions of dollars from supposed financial innovation even as devils lurk in the details.

Want another example? Look no further than the complex mortgage-backed derivatives that helped bring down the U.S. economy in 2008. A key problem then was that the bankers' bets were predicated on an assumption we now recognize as magical thinking: the belief that, despite local fluctuations, overall U.S. home prices would always tend to rise.

There's a different devil in two common commodities investments, according to Turbeville and a fellow critic of loose regulation, University of Maryland law professor Michael Greenberger. Both hoped the problem could be addressed indirectly by the Dodd-Frank financial reform, which aimed to reimpose limits on how much a single bank or trader could control in a commodities market. Last week, they joined in urging Congress to address the problem directly by banning both investments: commodities index funds and commodities exchange-traded funds.

Turbeville, now a senior fellow at the New York think tank Demos, says these so-called "synthetic" investment vehicles were developed in the 1990s by banks such as Goldman Sachs and JPMorgan Chase with what sounded like a reasonable aim: to allow investors to diversify. In addition to holding traditional assets such as stocks and bonds, the pitch was, they could own a piece of the commodities market.

What makes the investments synthetic is that the banks don't actually buy the basket of commodities, or even a basket of futures contracts. Instead, they essentially invite investors to bet that the theoretical basket of commodities will rise in price - a familiar model for investors, who typically buy assets hoping their value will rise.

The problem? The investment structure means that the banks themselves are betting that the commodities basket will fall in value. So to protect themselves, they hedge in the futures market - offsetting their own casino-style bets on falling prices with real contracts betting oil or wheat prices will rise.

Greenberger, former director of trading and markets for the Commodities Futures Trading Commission, says the market for these casino bets - also called commodity index swaps - tops $400 billion a year, easily enough to distort prices.

"I've sat in many hearings where Goldman and Morgan and others have said the only way investors can bet on these swaps is by betting that the price goes up," Greenberger says. "They walk out of the casino into the real market, and they overwhelm the market. Their bets send a signal that there's a supply shortage, because no one can decipher what's a real hedge from what's a casino hedge."

Turbeville says the investments exaggerate buyer-side pressure ("It's as if big pension funds were hoarders of oil.") and encourage those who hold the actual commodity to behave differently ("Why should I part with my oil now if I can store it for a month and make more money?").

Eventually, the music stops and somebody loses - booming prices turn to a bust. But meanwhile, Wall Street profits, and consumers pay. And blind faith in markets strikes again.

Contact Jeff Gelles at 215-854-2776 or jgelles@phillynews.com.