Even that giant corpse Citigroup is showing signs of life. Its stock is now selling for more than five times the lows it hit earlier this year. Its market capitalization is up near $57bn, a bit more than the $45 billion that the government lent them through the Troubled Assets Relief Programme, or Tarp. Some are even expecting that the government will make a profit on its Citigroup investment.

These hopes are probably somewhat premature. Citigroup still has many bad assets on its books which it has not yet written down. Furthermore, the government is directly on the hook for $300bn of these bad assets, having offered a guarantee as part of its "December Citigroup Rescue Special".

In this case, Citigroup may be able to prevent losses and boost the value of its government-owned stock because the government is picking up its bad debts. This is a case of money going into one pocket but out of the other one; that's not the way that most investors make money.

In fact, much of the story of the return of bank profitability has this character of money in one pocket and out the other pocket. To make the story as simple as possible, banks can now borrow money short-term at near zero cost from the US Federal Reserve. The Fed has pushed rates to near zero in order to boost the economy. On the other side, banks can buy up US government bonds that are currently paying around 3.5% interest.

This means that we lend the banks the money that they lend back to us, albeit at a considerably higher interest rate. To take round numbers, let's say that the banks have borrowed $1 trillion from the Fed's various lending facilities. (The Fed's total loans are now over $2trn.) Suppose they pay an average interest rate of 0.2% on this money. If the banks then buy up government bonds that pay a 3.5% interest rate, they can pocket the difference of 3.3 percentage points. On a trillion dollars of lending, this will give the banks $33bn a year in net interest or profit. This is the extra money that the government is paying the banks to borrow back the money that it lent them through the Fed.

Of course this is not the whole story of the banks' return to profitability. We also have the shrewd traders like the Goldman Sachs crew. They take the money that they borrowed, either directly from the government or with the government's guarantee, and use it to speculate in items like oil and other commodities.

These folks are betting that they can outguess the markets. For example, the Goldman boys might catch oil on the way up, so that consumers pay higher gas prices somewhat sooner to cover Goldman's trading profits. Alternatively, they might short a commodity like oil. This will cause the price to drop more quickly than would otherwise be the case, leaving producers with somewhat less money than if Goldman hadn't stepped into the market.

In either case, Goldman's gains come at the expense of other actors in the market. There is not anything necessarily wrong with speculation; informed speculation can provide useful information to the markets. However, in this case the taxpayers are financing it, and taking the risk if it goes bad.

It turned out Goldman's bets were winners in the second quarter, so this means that the taxpayers paid for Goldman's profits with the higher gap between the prices paid by gasoline buyers and other consumers and the money received by oil companies and other producers. Of course, if Goldman's bets had gone badly, taxpayers would have been forced to cough up the money to make up the losses directly through the Treasury. Either way, the taxpayers get to pay.

That is the basic story of the banking industry. These folks have the system set up so that they should be able to make money pretty much regardless of what happens, with the risk of bad outcomes all placed on the taxpayers.

Many people are outraged that the banks intend to pay their top executives large bonuses. But these unthinking populists simply don't recognize these people's extraordinary talent. After all, it is not everyone who can get the government to subsidise them to the tune of several billion dollars a year. These people may not fare very well in a market economy, but these bank executives get huge rewards in an economy like the one we have in the US.