AP

WITH an investment bank failing, an insurance giant needing a bail-out, the Dow tumbling and panic gripping Wall Street, Barack Obama spoke graciously about his opponent. “I certainly don't fault Senator [John] McCain for these problems,” he said. He also refrained from blaming him for global warming and Hurricane Ike. But he did fault Mr McCain for his economic philosophy, “a philosophy that says even common-sense regulations are unnecessary and unwise, and one that says we should just stick our heads in the sand and ignore economic problems until they spiral into crises.”

Both candidates doubtless wish to tackle the crisis. But they cannot, since neither will be in charge until January and the crisis must be tackled immediately. So each is trying to sound as if he would knock some sense into Wall Street, while tut-tutting that the other fellow supported the policies that got America into this mess in the first place.

Mr Obama has the immense advantage that voters tend to blame the party in the White House for bad news. His campaign has looked sickly in the past few weeks, since Mr McCain picked Alaska's Governor Sarah Palin as his running-mate and then surged ahead in the polls. As the American financial system stumbles, however, Mr Obama is catching up. A poll of polls by RealClearPolitics.com, a political website, now puts Mr McCain less than a percentage point ahead.

Mr Obama contends that the nightmare on Wall Street was caused by financial deregulation of the sort Mr McCain has long championed. This is partly true. Lax oversight did indeed allow financial firms to borrow far more than was prudent to make bets that have now gone sour. Tougher regulations might have prevented this. Mr Obama reminded voters in Colorado on September 16th that Mr McCain recently said: “I'm always for less regulation.” Now the Republican candidate says he favours stricter regulations, though he provides few details.

The Obama campaign also contends that Mr McCain is so rich (his wife is worth an estimated $100m) that he does not understand the woes of cash-strapped ordinary Americans. Mr McCain does not help his case by saying things like “the fundamentals of our economy are strong”. That may be true, depending on how you define “fundamentals”, but it does not sound empathetic. Joe Biden, Mr Obama's running-mate, scoffed that “I could walk from here [St Clair Shores, Michigan] to Lansing [about 94 miles, or 151km], and I wouldn't run into a single person who thought our economy was doing well, unless I ran into John McCain.”

Mr Obama insinuates that Mr McCain cannot be trusted to deal with the crisis because his strings are pulled by lobbyists, who “shred consumer protections and distort our economy so it works for the special interests”. Or, as Mr Biden put it: “The very few wealthy and powerful have a seat at the table and everybody else is on the menu.” It is true that the financial, insurance and real-estate industries have donated $22m to Mr McCain's campaign. But they have given $25m to Mr Obama.

Finally, the Obama campaign suggests that the 72-year-old Mr McCain is too doddery to understand the doohickeys that modern bankers (and others) use. A campaign ad says he “doesn't know how to use a computer, can't send an e-mail”. Mr McCain admits that he gets others to call up websites for him. One reason is that the injuries he sustained as a prisoner of war make it painful for him to type.

Mr McCain's first response to the crisis was to rage about the “reckless conduct, corruption and unbridled greed” that he says caused it. He fumed that when financial firms collapse, only the bosses seem to escape the consequences. Under a McCain presidency, he promised, “we're not going to tolerate that any more.”

Mr Obama said that no one should trust Mr McCain's promise to establish proper oversight of Wall Street because “he has shown time and again that he does not believe in it”. The truth is more confusing. Mr McCain's instinct to give markets free rein has always tussled with his Teddy Roosevelt-like suspicion of over-mighty corporations. The confusion is compounded by his obvious lack of interest in, or knowledge of, the nuts and bolts of finance. His main concrete proposal this week was to set up a commission to study what caused the current crisis and recommend reforms to prevent another one.

Mr Obama sounded more at ease as he reiterated the principles by which he would regulate the American financial system. First, he said, any financial institution that can borrow from the government should be subject to stricter government oversight. Second, he would strengthen capital requirements and demand better disclosure of risks and obligations that firms hide off their balance sheets.

Third, he would streamline regulatory agencies. Fourth, he would regulate institutions for what they do, not what they are. For example, mortgages should be subject to the same rules whether offered by a bank or a mortgage-broker. Fifth, he would crack down on market manipulation. And sixth, he would establish a process to identify systemic risks before they explode.

Mr McCain's strongest point this week was one he made only briefly, when he drew attention to the other big factor behind the meltdown: the two government-sponsored mortgage giants, Fannie Mae and Freddie Mac. These two firms own or guarantee about half the home loans in America. Until they almost collapsed and had to be (mostly) taken over by the government earlier this month, they were a ghastly hybrid. The government implicitly guaranteed their creditworthiness, enabling them to borrow at below-market rates. But private shareholders pocketed the profits they made lending this cheap money at higher interest rates.

Fannie and Freddie were supposed to make it easier for creditworthy borrowers to buy homes. But most of the implicit subsidy went to shareholders. And since managers knew they could rely on the government to bail them out, they expanded recklessly, contributing to the property bubble that has now burst. The cost of Fannie's and Freddie's bail-out, which could be huge, will be borne by taxpayers. The blame rests with Democrats and Republicans in Congress, who encouraged Fanny and Freddie to keep growing, not least because the firms lobbied them so lavishly.

Both Mr McCain and Mr Obama said some time ago that trouble was brewing, but they offer different solutions. Mr McCain argues that both institutions should eventually be disbanded. Mr Obama thinks they can be reformed, and wants to go on pumping public money into the housing market. Mr McCain notes that Mr Obama took more donations from Fannie and Freddie than any politician bar the chairman of the committee they answer to. “That's not change,” he said. “That's what's broken in Washington.”