NEW YORK, NOV. 26 -- At a time when the New York economy already is reeling from the slump on Wall Street, some leading securities firms are threatening to compound the city's troubles by fleeing to cheaper addresses in Connecticut or New Jersey.

Morgan Stanley & Co., one of New York's most profitable and prestigious investment houses, has triggered a small panic among local political, business and cultural leaders by making it known that it is thinking of moving its headquarters, and 4,200 jobs, to Stamford, Conn.

Another big Wall Street firm, Smith Barney Harris Upham & Co., also is considering pulling up stakes when its current leases expire in 1995, possibly to move to a building that its parent company leases in Greenwich, Conn. Prudential-Bache Securities Inc. is weighing moving its "back office" record-keeping staff -- which accounts for 2,000 of the firm's 5,000 jobs in Manhattan -- to Jersey City, N.J.

The threatened departures are especially troubling to New York because the city always had felt secure that the securities and investment banking industry would stay put. While New York has suffered for more than 20 years from a relatively steady exodus of headquarters of big, nonfinancial corporations -- and even the computer centers of some Wall Street firms -- the major companies active in the financial markets have kept their main offices in Manhattan.

"The thing that is different today is that some financial services firms are now taking a serious look not just at whether an operations center or data office should be in the city, but at whether the headquarters itself should be in the city," said Daniel S. Bayer, vice president for economic development of the New York City Partnership, a coalition of business and civic leaders who address the city's economic and social issues.

If Morgan Stanley or another big firm were to depart, Bayer said, it would send a negative signal "about the future of the city as the world financial capital."

The departures are hardly imminent, as the big firms are now only in the process of reviewing whether they will want to leave late in the decade.

But New York got a taste earlier this month of what may be in store for it, when the city had to fight to stave off what it viewed as a potential disaster by persuading four major commodities exchanges to build a new headquarters in Manhattan rather than move to Jersey City. A defection by the exchanges, which include the ones where oil and precious metals are traded, would have cost the city 11,700 jobs.

The price of keeping the exchanges was steep. The city and state governments coughed up a total of $145 million of tax relief and other incentives, just when their soaring budget deficits are forcing them to plan to lay off thousands of public employees.

The two main lures of areas away from New York are less costly real estate prices and lower taxes. Although it always has been cheaper to set up shop outside the city, fixed expenses have become a more important factor now because the industry's profits have slumped owing to the weakness of financial markets and a steep drop in business volume.

Potential savings can be dramatic. In attractive locations in Connecticut, the cost of leasing office space is less than half of the price in Manhattan. In convenient New Jersey spots, real estate taxes annually are $2 to $4 per square foot, compared with $9 to $12 in downtown Manhattan -- a substantial difference for firms in the market for as much as 1 million square feet.

In addition, the rising sophistication of trading and telecommunications technology has steadily reduced the need for a firms' employees to be physically close to the New York Stock Exchange or other marketplaces. This trend was convincingly demonstrated by convicted financier Michael Milken, who successfully moved Drexel Burnham Lambert Inc.'s entire "junk bond" operation from New York to Beverly Hills, Calif., so that he could be near his hometown of Encino.

"These days, with the kind of telecommunications that exist in the business, you can operate an awful lot of the departments outside the city," said an executive at a company thinking of leaving New York. "You could put trading almost anywhere these days."

Nevertheless, New York still offers significant advantages. While electronic trading can be done from distant locations, the financial deals for which New York is renown thrive on face-to-face contact, and it presumably will be a long time before the suburbs can match Manhattan's critical mass of wheeler-dealers, decision-makers and fixers. New York also offers access to clients, convenience for commuters and the intangible psychological benefit of working in an exceptionally dynamic environment.

"There's a question about whether your people will be as productive if they're looking out the window waiting to hit the golf course at 5," said an investment banker whose firm is weighing departure.

New York is also concerned about losing Wall Street jobs because they pay well, more than double the average salary for the city. In addition, the downturn in the industry since the 1987 stock market crash already has cost the city more than 40,000 jobs, and is the main cause of New York's current economic slowdown.

Sally Hernandez Pinero, deputy mayor for finance and economic development, expressed confidence that Wall Street would remain loyal to the city. She said the recent real estate slump had made Manhattan prices more competitive and predicted that firms would continue to believe that a New York location was worth paying a premium. "In New Jersey, you can't have breakfast at the Plaza or the Regency, or wherever the power breakfasts are being held these days," Hernandez Pinero said.