Updated from 8:50 a.m. EDT

Volatility is a trading opportunity for the pros, and nothing was more volatile than the bond market this summer.

Three big brokerages and investment banks --

Lehman Brothers

(LEH)

,

Morgan Stanley

(MWD)

and

Goldman Sachs

(GS) - Get Report

-- took advantage of violent swings in interest rates in July and August to compile stellar third-quarter earnings, all three said Tuesday.

The three Wall Street firms posted earnings that handily beat the expectations of brokerage analysts. Goldman trailed the other two in the magnitude of its gain, thanks to some bad bets on the direction of the mortgage market in the wake of rising interest rates.

At midday, shares of Lehman were the only ones trading higher. The stock rose 6 cents to $70.27. Shares of Goldman fell the hardest, dropping $2.97, or 3.2%, to $89.69. Morgan Stanley was off 50 cents, or 1%, to $50.66.

Some doomsayers had been predicting that Wall Street firms would suffer because of the sharp spike in Treasury yields this summer, but so far there has been little evidence that brokerages have felt much pain -- even with Goldman's bad bets.

The question now is whether the revival in the stock market this year will be enough to fuel a rebirth in more traditional investment banking work, such as mergers and initial public offerings.

All three Wall Street firms reported that merger advisory work, usually a big fee generator for investment banks, remains lackluster, despite some signs that corporations are beginning to think about doing deals after a three-year drought.

"There is a gradual buildup,'' said Lehman CFO David Goldfarb, commenting on the prospects for an M&A revival. Morgan Stanley CFO Stephen Crawford, in a conference call, said, "M&A is not where it should be.''

In fact, the number of new corporate deals announced in the June-to-August quarter was down from the same time last year, which also was a bad one for M&A. Thomson First Call reports that this year there were 1,649 deals worth $106 billion, compared to 1,752 deals worth $145 billion a year ago.

But there's no disputing the generally solid performances posted by the firms in the third quarter.

Lehman earned $480 million, or $1.81 a share, in the quarter, a whopping 147% increase over a year ago, when it posted net income of $194 million, or 70 cents a share. Lehman's earnings handily bested the Thomson First Call consensus estimate of $1.35 a share.

On the surface, the numbers from Morgan Stanley, which has tended to lag the performance of other Wall Street firms this year, looked the best. The firm reported earnings of $1.27 billion, or $1.15 a share, up 108% from a year ago, when it earned $611 million, or 55 cents a share.

But Morgan Stanley's numbers were juiced by major changes in its compensation system, which reduced expenses by $519 million and increased net income by $350 million, or 32 cents a share, in the quarter. The changes mean that some lower-level employees will not be entitled to certain stock-related bonuses.

Analysts were way off on their estimates for Morgan Stanley. The Thomson First Call consensus called for the firm to earn 69 cents in the quarter. That estimate had come up by nearly a dime in the past week. It wasn't enough. But Morgan's beat looks less impressive when you factor out the impact of the compensation changes.

Meanwhile, Morgan Stanley executives said the firm's third-quarter numbers benefited from a turnaround in the equity markets, both in terms of underwriting and stock trading. Both Lehman and Morgan also benefited from strong bond-related business, as the firms shrugged off the effects of the spike in bond yields.

The gains at Goldman Sachs were more subdued. The firm earned $677 million, or $1.32 a share, in the third quarter compared to $522 million, or $1 a share, a year ago. Analysts had expected the firm to earn $1.22 a share in the quarter.

Following a pattern that it established earlier this year, Goldman's earnings were fueled by its trading and principal investments, which generated $1.62 billion in net revenues, compared to $1.49 billion a year ago.

But compared to the second quarter, when Goldman's fixed-income business posted big gains, the third quarter came in a bit short. In the second quarter, Goldman generated $2 billion in trading and principal investment.

Goldman CFO David Viniar blamed the shortfall on some bad hedging by the firm in the mortgage market. "Some hedges are less than perfect,'' he said.

Goldman's disappointing fixed-income performance led investors to sell its shares, especially since Goldman's stock is one of the priciest in the sector. Goldman trades at a current price/earnings ratio of 17% and is up about 30% for the year.

By comparison, Lehman trades at a PE of 12, while Morgan Stanley shares change hands at 16 times current earnings. Before Tuesday's earnings announcements, Lehman shares were up 25% for the year and Morgan's stock had risen 20%.

Overall, brokerage stocks have been some of the best performers in the financial sector this year, as investors bet on an economic recovery and a return of the retail investor. The AMEX Broker/Dealer Index is up 48% for the year.

UBS brokerage analyst Glenn Schorr, in a research note, said Lehman's performance was the strongest of the three firms, with Goldman's the most "disappointing.''

The third-quarter earnings reports from the big three Wall Street investment banks come a week after

Bear Stearns

(BSC)

again defied analyst expectations and reported sharply higher earnings.

Profits nearly doubled at Bear, as the nation's sixth-largest brokerage firm once again feasted on revenue from bond-related trading and bond issuance. In the quarter, Bear earned $305.6 million, or $2.30 a share, compared to $156 million, or $1.23 a share, a year ago.