The severe drought that has made losers of thousands of Midwest grain farmers this summer is making winners in the frantic trading pits of the world's largest commodities market in Chicago.

In an inevitable supply-and-demand counterpoint to the dry-spell troubles of the Corn Belt, prices of corn and soybeans futures contracts are soaring in supercharged trading sessions at the Chicago Board of Trade.

Corn is up from $2.91 a bushel to $3.57 since July 1, and soybeans have jumped more than $2 a bushel, from $6.10 to $8.36 in the same period.

On Wednesday, corn and soybeans registered their second "limit up" day in a week, when corn prices jumped by a dime a bushel and beans were up 30 cents--the maximum amount permitted in a single day's trading. Today, the market cooled off a little, but corn prices still climbed almost 3 cents and beans were up 26 cents.

After almost three years of doldrums for the hundreds of people who make their livings by trading carloads of commodities, a bull market is charging through the agricultural commodities trading floor in the Board of Trade's gleaming new annex on the Chicago Loop.

Speculators are pouring money in, gambling that the combination of drought and the Reagan administration's Payment In Kind acreage reduction program will drive grain prices higher and higher. Meanwhile, the big food-processing companies and other grain users are buying futures contracts now, hoping to save money on grain to be delivered next year, when supplies are expected to be tight and prices even higher.

Heavy purchases also are being made by European and Japanese buyers who were caught napping in the 1980 bull market--the last time grain prices took off like this. The foreign buyers waited too long in 1980 and wound up paying premium prices.

Chicago's two big commodity markets, the Board of Trade and the rival Chicago Mercantile Exchange, trade contracts for future delivery of everything from corn, beans and pork bellies to government insured mortgages and U.S. government bonds. Although few bushels of beans ever change hands, the futures markets help set prices for dealers who handle the physical commodities.

The most closely watched contract is the one for short-term delivery, usually the following month. On July 1, corn for delivery in August was selling for $3.19 a bushel. Today, corn futures for September delivery is $3.57 a bushel--a gain of almost 12 percent.

Paine Webber's longtime expert Sherman L. Levin calls corn "the flywheel of American agriculture."

Soybeans, a $2 billion annual farm commodity, showed an even more dramatic increase. On July 1, bean futures for August delivery were trading at $6.10 a bushel; today, the price of beans to be delivered next month was $8.36, up 37 percent.

Four and a half hours a day the Chicago trading pits are a screaming mob scene, even more hectic than the climactic scenes of this summer's hit movie comedy "Trading Places," in which Eddie Murphy and Dan Akroyd make millions in the New York orange juice market.

Standing on the edge of the soybean pit was Royal D. Reid, a Kansan with a wheat and cattle farm who also trades commodities. "This is really a weather market. Every day is so critical to the harvest situation," he said in a friendly drawl above the din of the pit and the constant motion of messengers and traders.

Spurred by the bull market in soybeans and corn, trading volume at the board has rocketed upward this summer. A single-day record was set last week, when 395,000 contracts changed hands in the commodities and money futures markets.

When the price of corn goes up the limit of 10 cents in a day, the value of a single 5,000-bushel futures contract jumps by $500. The big traders handle 10 or 100 or more contracts, often buying and selling contacts for thousands of bushels of grain in a single day.

Very little, if any, of these price increases will filter down to the hard-pressed farmers, whose production costs remain constant even though their crops are shriveling. The price of each bushel they sell may go up, but the number of bushels they harvest goes down.

Susan Hackmann, grain market analyst for A. G. Becker Paribas, a broker, said, "I'm sure they don't altogether welcome drought-high prices. It doesn't offset the loss in bushels, no matter how high the price.

In 1982, she said, the average yield for Corn Belt farmers was 134 bushels an acre at an average price of $2.30 a bushel, for a return of $308 an acre.

But this year, the Illinois secretary of agriculture recently estimated that yields in the major grain-producing state will not be more than 90 bushels an acre, with an anticipated price of $3.20 a bushel. Even though that is a 39 percent price increase, the return to farmers is expected to fall to $288 an acre.