Two of Maryland's most powerful and prestigious financial firms are leaving decades of privacy behind them as they "go public" by selling stock in themselves to the public for the first time.

Alex. Brown Inc., believed to be the nation's oldest investment-banking firm, and T. Rowe Price Associates Inc., one of the nation's leading mutual-fund managers, have operated successfully for years without publicly disclosing earnings, salaries, strategies and other sensitive information.

But the decades of secrecy have ended.

"Welcome to the goldfish bowl," said James W. Brinkley, president of Legg Mason Wood Walker Inc., a Baltimore brokerage firm that first sold stock in itself to the public in July of 1983. "There are always positives and negatives of going public. The most negative thing is you operate in this goldfish bowl. Everybody knows what you are doing. You have to reveal everything."

Alex. Brown and T. Rowe Price, for example, recently revealed in filings with the Securities and Exchange Commission that they are very profitable firms that compensate their top executives handsomely. Both pay their top dozen officers average salaries and bonuses in excess of $450,000 a year.

On the other hand, now it should be easier and cheaper for Alex. Brown to raise capital as a public, rather than a private company, investment-banking experts said. For T. Rowe Price, analysts see the move as a way of enhancing the price of the stock held by current and former employes.

While T. Rowe Price and other mutual funds appear to be choosing to sell stock in themselves to the public, competition is forcing Alex. Brown and other investment banking firms to go public. Alex. Brown's decision to go from private to public ownership follows similar decisions recently by other major investment-banking firms, including Morgan Stanley & Co., Bear, Stearns & Co. and L. F. Rothschild, Unterberg, Towbin Holdings Inc.

In the years ahead, Alex. Brown will need greater capital to compete with other investment-banking firms, which are relying more than ever before on their ability to commit huge sums of money to trade and underwrite securities (underwriting refers to helping corporations and municipalities raise funds).

Alex. Brown "went public" on Feb. 28, selling about $37 million of stock to the public at an initial offering price of $23 a share, according to documents filed with the SEC. The stock was received enthusiastically by investors.

In the week following the initial offering, it traded as high as $32. The stock closed Friday at $30.50, up $2.50. About 25 percent of the stock was sold to the public, with the rest held by Alex. Brown employes and others who owned shares when the firm was private.

T. Rowe Price disclosed its plans to sell 18 percent of its shares to the public in a Feb. 18 filing with the SEC. The shares are expected to be sold later this month.

Meanwhile, the rapid growth of the mutual-fund industry continues.

Harvard Business School Professor Sam Hayes said the decisions by T. Rowe Price, the money manager, and Alex. Brown, the investment banker, to sell shares in themselves to the public were made for vastly different reasons.

"In looking at the money-management industry, there is no compelling reason to go public," Hayes said.

"I see T. Rowe Price's move as opportunistic. We saw it happen to Colonial Group, which went public a month or two ago and their stock nearly doubled. It is a way of selling shares to the public at an attractive price and establishing a market for the rest of their shares," which are owned primarily by current and former employes of the firm, he said.

"As far as Alex. Brown is concerned," Hayes said, "they really have a strong compulsion to do what they are doing because the securities industry is rapidly consolidating.

"To maintain a position as a major player requires a great deal of capital. You can make a rational case for why they feel they need to go public."

Filing Discloses Large Salaries

Alex. Brown, with headquarters at 135 East Baltimore St. in Baltimore, profits by helping corporations and municipalities raise capital, by arranging corporate mergers, by managing money and by trading securities. The firm is noted for its investment research and for its excellent record of assisting high-technology companies that need to raise capital. Alex. Brown earned $12.4 million on revenue of $171.4 million in the year ending Sept. 27.

Alex. Brown disclosed in an SEC filing that its top 13 officers received $5.9 million in cash compensation last year, with each receiving an average of $450,648.

The highest paid officer last year was the firm's president, Donald B. Hebb Jr., who earned $489,899. Also listed in the filing were Benjamin H. Griswold IV, vice chairman; Joseph R. Hardiman, secretary; David J. Callard, director, and F. Barton Harvey Jr., chairman, each of whom had cash compensation of between $461,838 and $468,854 last year.

T. Rowe Price, with offices in the IBM building in Baltimore at 100 East Pratt St., also is very profitable, with about half the revenue and two-thirds of the profits of Alex. Brown. It profits primarily by managing money for wealthy individuals, pension funds and people who invest in T. Rowe Price's mutual funds.

The mutual funds, which are pools of capital invested in stocks and bonds, have surged in popularity.

The funds give investors the opportunity to have their money managed professionally. Since diversified mutual funds are invested in a variety of securities, they may decrease the risk associated with the purchase of a single stock or bond.

T. Rowe Price had revenue of $85.2 million and net income of $8.5 million in the year ended Dec. 31. The company disclosed that last year, its top 13 officers earned total base salaries of $2.5 million, an average of $194,615, plus additional cash bonuses of $3.4 million, an average of $258,769.

Total average compensation for the top officers was $453,384.

The firm said its highest paid officer was President George J. Collins, who had total cash compensation of $692,000. Also listed in the filing with the SEC were Edward J. Mathias, vice president; James S. Riepe, vice president; George A. Roche, chief finanical officer; Edward A. Taber III, vice president, and M. David Testa, vice president. Each had total cash compensation last year of $612,000.

T. Rowe Price, which manages about $20 billion in assets, has been at the forefront of the booming mutual-fund industry.

Industrywide, mutual-fund assets have increased from $97 billion at the beginning of 1980 to more than $500 billion by the end of 1985.

"To a degree, T. Rowe Price is going public in order to provide their employe shareholders with more liquidity a fair and orderly market for their stock ," said Perrin Long, an analyst with Lipper Analytical Services.

"I think they also realize that Colonial Group in Boston went public and the other publicly traded asset-management firms like Dreyfuss and Pioneer Group have all done very well over the last several years," Long said.

"As a consequence, if you are a T. Rowe Price employe-stockholder , why not pick up some of your marbles and diversify a little bit by selling stock to the public? If you have everything tied up in T. Rowe Price common stock, then the public market will provide a vehicle so you can realize some of your profits."

Long is right about the performance of publicly traded mutual fund stocks. For example, Dreyfuss went public in October 1965 at $20 a share. A single share held since then would be worth about $625.

Another T. Rowe Price competitor, Boston's Colonial Group, sold shares in itself to the public on Dec. 17 for $17 a share.

After trading as high as $31, the stock closed last Friday at $24, down 25 cents. The stocks of these mutual-fund managers are outperforming the mutual funds themselves. Going Public 'a Good Thing'

While T. Rowe Price and Alex. Brown get used to public life, Legg Mason Wood Walker, the Baltimore brokerage firm that caters primarily to individual investors, has been public since July 1983.

It sold stock in itself to the public in 1983 for $18.50 a share. Additional shares were sold in December for $22.25. Legg Mason stock closed Friday at $29.13, up 88 cents.

In addition to its thriving brokerage business, which helped profits skyrocket from $2.7 million in 1984 to $6.7 million in the year ended Dec. 31, Legg Mason has a growing money-management business.

"Going public has been a good thing for our public stockholders," Legg Mason President Brinkley said, reflecting on the decision.

"We decided to go public for a lot of reasons. We felt that long-term, the more capital you have, the better the probability of surviving and prospering. That is really the bottom line," he said.

While Brinkley comfortably and freely discussed his firm, top officials of T. Rowe Price and Alex. Brown declined to be interviewed for this story, citing SEC rules.

T. Rowe Price said its attorneys advised the firm's top officers not to grant interviews before the company's shares are sold to the public. Alex. Brown said its attorneys advised the firm not to grant interviews immediately after its shares are sold to the public.

But SEC officials said there are no rules that prohibit the Baltimore firms from granting interviews during either period of time.

Getting used to public life isn't easy.