Sunday, 14 December 2014

Talk : A Defence of the Monte Carlo Simulation

Interesting Cafe Sci talk recently by Dr Nira Chamberlain on the "Monte Carlo" Simulation and how, in Dr Chamberlains view, it had been unfairly blamed for the 2008 financial crisis. This post is based on the talk, with a little extra linkage thrown in.

Dr Chamberlain is a professional mathematician, has been named as one of the UK's 100 leading practical scientists, and is an advocate for mathematics (see also here).

The Monte Carlo simulation is a way of solving mathematical problems by taking multiple random samples rather than trying to "calculate" the answer. For example, rather than trying to calculate the average time to complete a maze, say, a Monte Carlo Simulation would repeatedly try to go through a maze, taking random decisions at each junction, and see how how long it took, on average, to get to the other side.

Perhaps the first use of a Monte Carlo simulation was by French polymath Pierre-Simon Laplace, who used it to estimate the value of pi.

But it was only with the advent of electronic computers, which could quickly perform many thousands of calculations, that Monte Carlo simulations really came into their own, most famously to help the design of the first nuclear bombs in the Manhatten project. It was here that it was given the name "Monte Carlo Method" as it reminded one of the researchers of gambling behaviour in the famous Monte Carlo casino.

After WW2, Monte Carlo simulations were used in applications ranging from engineering to computational biology

An important use of the Monte Carlo simulation is in financial modelling. Dr Chamberlain explained their use, using the "maze" as an analogy for a financial product. Imagine two traders, Trader A and Trader B...

Trader A to Trader B : Here is a maze, and here is £60million pounds on the table. When the clock starts, you begin the maze and I'll start taking away £1million very minute. If you get through the maze in less than an hour, you keep any money left on the table - but if it takes you MORE than an hour, you have to give me £1million for every minute over an hour that it takes you. Do you want to take this bet? (optional evil laugh here)

Trader B (thinks) : The question I need to know the answer to, right now, is how long it takes on average to get through the maze.

And this is where the Monte Carlo simulation comes in. The simulation will have many attempts to get through the maze, and the results are likely for form some kind of frequency distribution like this :

That is all well and good - the problem comes if, in real life the maze is more complicated than the one in the simulation, and the probability distribution is actually like this :

Dr Chamberlain explained that this mismatch between theory and the real world is exactly what happened to financial models in the wake of the 2008 sub-prime defaults, and was a big factor in the resulting financial crisis.

And, worse that this, when the trades lost money the traders thought they had just been unlucky (because their simulation was wrong), so bet again...and again.

Dr Chamberlain commented that JP Morgan had released the Monte Carlo method to the financial marketplace in 1992 [as part of their RiskMetrics methodology] but, in doing so they failed to adequately warn the market about some of the dangers in using the method. The 2008 crisis left many wondering whether Monte Carlo simulations were to blame. Dr Chamberlain gave examples such as an article entitled "Is Financial Monte Carlo Simulation Dead"

However, as suggested in the talks title - Dr Chamberlain was here to defend the Monte Carlo method, and felt that the problem was more to do with poor inputs and assumptions rather than the method itself, commenting that :

i) When the underlying conditions change, so should the assumptions in any relevant Monte Carlo simulations.

ii) A crisis similar had previously occurred in 1998, when LTCM went bust having lost $4.6billion due to the Russian and Far Eastern economic crises distorting the market. [NCB notes that LTCM was dripping with Economics Nobel Prize winners and that the subsequently bought out company went bust again in 2009].

iii) The market had been warned about the risks of unexpected marked events, for example in the Black Swan theory and in a paper presented at the International Congress of Mathematicians 2002

iv) The Winner Effect, where testosterone fuels increasingly risky trading behaviour.

Talk : Maths in Society

Went to an interesting Cafe Sci talk recently in which Dr Snezana Lawrence (Senior Lecturer in Mathematics Education at Bath Spa University) discussed how mathematics was perceived in society and how it was taught to schoolchildren.

This post is based on the talk, with some added linkage thrown in.

Dr Lawrence began by describing how she had once addressed an audience of around 70 people from the London Mathematical Society to raise their hands if they were mathematicians and was surprised to find that only one person did so - it turned out that only the most "pure" mathematics researchers were actually regarded by their peers as actual mathematicians, with everyone else believing themselves to be a specialist of some sort!

The Dr continued by noting that, although mathematics was often viewed as a "universal language", there were often significant differences in how it was taught in different countries. For example, the eastern european countries are still heavily influenced by the practical style of mathematics developed by France after the revolution, in contrast to the much more theoretical work that was undertaken in next door neighbour Germany. Many of the key figures of the period, as well as the major trends, are covered in this excellent article at The Story of Mathematics.

One of the greatest awards that a mathematician can get is a "Fields Medal", which are awarded every four years. The most recent recipients, in 2014, were Artur Avila, Maryam Mirzakhani, Manoj Bhargava and Martin Hairer.

Artur Avila - top mathematician

Other mathematician who were mentioned included Paul Erdős and Andrew Wiles who discovered a proof to Fermat's Last Theorem and whose work is described here.

Andrew Wiles - aimed high, scored big time!

Dr Lawrence also played a few clips showing how mathematicians were portrayed in films (e.g. Good Will Hunting, Pi) and commented that the portrayals were generally as mathematicians being aloof, mentally on-the-edge and geniuses.

These themes were also explored in the rather awesome documentary "Dangerous Knowledge" (see also here) which looked at the lives of the great mathematians Georg Cantor, Ludwig Boltzmann, Kurt Gödel and Alan Turing. The documentary describes how Europe at the end of the 19th century was moving from an age where science was all about certainty (e.g.Newtons Laws of Motion) to one that was driven by uncertainty (e.g. Brownian motion). The program shows how mathematicians such as Cantor and physicists such as Boltzmann who were grappling with ideas that involved uncertainty faced very significant resistance from their peers. Cantor's work which dealt with infinity not as an abstract idea but as a concept that could be worked with and had infinities of different sizes, led him to a nervous breakdown.

Some idea of the paradoxes involved in thinking about infinities can be seen by considering Galileo's Paradox , which goes something like this :

1) In a number line, there are fewer square numbers (4,9,16,25,36...) than there are numbers in total (e.g. 4,5,6...34,35,36...)
2) Yet for each number there is also a square (4 has 16, 5 has 25, 6 has 36 etc) - so there should be as many squares as there are numbers.

The way mathematics was portrayed in society was also discussed, with reference being made to the infamous "Maths Class is tough" Barbie and Dr Lawrence explaining that mathematics was perceived as a "high stakes" subject to study, although it did provide some kudos to those who were good at it - and that the current fascination with millionaire IT geek entrepreneurs had also raised the standing of the subject somewhat.

Governments of all colours have long been concerned about the national skills base in mathematics (as well as in other STEM subjects), with a report on the issue being issued by Prof Adrian Smith in 2004 (Government response here)

Dr Lawrence also described the work of Nicolas Bourbaki, who has published many papers, despite the fact that there is not actually a mathematician called Nicolas Bourbaki.

Winningly, Bourbaki was also the inventor of the "dangerous bend" symbol. A fact that made the talk worthwhile for NSB all by itself!

A sign from Bourbaki

A theme that recurred throughout the talk and the subsequent Q&A was that students would often ask how mathematics was relevant to them. One example of how this can be answered is the "Taking Maths Further" podcasts, which look at how mathematical concepts are practically used in science and industry.

Also, Dr Lawrence's website, has a maths timeline, list of mathematicians and a lot of other, very accessible, information.

Image Sources:
Dangerous Bend
Andrew Wiles
Artur Avila