A big fish grew even larger yesterday when Ameritrade (NASDAQ:AMTD) agreed to swallow the online retail brokerage accounts of smaller rival JB Oxford (NASDAQ:JBOH) for $26 million. The sale, which is expected to close later this summer, will be immediately accretive to Ameritrade's earnings. Investors applauded JB Oxford's abrupt departure from the discount brokerage scene, bidding shares 38% higher to $3.44 in afternoon trading.

With a relatively meager 50,000 retail accounts (or less than one-fifth of the 124,000 that Ameritrade opened just last quarter) the company has been swimming in red ink for years, and even failed to achieve profitability with a strong tailwind from last year's rising markets. When Ameritrade and other competitors such as E*Trade (NYSE:ET) and Charles Schwab (NYSE:SCH) were reporting stellar first-quarter numbers, JB Oxford posted a 16% drop in revenues and a tripling of net losses from $681,000 to $2.2 million.

The company also ran into a regulatory probe of its mutual fund trading practices, and last year independent auditor Ernst & Young expressed concerns over the company's ongoing viability. The divestiture of JB Oxford's underperforming brokerage operations will allow the company to focus on trade execution and clearing services provided to independent brokers through its National Clearing Corp. subsidiary. For now at least, the decision will enable the firm to breathe without the aid of life support.

JB Oxford is the latest target in a long string of acquisitions made by Ameritrade, which include former rivals such as Datek (along with 875,000 accounts and $11 billion in assets) and more recent purchases of Bidwell & Co. and BrokerageAmerica. The firm has found acquisitions to be a more cost-effective way to grow, as the marketing and advertising costs to bring in one new account internally totaled $243 last quarter. CEO Joe Moglia hinted at further consolidation within the discount brokerage industry in a recent interview with Foolish colleague Rick Munarriz.

Ameritrade's execution has been near flawless lately, and the company's net income over the past four quarters is higher than the rest of its 28-year history combined. Operating margins rose to 51% last quarter (the highest in the industry), providing shelter should Schwab's recent commission reductions be the opening salvo of a new price war.

However, future earnings remain inextricably tied to the market, and little has been done to hedge against steep declines. Recent cost-cutting efforts will provide a larger margin of error, but true diversification is needed to mute earnings volatility. New asset allocation tools set to roll out this fall will assist investors with portfolio-structuring decisions, baby steps toward an advice component, but steps in the right direction nonetheless.

Tired of reading about brokerages and actually ready to put your money to work? Try out our Broker Center.

Fool contributor Nathan Slaughter owns none of the companies mentioned.