It's a bleak time for the financial markets. We've seen financial institutions fall and governments around the world struggling to stabilise the markets. But who is to blame? According to media reports there are two suspects in the dock: the "rocket scientists" (a.k.a. the financial mathematicians) who provided the information behind the market's decisions, or the greedy bankers who only thought about quick profits and their end-of-year bonuses.

First on the stand: mathematics. But just what role does maths have in the financial market?

Will maths give you the mortage?

Listen to a podcast of this interview.

Most of us will have come into direct contact with financial maths when applying for a loan from a high street bank. Rather than the bank manager relying on how well they know you personally, as might have happened in the past, now loan decisions are based on statistical models. "Based on retrospective data about past customers (data from their application forms and how they've behaved in the past) we can build statistical models to predict whether someone is likely to have difficulty repaying, or even default on their loan," said David Hand, director of the Quantitative Financial Risk Management Centre at Imperial College. This has the advantage of limiting the role of subjective personal assessments in the decision, and also that, as these models are improved over time, bank managers benefit from the experience of all past customers rather than just those they have personally been involved with.

But these robust mathematical models predicting whether or not someone will be able to repay their loan did not avert the subprime mortgages in the US (high-risk loans such as mortgages for 100% of a property's value, or to people likely to default), the first domino to fall in the current crisis. "In the area I work in, the retail banking sector, the models are pretty good at predicting if someone is a high risk or not. But predicting that someone is a high risk doesn't stop somebody nevertheless going ahead and taking a bet on that person," said Hand. "So we've got to distinguish between the models, and how the models are used."

With the financial crisis now unfolding, much blame has also been put on derivatives, one of the complex financial instruments traded in the international markets. Derivatives, often seen by the press as the bogey-man of finance, are financial products that are based on the value of underlying variables. These figures could be anything from the price of a share to the number of particularly cold winter days. (You can read more about derivatives in the Plus article Rogue Trading.) Financial mathematicians build models to understand how these derivatives perform, which contributes to how they are priced.

The idea behind a derivative is that you can reduce the risk associated with an asset, for example hedging an investment by buying a derivative that will gain if your original investment loses.

Say you have to pay €1000 for your new sofa when it is delivered in three months time. This seems a fair price today, when €1000 is equal to £770. But if the price of the Euro goes up, and in three months time €1000 is worth £850, then that's £80 more than you were expecting to pay. To protect against this you could buy a call option on the Euro (the option costing you, say, £10), giving you the right (but not the obligation) to buy €1000 in three months time at £770. If your worst fears are realised and the Euro goes up so that €1000 is worth £850, you could exercise your option and buy €1000 at the agreed price of £770, saving you £70 (£80 due to the rise in the Euro minus the £10 the cost of the call option). If however the Euro holds steady or even falls and you decide not to use the call option — you might have lost the £10 the option cost you, but benefited from the peace of mind!

Making money off money

You can also invest in derivatives in their own right. If you bought the call option in the example above as an investment, you are in effect betting that the Euro will rise, and in this case you would make a £70 profit. This can be a wise way to invest, but only if you choose certain types of derivatives.

"I think there needs to be a distinction between the use of derivatives in equity or foreign exchange, where there is a very liquid asset underlying the trade, and the use of derivatives in the credit arena," said Chris Rogers, Professor of Statistical Science and head of the Quantitative Finance Group at the University of Cambridge. "If you buy a call option on a Euro, there is a lot you can do to protect yourself, reacting as the price of a Euro changes. In a credit default swap (a sort of insurance against someone defaulting on payments, see below for an example), you either pay out nothing, or something. There isn't a lot you can do to protect yourself against that zero or one event, whereas a derivative in something more continuous in value such as the Euro can be hedged. A credit related derivative is basically an insurance product."

You might buy a credit derivative if you have loaned Company A an amount d=£1000 for 3 years, but you are worried that they might not pay it back. You could buy a credit derivative from Company B to insure against this possibility. You would pay Company B an amount of, say, p=£30 (split into say £10 per year — like an insurance premium), and if at the end of 3 years Company A doesn't pay back your money, Company B will give you your £1000 instead.

Company B either has to pay out, or it doesn't, and their profit from the credit derivative would be

Profit = (probability of not defaulting) × p − (probability of defaulting) × d.

Therefore as long as the probability of defaulting was sufficiently low, Company B would make money. And this is why credit derivatives became so popular: for the buyers it was an insurance policy against people defaulting on loans, and for sellers it appeared to be an easy profit while the market was booming and not many loans were defaulting.

In reality credit derivatives were used to bundle up a large basket of loans, sharing the credit risk associated with these debts around the market. These financial products gave good returns while there were only a few failing loans in the basket. But as the credit derivative market grew, subprime loans began to be included in credit derivatives, and when large numbers of people defaulted on these loans the effects were felt throughout the market.

So did the mathematicians get their sums wrong? Not really, said Rogers, the information the mathematicians could provide could only be as good as the data their models were built on. "The modelling assumption [used to price these derivatives] didn't allow a sufficiently high probability of large numbers of loans failing at once, and that is what happened."

Listen to a podcast of this interview.

For a new market such as credit derivatives the data available wouldn't have been very good and that would affect the models. "The price for a new product is whatever anyone is prepared to pay," said Rogers, and the price of credit derivatives didn't reflect the true risks they involved. Even if mathematicians did highlight the risks involved in these products, it is likely that in a booming market they would probably have been over-ruled in the face of potential profits. "The role of mathematicians in a bank is essentially a subordinate one, they are the servants of the business imperative." Rogers said there is evidence that some people correctly assessed the risks the market was taking: "Goldman Sachs for example were much more cautious about the risks involved with subprime mortgages, and events proved them right, even though they too have suffered in the fallout."

Greed made me do it... or was it the hormones?

What about the other accused, the greedy bankers? According to Geraint Anderson, a city-banker turned writer, many did operate with only their bonuses in mind. But perhaps it is the environment the bankers work in that is the problem. Their rewards depend on how much they make in the short-term, and this is part of the regulatory changes that may take place as a result of this crisis. But regulation might not be able to change human behaviour.

John Coates, a Research Fellow in Neuroscience and Finance at the University of Cambridge, worked as a trader during Black Monday, the Asian Financial Crisis and the Dot.com Bubble and noticed strange behaviour during periods of financial crisis: "During the Dot.com Bubble in New York people were acting very odd, they were displaying classic symptoms of mania - overconfidence, racing thoughts, diminished need for sleep. They weren't acting like that before the bubble and they weren't acting like that after, so it occurred to me that some chemical was altering their behaviour during the bubble. I also noticed that women seemed relatively unaffected by the frenzy. Both facts put me onto the trail of a chemical like testosterone." His research now looks at a model called the Winner Effect, which has been tested in a number of animal species. The winner of a competition comes out with boosted testosterone levels which in the short term give them advantages in the next competition, such as increased confidence and risk taking. But after a series of wins the build up of testosterone eventually causes them to become overconfident and take stupid and ultimately dangerous risks.

Coates tested the hormone levels in bankers over two weeks on a trading floor and found that they had extremely high peaks of testosterone that closely correlated with successful trading days. He thinks that high testosterone levels, and the increased risk-taking that ensues, might contribute to instability in the market. But people can't change their physiology, so what is the answer? Coates suggests that changing the steroid profile of the trading floor would make a difference, which means increasing the proportion of women and older men to the more typical inhabitants, younger men.

It is of course too simplistic to lay the blame on either the maths or the bankers. As the current crisis unfolds we are getting a crash course in how the markets work, and how that environment, and even our own behaviour, may have contributed to the situation. We can only hope that we also learn the lessons in what went wrong, and do something to prevent it happening again.

Plus interviewed David Hand, Geraint Anderson and John Coates at Number Crunchers, one of the many public debates at the Dana Centre in London. There are events every week discussing health, architecture, culture, crime and much more. Mathematics takes centre stage on 20 November when Marcus du Sautoy will be part of the discussion on Zero to Infinity. You can also listen to a podcast of this interview.