The heads of nearly all major Wall Street firms said yesterday that the compromise Congressional budget resolution contains accounting gimmicks and unrealistic assumptions and will not prevent large future budget deficits. As a result, they said, fears of high inflation have driven interest rates upward sharply in the last few weeks.

The executives, led by former Commerce secretary Peter G. Peterson, said they believe Congress won't come close to paring $172 billion from a projected deficit of $250 billion in 1985, as the budget compromise promises.

Peterson, chairman of the investment banking firm Lehman Brothers Kuhn Loeb Inc., said that Congress "reportedly was trying to send a message to the financial markets. The markets apparently have sent back a mesage of their own. The budget resolution has clearly not succeeded in shifting the markets from anxiety to confidence about the nation's fiscal future."

The Wall Street executives aligned themselves in a statement with a bipartisan "appeal" from five former Treasury secretaries and Peterson last month that called on Congress and the Reagan administration to reduce spending for sacrosanct programs like Social Security and to make bigger reductions in the growth of defense spending. The Treasury secretaries span all five administrations from Kennedy to Carter. Peterson was President Nixon's Commerce secretary in 1972 and 1973.

Peterson, in an interview, said the former government officials will try to draw into their effort corporate executives, labor unions, civil rights groups, academicians and economists.

The former cabinet officials and the Wall Street executives said it is a mistake to concentrate cuts in social spending on need-related programs such as welfare, food stamps, medicaid and child nutrition while refusing to touch programs like Social Security and veterans pensions that largely benefit middle-class and upper-class citizens. They said the $33 billion in nondefense savings "is so structured as to be neither equitable nor credible."

The brokerage and investment banking firm officials said that by 1985 need-related programs, which have felt the brunt of the budget cutters, will total only about $87 billion, while the largely untouched programs like Social Security will total $385 billion. They said Congress must look to savings in Social Security, perhaps by restricting automatic cost-of-living increases (which have pushed up benefits far faster than salaries in the last few years). If cuts remain concentrated in programs for the poor, there will be "unnecessary social division and hardship," they said.

They said many of the budget resolution's proposed "savings" in 1985 are unlikely to materialize. The budget resolution assumes that interest rates will fall to 6.9 percent, from today's 14 percent, and that the growth in federal debt will slow so much that the federal government will save $57 billion in 1985. That is one-third of the $172 billion the budget projects it will trim from the projected $250 billion 1985 deficit.

"Another $23 billion of the resolution's deficit reductions represent so-called 'management savings' and questionable outlay estimates. These are economies which the Congress hopes, against all experience, that the Executive can somehow accomplish on its own initiative," the Wall Street officials' statement said. The group cited an assumed $5 billion in increased offshore oil leases during a period in which oil prices and exploration is decreasing.

Among the Wall Street executives signing the statement yesterday were the heads of such prominent firms as Merrill Lynch, Shearson/American Express, Salomon Brothers, Paine Webber, Morgan Stanley, Drexel Burnham Lambert, Bache, Goldman Sachs, First Boston, Lazard Freres, Kidder Peabody, E. F. Hutton and the presidents of both the New York and American stock exchanges.