Some of the most arresting analysis of the causes and consequences of the financial crisis is being made by Andrew Haldane, the executive director of what the Bank of England calls - with no hint of irony - "financial stability".

His latest speech, "Small Lessons from a Big Crisis" [pdf link], is grist for those who believe top bankers are being paid far too much (although this is not a conclusion he draws himself).

First, Haldane looks at the returns generated by UK banks and financial institutions since 1900, to see whether shares in the financial sector have performed better than the market in general.

What this shows is that from 1900 to 1985, the financial sector produced an average annual return of around 2% a year, relative to other stocks and shares.

So for 85 years investing in bank shares was "close to a break-even strategy" (his words), nothing special.

But in the subsequent 20 years, from 1986 to 2006, returns went through the roof: the average annual return soared to more than 16%, which was the best performance by financial-sector shares in UK financial history.

And it's no coincidence that the pay of top bankers also zoomed up to the stratosphere. Which at the time upset only a few, because the bankers seemed to be enriching the owners of the banks, their shareholders (millions of us through our pension funds).

That, of course, is not the whole story.

The collapse of banks' share prices in the past two years has wiped out most of those gains: to March this year, when the low point was touched, the fall in UK bank share prices was more than 80%, an all-time record plunge.

What this means is that in the full period from 1900 to the end of 2008, the annual average return on financial shares was less than 3%, almost identical to the market as a whole.

Which is what common sense would predict should have happened, since banks are to a large extent a utility, serving the needs of the wider economy, and its difficult to see how banks in general can therefore grow significantly faster than the wider economy.

What went so right in 1986 to 2006? Had top bankers become much more brilliant than their predecessors, such that they deserved disproportionate rewards?

Haldane answers this question by breaking down banks' return on equity - the return generated on ordinary shareholders' capital - into its two component parts, which are the return on gross assets and the leverage employed by the bank.

This is slightly complicated, but bear with me, because it is absolutely central to assessing whether bankers merited their lavish remuneration.

Now if you want to know whether bankers are particularly skilful, you have to look at the return on gross assets. If one bank earns consistently bigger margins on the loans and investments it makes, that tells you it is probably doing something cleverer than its rivals.

By contrast, leverage - or the ratio between a bank's gross assets and its stock of shareholders' equity - is the Las Vegas part of the return on equity, the contribution made by a punt or a gamble.

Here's the important point: for any rate of return earned per unit of a bank's gross assets, the return on shareholders' equity rises as the assets-to-equity ratio rises - or, to use the jargon, as leverage rises.

Which is easier to grasp by way of a practical illustration.

Suppose a bank has lent £1,000 and earns a 1% net return on this, or £10. If that £1,000 is backed by £50 of shareholders' equity - which is a leverage multiple of 20 - the return on equity is 10 divided by 50, or 20% (which, for what it's worth, is a handsome rate of return).

Now, suppose another bank lends £1,000 on a leverage multiple of 50, or supported by just £20 of shareholders' equity. In this case, the return on equity is 10 divided by 20, or 50%. So the return to shareholders is a stupendous 50%.

Or to put it another way, increasing leverage is a simple and automatic way of increasing returns to shareholders. And as I hope you've noticed, there's nothing terribly clever about it.

But if all you care about is fat returns, and you're not interested in how they're earned, you'd give the boss of the highly leveraged bank a cigar, a bottle of Krug and a £5m bonus.

As I've observed many times in this column, maximising leverage is the equivalent of buying a house with the maximum amount of debt: it looks like an awfully smart thing to do when everything's going up up up, but is the fastest way to lose money when the economy turns.

Just to prove the point: if our banks were to lose £20 on their £1,000 of loans, the bank with just £20 of equity would be wiped out, it would be bust (a big hello to Royal Bank of Scotland, which at the peak of its lending and investing had a balance sheet that was indeed 50 times the size of its core equity).

So what has Haldane discovered about the golden banking years from 1986 to 2006? Were the super-normal returns of banks the consequence of management skill, viz high returns on gross assets? Or were they casino profits, generated because banks in general increased their leverage, their ratio of assets to equity?

This is what Haldane says:

"Since 2000, rising leverage fully accounts for movements in UK banks' ROE [return on equity] - both the rise to around 24% in 2007 and the subsequent fall into negative territory in 2008."

In other words, in the seven years before the crash, British banks' bumper profits were in aggregate generated wholly by a massive increase in leverage by the industry: and in Haldane's view, these would be returns generated by gamblers' luck, the jackpot from the roulette ball landing on black.

What follows?

Well, it's uncontroversial that we all paid something of a price, in the form of the worst global recession since the 1930s, when the bankers' luck ran out, when the wheel spun to red.

Which means that we all have an interest in preventing bankers from repeating these reckless gambles.

These would be a few useful lessons.

1) The overall level of bankers' pay was inflated over the past few years by the rewards they scooped from the leverage gamble. It should be cut to a level commensurate with an industry that's closer to a boring utility than to a wealth-creating, entrepreneurial venture. This has not happened yet. In fact, if anything, bankers are pumping up their pay packages again (the recent remuneration deal made by Royal Bank of Scotland with its chief executive, Stephen Hester, would not have looked mean in the boom-boom era).

2) Regulators should impose a legally binding maximum - and at a relatively modest level - for the ratio of a bank's gross assets to its equity, the leverage multiple, to restrict bankers' freedom to gamble.

3) Owners of banks should be very cautious indeed about rewarding bankers for the returns they generate on equity, and should focus rather more on the returns earned on gross assets.

If you're still with me (wakey, wakey), there's one other important related issue I want to explore, which is how to re-introduce moral hazard into banking, how to persuade bank chief executives that they'll really suffer if they place reckless bets that go wrong.

The problem is that no one can possibly any longer believe that there are any circumstances in which our government will let one of our biggest banks collapse.

Which is an enormous comfort to the chief executive of a bank. It means he or she can do something spectacularly stupid, safe in the knowledge that taxpayers will bail out the bank as and when it all goes wrong.

The best deterrent against greed-fuelled gambling by banks is the threat of being sacked when it all goes pear-shaped. But that's not a particularly scary threat to any banker who's earned enough in the preceding years never to need to work again.

That rather implies that bankers should be paid a decent wage, but should not be able to get their mits on any serious wealth for years and years and years.

Arguably they shouldn't be allowed the big haul till they retire and it's clear beyond a scintilla of doubt that they haven't dangerously over-mortgaged their respective institutions.

And once again we're back to the serious critique of Royal Bank of Scotland's board for sanctioning Sir Fred Goodwin's never-have-to-work-again pension.

But Sir Fred is just one embodiment of how banking became a casino run for the benefit of bank executives: the sucker punters were the shareholders and - little did we know it - taxpayers.

