Although Wall Street had an enormous stake in the success of the protracted budget negotiations between President Reagan and Congress, analysts are divided over just how much of an impact the budget talks have had on the nation's investors and what the breakdown of the talks will mean..

The waxing and waning prospects of a compromise were just one of many pieces of economic and political developments investors have had to watch. Many analysts think that a belief that the recession will soon end and the recent sharp reduction in the rate of inflation played much stronger roles in shaping investor psychology than did the budget talks, which collapsed Wednesday.

Furthermore, one analyst noted, Congress and the president still appear willing to try to produce a budget with a $105 billion deficit in 1983, far smaller than the projected $182 billion shortfall that officials foresee if taxing and spending policies are not altered.

In early trading yesterday, stock prices fell sharply apparently because traders were disappointed with the stalemate between the White House and Congress. Prices recovered in subsequent trading only to tumble late in the day. The Dow Jones Industrial Average, the most closely watched market indicator, ended at 844.94, down 7.70 points. Yesterday's drop follows a drop of 12.99 points on Tuesday and Wednesday.

Bond prices, even more sensitive to the high interest rates promised by growing federal deficits, fell as well.

Until this week, however, stock prices had been on a six-week climb, the longest rally in a decade. Bond prices had rallied for several weeks before starting to fall this week.

Nearly all analysts agree that unless Congress and the president can devise a package that brings the deficit down sharply for fiscal 1983 and thereafter, the nation will face higher real interest rates--as the Treasury's borrowings increase--and the prospect of renewed inflation and slowed economic growth.

"The interest rate markets will respond poorly, interest rates will remain high," if the deficit isn't reduced, according to Edward Yardeni, chief economist of the brokerage firm E. F. Hutton & Co. "Something has to give and my concern is that it will be the economy again. Then the worst of the recession will return."

But analysts disagreed on the impact of the budget debate on investor decisions. "I think we can lay the fundamental improvement in stock prices since March 8 on the door of the budget compromise," according to Robert Stovall, senior vice president of the major brokerage firm Dean Witter Reynolds Inc. Because the two sides were talking, investors believed a compromise would be reached, he said.

Presumably, Stovall continued, the last three days of declines signify investor despair. However, he cautioned, "The market does what it wants to do and then we assign apparent reasons."

Many analysts disagree with the reasoning of analysts such as Stovall.

James Balog, senior executive vice president of Drexel Burnham Lambert Inc., said that while the markets "probably anticipate a compromise of some sort," long-run factors such as the impending end of the recession have been a bigger factor in the recent upswing in stock prices.

Richard Hoey, chief economist for Bache Halsey Stuart Shields Inc., said that neither the stock nor the bond markets are upset by the deficit this year. "It's not inappropriate for a recession year," he said. He said markets were influenced more by signs of the end of the recession and lower inflation than by political gyrations in Washington or even by the projected deficits of $182 billion for fiscal 1983 and bigger ones after that.

"You're talking about forecasts. Forecasts are a different level of reality than 'now,' " Hoey said.

But Richard Peterson, chief economist for Continental Illinois National Bank, takes the other side. "The budget is the reason the market is dead in the water," he asserted.

Stovall of Dean Witter warns that most of the sharp increases in stock prices that occurred in recent months were triggered by a buying spree on the part of institutions such as pension funds and bank trust departments. Institutions tend to be followers and often tend to be wrong in guessing the future course of stock prices.

Individual investors tend to be the best prognosticators, Stovall said. So far this year, the individual purchaser has been sitting on the sidelines, less optimistic about the economy and inflation than the institutional buyers apparently are.