Raj Rajaratnam, the authorities say, masterminded one of the biggest insider-trading schemes in a generation.

But if Mr. Rajaratnam was trading on insider information, apparently he was not very good at it.

A close examination of the trades that led to his arrest last week reveals a startling fact: In all, Mr. Rajaratnam lost millions from what prosecutors characterize as illegal trading.

One bad trade, in the shares of the chip maker Advanced Micro Devices, cost his hedge fund, the Galleon Group, $30 million. That loss more than wiped out the profits that prosecutors claim Mr. Rajaratnam and his accomplices reaped with their scheme.

Prosecutors highlighted the winning trades in a case that they say stretched from the secretive world of hedge funds to some of the country’s biggest technology companies. They did not mention the losers.