The hog and cattle futures’ rally to multiyear highs is making some veteran market observers a little queasy.

Speculators, betting that prices will continue rising into summer, have built heavy long positions in CME Group live cattle and lean hog futures. The total number of open contracts, known as open interest, reached a record in live cattle futures last week, according to CME.

While buying from commodity funds and other speculators contributed to this year’s futures rallies, the markets may be setting itself up for an abrupt sell-off if speculators decide to unload long positions en masse, analysts caution.

“We have to be careful about getting overexcited” as cattle and hog prices climb, said Paul Nelson, a livestock analyst with EHedger, LLC in Chicago. “It’s important to keep in mind that everything comes to an end.”

In late trading today, June live cattle futures rose 1.5 cents to 95.075 cents a pound. April cattle rose 2.475 cents to 99.725 cents, after reaching 99.8, the highest price for a closest-to-expiration contract since September 2008.

June lean hogs rose 0.45 cent to 84.75 cents a pound, after rising to 85.9 cents, a life-of-contract high for the third consecutive day.

Speculators have played commodity futures for decades, but their role in the markets has come under increased scrutiny in recent years, especial after crude oil surged to a record above $147 a barrel in July 2008. Commodity funds were also big buyers in grains in 2008, as corn futures rallied to a record.

This year, speculators, seizing on shrinking U.S. livestock herds and bullish chart patterns, have loaded up on cattle and hog futures. Livestock, Nelson said, is “the flavor of the day.”

At the end of March, swap dealers and managed money – the two largest categories of speculators tracked by federal regulators – held a total of 238,255 long futures and options contracts in CME live cattle, according to the U.S. Commodity Futures Trading Commission.

That long position, more than double the tally of 113,335 a year earlier, accounted for almost 53 percent of total open interest, according to the CFTC. Swap dealers and managed futures held just 10,128 short positions at the end of March.

Speculators tend to build their largest long positions in an up-trending market and their largest net short positions in a down-trending market, Darrell Mark, an agricultural economics professor at the University of Nebraska, said in a report last month.

Additionally, speculators “tend to immediately reverse their positions when the price changes direction,” Mark said in the report. Thus, speculators “will often have their largest long positions when prices are highest, and vice versa.

Cattle futures’ rally may reverse course by Memorial Day, Nelson said. That’s because commodity funds probably will start closing out of their long positions in June futures before the contract expires. Additionally, August futures, the contract month following June, are currently trading about 1.7 cents below June, Nelson noted.

The fund long position in live cattle is “huge,” Nelson said. “It’s a very large position that’s going to have to move out of that June contract by the first of June. When the fund guys bought, June cattle was at substantially lower prices.”

Cattle price patterns this year are reminiscent of 1993-94, when a harsh winter curbed animal weights and beef production, Nelson said.

During 1994, the nearby cattle futures contract rallied from a February closing low of 71.7 cents a pound to 77.875 cents, a high for the year, on April 8. The price then tumbled as much as 20 percent, reaching a low for the year of 62.275 cents June 27.

The cattle market may be in store for a similar path this year, Nelson said, noting the potential that a steep runup in beef prices may crimp demand.

“People will back away from buying food at the same pace when it’s expensive versus when it’s cheap,” Nelson said. “High prices cure high prices.”