Odds are, if you'd bought a brokerage stock during the past three years, you made money -- maybe a lot of money.

In fact, since the bull market began in the autumn of 2002, few sectors have done better than brokerage stocks. This year alone, the brokers are up an average of 12%, far outpacing the broader market.

As a group, brokerage stocks are up 242% since bottoming in October 2002, as measured by the Amex Broker Dealer Index. Over that time, the S&P 500 is up 64%, while the Dow Jones Industrial Average has risen 48%.

It's no contest when comparing the performance of the brokers with their financial siblings, the banks. The 72% gain registered by the Philadelphia KBW Bank Index over the past three years looks paltry when stacked up against the triple-digit gains rung up by the brokers.

But the long party in brokerage stocks might be winding down, as fears of higher inflation and an eventual economic slowdown begin to mount in some corners of Wall Street. Others worry that big investment banks such as Goldman Sachs ( GS) and Bear Stearns ( BSC) are taking on too much risk in fueling trades by hedge funds, and that some of those bets eventually will come back to haunt Wall Street firms, especially if the economy softens.

"I don't think the juice goes out for a while. But the problem is these stocks are valued for consistent earnings growth,'' says Michael Stead, manager of River Aire Investment, a hedge fund that invests in financials and owns shares of Morgan Stanley ( MS) and Merrill Lynch ( MER). "If there is a hiccup, these stocks will sell off.''

Ironically, the good times are threatened even as three big brokers -- Goldman Sachs, Lehman Brothers ( LEH) and Bear Stearns -- are each expected to report double-digit improvements in their first-quarter earnings next week. Only Morgan Stanley, the other Wall Street firm whose first quarter ended Feb. 28, is expected to report a slight decline in quarterly profits.

Right now, of course, it's hard to see any headwinds for the brokerage sector.

The merger-and-acquisition machine is going at full tilt. This week's proposed $67 billion mega-deal between AT&T ( T) and BellSouth ( BLS) is likely to spawn copycat deals in the telecommunications industry. As they say on Wall Street, the M&A pipeline -- deals in the works -- is pretty full.

Bond and stock underwriting also is going strong. The total dollar value of underwriting in the three-month period ending in February was $867 billion, up 15% over the same period a year ago, according to Thomson Financial.

In fact, analysts are expecting even bigger earnings gains for the brokers in the second quarter, including Morgan Stanley.

But some worry that in the competition between Wall Street firms to emerge as the leader in M&A and underwriting, imprudent risk is being assumed.

Allen Puwalski, senior financial analyst with the Center for Financial Research & Analysis, says Wall Street banks, in order to win corporate business, are making ever larger commitments to lend money to those companies. He says some of these loans could come back to bite a Wall Street firm in a market downturn.

"These transactions lead to good league table placement now, but they could lead to future credit hits,'' says Puwalski.

At the end of the day, league table rankings are nothing more than bragging rights for Wall Street. That's because traditional investment banking fees are accounting for an ever-diminishing portion of Wall Street earnings. Since the bull market began in earnest, the main earnings-driver at Wall Street firms has been revenue from proprietary trading -- in-house trading of bonds, stocks and commodities.

Over the past three years, Wall Street traders have shown a great knack for making big profits in any kind of interest rate environment, but profits from trading are hard to predict, and it's inevitable that a firm will stumble. The unpredictability of trading revenue is one reason analyst estimates for brokerage stocks are so often wrong.

Another big cash cow for Wall Street firms comes from the wide array of exotic financial products they've been selling to hedge funds to drive trading. The market for credit derivatives, a specialized security that essentially serves as an insurance policy against a corporate default on a bond, is booming. Yet Wall Street firms provide investors with little information about the risks they've assumed in backing these deals for customers.

David Hendler, a financial services analyst with CreditSights, says too much of what's been fueling earnings are so-called "black box" items and other off balance sheet financings that are hidden from view.

"Are the earnings good because they are sustainable or because they are frothy? We really can't tell,'' says Hendler. "It's a black box.''

Recently, Goldman Sachs shed a bit of light on some of the risk it is taking in the credit derivatives market. A section of its 2005 annual report dealt with Goldman's obligation to supply underlying securities, bonds, to counterparties in these deals. In the report, Goldman appended a new risk statement saying it could "forfeit the payments due to us'' under its credit derivative deals if it's unable to make good on its delivery obligation.

The disclosure is a response to the Federal Reserve's effort to bring more clarity to the murky world of credit derivatives and the delays incurred by brokerage back offices in settling trades and delivering securities. The Fed is concerned about the possibility of a meltdown in the $12 trillion credit derivatives market, in the face of a major market selloff.

Much of the growth in the credit derivatives market has come in the past three years, when stocks have been heading higher and corporate defaults are near all-time lows. The problem is no one knows how things with shake out in this relatively new market when stocks head south and corporations start defaulting on their bonds.

Hendler says the new risk language is an attempt by Goldman Sachs' lawyers to stave off potential litigation. But it points out the potential downside from all the exotic financial deals Wall Street banks have been engineering the past few years.

"These firms are defying gravity,'' says Hendler. "A lot of these derivative trades are simply a way to lever up volatility, because volatility is low.''

For Wall Street firms, volatility, or a stock's propensity to swing in price, is like manna from heaven because it's what drives trading profits. A flat or complacent market is the worst thing for trading firms.

A cynic says Wall Street will pay a price for taking steps to enhance volatility.