Merrill Lynch office (Photo: AP)

New York Attorney General Eric Schneiderman said Friday that Bank of America Merrill Lynch will pay a $42 million penalty to settle an investigation of fraudulent practices tied to its electronic-trading services for institutional clients.

As part of the settlement, BofA Merrill admitted that from 2008 to 2013 it did not tell clients it was routing 16 million equity orders to so-called electronic liquidity providers (or ELPs), such as Citadel Securities, Knight Capital, D.E. Shaw, Two Sigma Securities and Madoff Securities.

(A copy of the settlement agreement can be found here.)

The investigation also found the bank made other misleading statements that made the undisclosed services “appear safer and more sophisticated than they really were,” according to the attorney general.

“Bank of America Merrill Lynch went to astonishing lengths to defraud its own institutional clients about who was seeing and filling their orders, who was trading in its dark pool, and the capabilities of its electronic trading services,” Schneider explained in a statement.

“As Wall Street firms offer increasingly complex electronic trading services, they cannot use new technology to exploit their clients in service of their business relationships with large industry players, like Bank of America Merrill Lynch did here,” he added.

Rather than tell clients it was routing millions of equity orders to ELPs like Citadel, BofA Merrill told institutional clients their orders were being executing in-house, according to the investigation.

The bank reprogrammed its electronic trading systems “to automatically doctor the trade confirmation messaging sent back to its clients after executions by these firms, in a process that [bank] employees referred to internally as ‘masking,’” the attorney general’s office explained.

It used the “masking” strategy on more than 16 million client orders between 2008 and 2013, representing over 4 billion traded shares. Plus, it altered post-trade reports, client invoices and other written documents concerned with the trades.

The bank inflated the level of retail orders being routed to and executed in its dark pool of private exchanges, “Instinct X.” It claimed that between 20% and 30% of the orders in its dark pool originated from retail traders, but the investigation found that the bank’s client orders accounted for no more than 5% of Instinct X orders.

“The settlement primarily relates to conduct that occurred as long as 10 years ago,” BofA Merrill said in a statement. “At all times we met our obligation to deliver the best prices to clients. About five years ago, we addressed the issues concerning communicating to clients about where their trades were executed.”