People walk by a Wells Fargo banking location in Pasadena, California, U.S., September 8, 2017. REUTERS/Mario Anzuoni/File Photo

NEW YORK (Reuters) - A Chicago fund manager cannot pursue a lawsuit against a Wells Fargo & Co WFC.N unit over claims the bank cost the fund manager millions by forcing it to sell its holdings during a February market rout, a judge ruled on Tuesday.

LJM Partners Ltd, run by Anthony Caine, returned investors’ money after its complex trades failed spectacularly in the Feb. 5 reversal of fortune in U.S. stocks and related markets that some investors called “vol-mageddon.” Funds run by LJM and an affiliate saw losses of 80 percent or more.

The fund would not have suffered such extreme losses had Wells Fargo Securities LLC (WFS) not directed it to sell its holdings immediately after initial losses and at depressed prices, LJM said in response to a March lawsuit by Wells Fargo. Wells Fargo disputed that it had forced the liquidation.

Wells Fargo said it had been required to cover the company’s margin and losses with the Chicago Mercantile Exchange. LJM denied those claims and countersued in May.

But United States District Judge Katherine Forrest in Manhattan said contracts between Wells Fargo and LJM provided “broad authority” for the bank to tell the fund to trade when the market is stressed.

“The agreement provides broad authority for WFS to terminate the agreement and direct LJM to liquidate its open positions - even through specific trades,” Forrest wrote.

A spokeswoman for Wells Fargo and lawyers for LJM did not immediately respond to a request for comment.

Wells Fargo’s lawsuit against LJM is ongoing. Investors are suing Caine and Anish Parvataneni, a portfolio manager at the company who previously worked for well-known fund investor Ken Griffin’s Citadel, over what they said were inadequate disclosures about the risks of LJM’s approach.