WASHINGTON (AP) — Knight Capital Group reportedly has a deal to secure $400 million in financing that will enable it to avoid bankruptcy, days after a disastrous software glitch shook stock trading and jeopardized its future.

CNBC is reporting the battered trading firm has an accord involving TD Ameritrade Holding Corp., the private-equity firms General Atlantic and Blackstone, and Stifel Nicolas.

The deal calls for the companies to purchase a $400 million convertible preferred security that gives them the right to buy Knight shares at $1.50, CNBC says. That's 63 percent below Knight's $4.05 Friday close.

A Knight spokeswoman said she could not confirm the deal.

Knight been fighting for survival since Wednesday, when a software problem funneled erroneous orders and put it on the hook for some $440 million in bad trades.