Two weeks ago New York Attorney General Eliot Spitzer nailed the Bank of America for allegedly letting a hedge fund make illegal trades in its Nations Funds and dozens more. He also cited the Janus funds, Strong funds and Banc One funds for allowing trades that siphon profits away from small investors. While most mutual funds are probably clean, some earn big bucks by shafting you. Here’s how:

LATE TRADING. Most mutual funds are closed to new purchases after 4 p.m., ET. That’s when they establish their share price for the day, based on the current value of the investments they own. If you place an order at 4:15 p.m., you’ll get tomorrow’s price. That is, unless you’re the hedge fund Canary Capital Partners.

Nations Funds gave Canary lists of the stocks and high-yield bonds they currently held, Spitzer said. Then Canary’s traders watched for any news about those companies that broke after 4 p.m. If the news was good, Canary bought fund shares after hours at the earlier, closing price–a violation of the securities laws. The following day, when the price went up, Canary sold. On bad news, Canary sold the fund short, taking a fast profit when prices fell.

How were the moms and pops cheated? The outsize profits Canary took should have belonged to all the shareholders equally. Instead, Canary got the gains, because it invested “in advance” and sold right out. Other hedge funds do this, too. Stanford University Prof. Eric Zitzewitz estimates that they’re costing long-term shareholders $400 million a year.

When caught, Canary sang. In rapid-fire order, the hedge fund agreed to $30 million in restitution plus a $10 million fine (without admitting or denying wrongdoing). The BofA dumped “several” employees, including two executives. In the first mutual-fund perp walk I’ve ever seen (but probably not the last), a BofA Securities broker, Theodore C. Sihpol III, was cuffed and charged with larceny and securities fraud (his lawyer failed to return repeated calls).

MARKET TIMING. Canary and other hedge funds and arbitrageurs play a second game–exploiting what are called “stale prices.” For example, take a mutual fund that buys Asian stocks. When U.S. stocks jump, Asian stocks usually do, too–but 14 hours later, when their markets open for the day. A trader can buy at the U.S. price, knowing that it’s probably low, then sell the next day for a profit that’s virtually guaranteed. U.S. stock and high-yield bond funds may be timed as well. Timing isn’t illegal. Still, it swipes money from long-term investors just as late trading does–about $5 billion a year, by Zitzewitz’s count.

Furthermore, you’ve been deceived. The prospectuses put out by BofA, Bank One, Janus and Strong seem to say that daily timing isn’t allowed. Yet these funds welcomed Canary’s trades, according to documents collected by Spitzer. All four say they’re cooperating with the investigation. All but Strong said they’d make restitution, given proof that investors lost money.

Why do some mutual-fund managements sell you out? For cash, of course. Canary did tens of millions of dollars’ worth of business with the banks. It also kept tons of money in their collaborators’ bond funds, which added to the managers’ fees.

These stories tell you something about hedge funds, as well as the ethics of certain mutual funds. Canary turned in gorgeous, double-digit returns from 2000 through 2002, but not because of clever hedging. Its traders were shooting fish in a barrel, by buying at less than the fair-market price.

After Spitzer’s shocker, the Securities and Exchange Commission quickly wrote to large broker-dealers, transfer agents and mutual funds, asking about their trades with major customers. If your fund was gamed, however, there’s no way to find out.

Morningstar, appalled by the ripoff, is telling people to sell the funds named in Spitzer’s allegations. Many institutional investors may also leave. Those who stay will eat the transaction costs of those who flee.

Boston attorney Marcia Wagner, a pension-law expert, says she’s been called by attorneys of 401(k) sponsors who may bring suit. The fast-moving class-action firm, Milberg Weiss, has already filed against the four funds, on investors’ behalf.

And where were the fabled fund directors–“protectors” of innocent shareholders–while all this was going on? At the bank, I guess, cashing their cushy directors’ checks. “The whole system of mutual-fund governance is broken,” says Gary Gensler, coauthor of “The Great Mutual Fund Trap.” At the BofA, the same directors oversee 54 funds–so they can’t do much.

Mercer Bullard, founder of the activist group Fund Democracy, says, “Fund executives and directors never thought that the SEC would go after them.” Well, I’d say it’s time. Throw the bums out.