Reuters

TO THE survivors, the spoils. That is the cry going up at Goldman Sachs after it chalked up recession-defying—nay, record-breaking—quarterly profits on Tuesday July 14th. Minting more than $3 billion in as many months, so soon after its own near-death experience in the wake of Lehman Brothers' demise, will enhance Goldman's reputation as Wall Street's overachiever. But it will also strike some as faintly obscene given the scale of public support needed to keep the firm and its peers from buckling last year.

The first half of 2009 was fertile for investment bankers as markets rebounded and companies (not least banks themselves) rushed to raise debt and equity. But none of the banks still due to report, not even a resurgent JP Morgan Chase, is expected to come close to Goldman's blow-out performance. Having incurred smaller losses than rivals, it is still prepared to deploy risk capital where others fear to tread.

Goldman claims that most of its profit came not from “proprietary” trading, or punting its own money, but by acting as a middleman, making markets for clients in everything from bonds and shares to currencies and commodities. Such “agency” business, barely profitable in the boom years, has become a potential goldmine as competition has dwindled and bid-ask spreads (the slice dealers pocket on trades) have ballooned. A bank with the capital and daring to deal mortgage-backed securities issued by Fannie Mae or Freddie Mac can earn 10-15 times more than before the crisis.

Goldman, a dyed-in-the-wool trading firm, is grabbing such opportunities with glee, taking business from once ubiquitous but now reeling rivals, such as Citigroup and UBS. It also helps that its arch-rival, Morgan Stanley, has pulled in its horns. By contrast, Goldman's value-at-risk—the amount it could lose on a bad day and thus a widely used (if imperfect) measure of risk appetite—hit a new high last quarter, jumping most in equities, even as stockmarket volatility fell. With spreads so high, the firm no longer needs to use as much borrowed money to get results. Its leverage ratio has fallen to 14, half its pre-crisis level—though still much higher than that of a typical commercial bank.

This windfall will eventually dwindle. Goldman and other survivors will benefit from the coming wave of debt issuance by federal, state and local governments. But dealer spreads are sure to shrink as markets normalise and those that have retreated return to the fray. This is likely to be offset only partially by a pick-up in businesses tied more closely to economic growth, such as advising on mergers and acquisitions.

Wall Street will also face tighter shackles. Regulators are on the warpath against commodities speculators. A clampdown is also coming in credit derivatives; this week America's Justice Department joined those probing that market. America's largest financial firms face higher capital requirements. These changes may not bring Goldman back to earth but they will clip its wings.

In the shorter term, the bank needs to worry about a possible backlash against its incongruously generous pay policies. For the year to date it set aside $11.4 billion for compensation and benefits, more even than in the halcyon first half of 2007. Its ratio of pay to revenues continues to hover near the dizzying 50% level that was the norm on Wall Street before the meltdown.

For a firm that probably would have collapsed without government capital, debt guarantees and fast-track approval to turn itself into a commercial bank (not to mention a multi-billion-dollar payout as a counterparty of American International Group), such largesse is cheeky at best, distasteful at worst. It has already drawn rebukes on Capitol Hill, even though Goldman has repaid the government's $10 billion preferred-equity investment.

The firm's continued generosity towards its employees may, in any case, be premature. Markets remain fragile, and even Goldman would struggle without the array of government loan facilities and other backstops in place. These are insufficient to keep some firms afloat. Officials are now working on a rescue package for CIT, a liquidity-crunched lender to small and middling companies. That they are shoring up a firm too small to pose a systemic risk betrays a continuing lack of confidence in the financial system's ability to absorb even modest shocks. They appear to have concluded that it is better to court moral hazard than to risk setting off another round of instability.

Indeed, while a few on Wall Street are reaching for the champagne, most Main Street lenders are inclined to drown their sorrows. Credit-card losses are at a record high. Mortgage delinquencies are yet to stabilise, with supposedly high-quality “prime” loans now also souring fast and loan-modification schemes having little impact.

Losses are also accelerating in commercial property, on which banks of all sizes loaded up in the fat years. This was the biggest stain on Goldman's ledger, accounting for more than $700m of mark-to-market losses. Unnervingly for other banks, many of which carry their commercial-property loans at close to par value, Goldman marks its portfolio at half that. A Federal Reserve financing programme was recently extended to commercial mortgages but many are or will become ineligible under its present rules because of ratings downgrades. Meanwhile, a public-private scheme to take troubled loans off banks has stalled, partly because of accounting-rule changes that give the banks more leeway in valuing them, reducing pressure to sell—though a $40 billion sister programme for toxic securities finally got going last week.

Small wonder, then, that David Viniar, Goldman's chief financial officer, admitted to analysts that “we are way far away from being out of the woods”. The firm may be scooping up market share at quite a clip. But the bigger picture is still far from pretty.