Agricultural-equipment stocks are due for a rebound because their machines are in greater demand after a surge in commodity prices, according to UBS AG.

Demand for farm machinery is rising along with prices, according to a report yesterday by Henry Kirn, a UBS analyst. He based this conclusion on a semiannual survey of U.S. dealers for Agco, CNH and Deere & Co. (DE) equipment.

“Dealers are generally optimistic,” Kirn wrote. Seventy-one percent of the survey participants expect sales to increase this year. The percentage is the highest since 2004. Prices for new and used farm machines are generally rising, the report said, and inventories of older gear are below normal levels.

Agco and CNH were raised to “buy” from “neutral” at UBS in response to the results. Their shares had losses of 12 percent and 14 percent for May, respectively, as of yesterday’s close. Deere, previously rated “buy,” was 13 percent lower.

UBS has conducted the farm-equipment dealer survey since 1997. The latest results were based on responses by more than 300 dealers to a mailing in late March, the report said.

Corn for July delivery settled yesterday at $7.455 a bushel in Chicago. The price was 6.7 percent away from the record for a most-active contract: $7.9925 a bushel, set in June 2008.