Ameritrade

(AMTD) - Get Report

agreed to acquire rival firm

Datek

in a deal valued at close to $1.3 billion, creating what the companies say will be the largest online brokerage in terms of equity trades per day.

The combined company will handle about 164,000 trades a day and will have 2.7 million accounts and $43 billion in client assets. The online brokerage companies expect to close the transaction within 90 days.

The principal owners of privately held Datek include Bain Capital, TA Associates and Silver Lake Partners. Datek had been rumored to be a takeover candidate for a while, and some observers believed

E*Trade

(ET) - Get Report

would be the company to strike a deal for the Jersey City, N.J., operation.

Confirmation of the merger came two days after Omaha, Neb.-based Ameritrade lowered its guidance for the fiscal second quarter. After the close of trading Friday, Ameritrade said earnings for the quarter would be at the low end of its previous guidance because of a drop in stock trading by its customers.