NEW YORK (Fortune) -- One of the things they teach in Successful Investing 101 is to cut your losses short and let your winnings run. But when it comes to the Troubled Assets Relief Program, the government is stuck doing the opposite. Its gains are being cut short, because its most profitable investments are being closed out, yet its losses will continue running.

The big gains come from stock-purchase warrants that Congress insisted the Treasury get as part of the $244 billion of TARP loans it made to 662 banks and bank holding companies. Warrants, which give holders the right (but not the obligation) to purchase stock at a fixed price for a fixed period, are designed to offer taxpayers a chance to make some serious money if the stock prices of the bailed-out banks rise.

To induce relatively sound banks to borrow, the Bush Treasury Department adopted very liberal rules on the warrants, giving early TARP repayers the right to force the government to sell them back rather than continue holding them. The price is determined by negotiation, auction, or complicated appraisal proceedings.

The government's two biggest scores -- 26% a year from American Express (AXP, Fortune 500) and 23% from Goldman Sachs (GS, Fortune 500) -- came from Amex and Goldman having redeemed their warrants for $340 million and $1.1 billion, respectively. Profits on the warrants, which were outstanding for only a brief period, accounted for 21% and 18%, respectively, of those returns. The rest came from the 5% annual borrowing charge for most TARP borrowers.

So far, 34 of the banks that got TARP money have paid it back, according to SNL Financial, a Charlottesville-based research firm whose statistics I'm using throughout this piece, with about half the institutions paying a total of $1.7 billion (including Amex and Goldman) to redeem their warrants. That's the good news.

The bad news is that we've now seen most of the good news, because the remaining TARP borrowers -- 628 that owe the government $174 billion -- are considerably weaker as a group than the ones that have repaid.

It's what economists call "adverse selection." The strongest borrowers -- the ones whose warrants are likely to produce serious profits for the Treasury -- are bailing out of TARP as rapidly as possible to avoid pay restrictions and other rules that the Obama administration adopted after inheriting TARP from the Bush administration. These stronger firms would also like to capture as much of their stocks' potential upside as possible, so they're trying to buy back the warrants based on today's share price rather on what they assume will be a higher price in the future.

Even though only strong banks were supposed to be deemed TARP-worthy, there are plenty of weaklings in the pool. The biggest: Citigroup (C, Fortune 500), where the government has converted $45 billion of its TARP investment into regular preferred and common stock to try to strengthen the bank. The odds of us taxpayers getting back our $45 billion -- plus the 5% to 8% Citi was supposed to pay on its borrowings -- are remote. Then there's the $54 billion in TARP money tied up in GMAC (GJM) and American International Group (AIG, Fortune 500). Not exactly prime credits.

Finally, there's my favorite: 17 borrowers that SNL Financial says have failed to pay the dividends due on their total of $500 million of TARP borrowings. I'm sure we can kiss a good part of that money goodbye.

The government still has some warrant gains to collect -- 16 firms, including JPMorgan Chase (JPM, Fortune 500), have repaid their TARP borrowings but the government still hasn't sold the warrants -- but I doubt we'll see percentage returns anything like what we got on Amex and Goldman.

Even if the government gets the $1.1 billion value that the TARP Congressional Oversight Panel places on the JPMorgan Chase warrants, we'd have a far lower return than on Amex and Goldman. That's because these firms bought their warrants for 10% and 11%, respectively, of their TARP loans, while $1.1 billion is only about 4% of JPMorgan's $25 billion TARP borrowing.

So let's be happy with what we've gotten for our warrants, taxpayers. But let's not kid ourselves. TARP was designed to bail out the financial system, not to make money. If we break even, we'll be doing well.