By Jonathan Stempel

(Reuters) - A former Rochdale Securities trader whose unauthorized purchase of about $1 billion of Apple Inc stock caused the demise of the financial services company pleaded guilty on Monday to wire fraud and conspiracy.

David Miller, 40, entered his guilty plea before U.S. Magistrate Judge Donna Martinez in Hartford, Connecticut.

Miller faces a maximum 25 years in prison when he is sentenced on July 8, but under a plea agreement he could receive a term of five to eight years. The Rockville Centre, New York resident is free on bond.

"What happened here was out of character for a kind and generous family man who has lived an otherwise law-abiding and good life," Miller's lawyer Kenneth Murphy said. "He deeply regrets what he has done and the harm it has caused to other people, including the former principals and employees at Rochdale."

The U.S. Securities and Exchange Commission filed a related civil fraud lawsuit against Miller on Monday.

Prosecutors said Miller bought 1.625 million Apple shares on October 25, 2012, the day the maker of iPads, iPods and iPhones planned to report third-quarter results, hoping to profit if the company's share price rose.

But they said Miller falsely told Rochdale that the trade was for a customer that had in fact ordered just 1,625 shares.

When the bet backfired, Rochdale was on the hook for $5.3 million of losses on the extra 1,623,375 shares, leaving the Stamford, Connecticut-based company undercapitalized, the SEC said in court papers.

According to prosecutors, Miller also defrauded another brokerage by inducing it to sell 500,000 Apple shares, hoping to partially hedge against the purchase he had made at Rochdale. Court papers did not identify the second brokerage.

The SEC said as a result of Miller's bets, Rochdale ceased operations and its staff left or was fired in November 2012. On February 25, Rochdale asked Connecticut, the SEC and other regulators to withdraw its registrations.

Rochdale is not a defendant in either case and was not accused of wrongdoing. Daniel Crowley, who had been Rochdale's president, could not be reached on Monday for comment.

At the time of the loss, Rochdale was the home of prominent banking analyst Richard Bove. He later joined Rafferty Capital Markets LLC.

The cases are U.S. v. Miller, U.S. District Court, District of Connecticut, No. 12-mj-00288; and SEC v. Miller in the same court, No. 13-00522.

(Reporting by Jonathan Stempel in New York; Editing by Leslie Gevirtz)