"It's a good time to be in the stock business," said Sally A. Behn, president of Ferris & Co., the Washington-based securities firm.

Her comment is an understated description of the booming stock market and the dramatic effect it has had on stockbrokers. The Dow Jones industrial average has climbed about 540 points since late September to close at 1840.40 Friday. As stock prices climbed and the volume of stock trades increased, revenue and profits at Ferris and most other securities firms in the area have kept pace.

"In truth, the last five years have been great, except for a blip last year," said Raymond (Chip) Mason, the chief executive of Baltimore's Legg Mason & Co.

But the last six months or so have been even better.

New customers are pouring into brokerage firms and old customers, enriched by rising prices of the investments they already had made, are increasing their activity.

Customers pay a commission each time they make a transaction through their broker. At most securities firms, the broker keeps part of the commission and the rest goes to the firm. The more transactions a firm processes, the more the profits.

Firms can make money in declining markets too -- as customers rush to sell their securities to cut their losses.

But with stock prices on a steady upward climb, customers are happy. Nearly all of them are making money. "The brokers are doing well, they're happy. And the firm is doing well. It's a delight," said Behn.

Trading is at record volumes on most stock exchanges and at most brokerage firms.

"We're doing a great deal more volume," said James H. Lemon Jr., chairman of Johnston, Lemon & Co. Inc., who declined to reveal the exact amount for proprietary reasons. Johnston, Lemon is privately owned.

At Baltimore's Legg Mason, the average daily volume of transactions was 67 percent higher in the three months ended March 31 than during the first three months of 1985, according to chairman Mason. He said the financial results for the firm's fiscal 1986, which ended March 31, still are being audited, but they should show that revenue will increase to about $110 million from $72 million and that profits will be at a record level.

Carlton Collins, regional director for the Richmond-based Wheat, First Securities Inc., said that during the last two years the firm's revenue increased 500 percent. The number of brokers has only doubled.

Washington brokers said that their business is being helped by the strong performance of the stocks of locally based companies -- including those of many banks in Washington, Maryland and Virginia whose prices have been rising in the aftermath of legislation that permits regional interstate mergers.

Regional securities firms often are the only ones that make markets -- that is, stand ready to buy or sell -- in many smaller local stocks, including most of the bank stocks.

As a result, not only are brokerage commissions rising sharply, so are profits from stock trading. A broker-dealer tries to make money by selling a stock for more than it pays for it. That is why a securities firm's bid (offer to buy) price is lower than its ask (offer to sell price).

"The last four or five months have been the busiest period in the 25 years I've been in the business," said Patrick C. Ryan, senior vice president and manager of trading at Johnston, Lemon. "We've had the busiest single days. I can't remember such a prolonged level of high volume."

The boom in stock prices also promises a heady period for corporate finance departments at securities firms -- the arm of the firm that raises new funds for companies. When stock prices rise, companies find it comparatively cheaper to raise funds by selling new shares of stock to the public.

With interest rates at their lowest levels in years, many companies and governments are finding it attractive to call in some outstanding bond issues and replace the bonds with lower-rate new issues.

Until recently, many individual investors had been cautious about buying individual stocks and seemed to prefer buying shares in mutual funds, according to Lemon. A mutual fund pools the money of large numbers of investors and buys a large portfolio of stocks -- giving the individual investor a broader array of securities than he or she would be likely to assemble by purchasing shares directly.

Wheat, First's Collins said the South Eastern Growth Fund his firm manages was rated second out of the 130 growth funds in the country by Lipper Analytical Services, a firm that follows the securities industry.

Washington Mutual Investors -- a fund affiliated with Johnston, Lemon whose portfolio is managed by a California investment firm -- had assets of $700 million six months ago and has grown to about $1.2 billion today.

Washington-area brokerage firms -- as well as those in the rest of the industry -- say they are handling the surge in trading without any of the operational disasters that plagued the industry in the late 1960s.

The brokerage industry no longer flinches when 150 million or 200 million shares are traded during a single day on the New York Stock Exchange.

In 1968, trading volume in the range of 7 million to 8 million shares a day on the New York Stock Exchange engulfed nearly all the nation's brokerage firms in a sea of paper. Clerical and trading errors mounted. Many trades "failed" -- because buyers and sellers could not be matched up or because the buyer and seller had recorded different prices at which the trade was supposed to have taken place.

In 1968, the exchanges had to close early and shut down completely on Wednesdays just to give the back offices a chance to process the mountains of paperwork, clean up bad trades and transfer stock certificates from sellers to buyers.

Louis J. Schwalbach, director of operations for Ferris, said the advent of the computer and the "immobilization" of stock certificates are the major reason that brokers can cope with trading volumes that would have seemed nightmarish only a few years ago.

Many small trades -- those of 1,000 shares or fewer -- are done automatically by computers that link firms that make markets in stocks not listed on stock exchanges. The stock exchanges themselves have automatic execution for small orders.

The immobilization of stock certificates themselves has cut down on the paperwork too.

Years ago when shares of stock were sold, the paper stock certificates had to be transferred from the seller to the buyer as the final step in a trade.

Today, any buyer that wants the certificates can have them, but most buyers are willing to leave the certificates themselves in special depositories -- which record the transfer of ownership on their books.

The only weak link in the securities business today is municipal bond underwriting -- the result of provisions in the recently passed House version of tax reform. Those provisions make it difficult for many state and local governments to sell new issues of tax-exempt securities.

As a result, the market for newly issued municipal bonds has shrunk dramatically.

The same factors that caused the municipal bond market to retrench in 1986 caused a rush to market in late 1985 by many local governments seeking to beat the Jan. 1 effective date in the House version of the tax bill.

That rush to market caused the only significant paperwork problem in the securities industry, according to Schwalbach.

Because so many securities came to market at once, printers that prepare the bond certificates and banks that serve as "transfer agents" -- getting the certificates from the issuer to the purchaser -- were swamped.

Before the record sales of new municipal bond issues during the last three months of last year, it took between 10 and 15 days from the date of the sale to the actual issuance of the bonds, Schwalbach said. In February the delays were up to 45 days.

But that is a minor annoyance to an industry that is prospering. Investors got used to getting 15 or 16 percent a year on their bank certificates of deposit in the early 1980s, according to Wheat, First's Collins.

Today those certificates are maturing and interest rates are about half what they were four or five years ago.

"Investors are searching for a higher yield," Collins said. In the boom of 1985 and 1986 investors increasingly are turning to equities and mutual funds and away from their banks. "That's good for us," Collins said.

But Johnston, Lemon's Ryan said that the brokerage business is a highly volatile one that has known as many bad times as it has good times.

He said he and his colleagues around the industry are salting away some of today's profits in anticipation of a downturn sometime in the future.

"No one out there is buying a Mercedes. We've been there before," Ryan said.