It's not every day that someone writes down an equation that ends up changing the world. But it does happen sometimes, and the world doesn't always change for the better. It has been argued that one formula known as Black-Scholes, along with its descendants, helped to blow up the financial world.
Black-Scholes was first written down in the early 1970s but its story starts earlier than that, in the Dojima Rice Exchange in 17th Century Japan where futures contracts were written for rice traders. A simple futures contract says that I will agree to buy rice from you in one year's time, at a price that we agree right now.
By the 20th Century the Chicago Board of Trade was providing a marketplace for traders to deal not only in futures but in options contracts. An example of an option is a contract where we agree that I can buy rice from you at any time over the next year, at a price that we agree right now - but I don't have to if I don't want to.
You can imagine why this kind of contract might be useful. If I am running a big chain of hamburger restaurants, but I don't know how much beef I'll need to buy next year, and I am nervous that the price of beef might rise, well - all I need is to buy some options on beef.
But then that leads to a very ticklish problem. How much should I be paying for those beef options? What are they worth? And that's where this world-changing equation, the Black-Scholes formula, can help.
"The problem it's trying to solve is to define the value of the right, but not the obligation, to buy a particular asset at a specified price, within or at the end of a specified time period," says Professor Myron Scholes, professor of finance at the Stanford University Graduate School of Business and - of course - co-inventor of the Black-Scholes formula.
The young Scholes was fascinated by finance. As a teenager, he persuaded his mother to set up an account so that he could trade on the stock market. One of the amazing things about Scholes is that throughout his time as an undergraduate and then a doctoral student, he was half-blind. And so, he says, he got very good at listening and at thinking.
When he was 26, an operation largely restored his sight. The next year, he became an assistant professor at MIT, and it was there that he stumbled upon the option-pricing puzzle.
One part of the puzzle was this question of risk: the value of an option to buy beef at a price of - say - $2 (£1.23) a kilogram presumably depends on what the price of beef is, and how the price of beef is moving around.
But the connection between the price of beef and the value of the beef option doesn't vary in a straightforward way - it depends how likely the option is to actually be used. That in turn depends on the option price and the beef price. All the variables seem to be tangled up in an impenetrable way.
Scholes worked on the problem with his colleague, Fischer Black, and figured out that if I own just the right portfolio of beef, plus options to buy and sell beef, I have a delicious and totally risk-free portfolio. Since I already know the price of beef and the price of risk-free assets, by looking at the difference between them I can work out the price of these beef options. That's the basic idea. The details are hugely complicated.
"It might have taken us a year, a year and a half to be able to solve and get the simple Black-Scholes formula," says Scholes. "But we had the actual underlying dynamics way before."
The Black-Scholes method turned out to be a way not only to calculate value of options but all kinds of other financial assets. "We were like kids in a candy story in the sense that we described options everywhere, options were embedded in everything that we did in life," says Scholes.
But Black and Scholes weren't the only kids in the candy store, says Ian Stewart, whose book argues that Black-Scholes was a dangerous invention.
"What the equation did was give everyone the confidence to trade options and very quickly, much more complicated financial options known as derivatives," he says.
Scholes thought his equation would be useful. He didn't expect it to transform the face of finance. But it quickly became obvious that it would.
"About the time we had published this article, that's 1973, simultaneously or approximately a month thereafter, the Chicago Board Options Exchange started to trade call options on 16 stocks," he recalls.
Scholes had just moved to the University of Chicago. He and his colleagues had already been teaching the Black-Scholes formula and methodology to students for several years.
"There were many young traders who either had taken courses at MIT or Chicago in using the option pricing technology. On the other hand, there was a group of traders who had only intuition and previous experience. And in a very short period of time, the intuitive players were essentially eliminated by the more systematic players who had this pricing technology."
That was just the beginning.
"By 2007 the trade in derivatives worldwide was one quadrillion (thousand million million) US dollars - this is 10 times the total production of goods on the planet over its entire history," says Stewart. "OK, we're talking about the totals in a two-way trade, people are buying and people are selling and you're adding it all up as if it doesn't cancel out, but it was a huge trade."
The Black-Scholes formula had passed the market test. But as banks and hedge funds relied more and more on their equations, they became more and more vulnerable to mistakes or over-simplifications in the mathematics.
"The equation is based on the idea that big movements are actually very, very rare. The problem is that real markets have these big changes much more often that this model predicts," says Stewart. "And the other problem is that everyone's following the same mathematical principles, so they're all going to get the same answer."
Now these were known problems. What was not clear was whether the problems were small enough to ignore, or well enough understood to fix. And then in the late 1990s, two remarkable things happened.
"The inventors got the Nobel Prize for Economics," says Stewart. "I would argue they thoroughly deserved to get it."
Fischer Black died young, in 1995. When in 1997 Scholes won the Nobel memorial prize, he shared it not with Black but with Robert Merton, another option-pricing expert.
Scholes' work had inspired a generation of mathematical wizards on Wall Street, and by this stage both he and Merton were players in the world of finance, as partners of a hedge fund called Long-Term Capital Management.
"The whole idea of this company was that it was going to base its trading on mathematical principles such as the Black-Scholes equation. And it actually was amazingly successful to begin with," says Stewart. "It was outperforming the traditional companies quite noticeably and everything looked great."
But it didn't end well. Long-Term Capital Management ran into, among other things, the Russian financial crisis. The firm lost $4bn (£2.5bn) in the course of six weeks. It was bailed out by a consortium of banks which had been assembled by the Federal Reserve. And - at the time - it was a very big story indeed. This was all happening in August and September of 1998, less than a year after Scholes had been awarded his Nobel prize.
Stewart says the lessons from Long-Term Capital Management were obvious. "It showed the danger of this kind of algorithmically-based trading if you don't keep an eye on some of the indicators that the more conventional people would use," he says. "They [Long-Term Capital Management] were committed, pretty much, to just ploughing ahead with the system they had. And it went wrong."
Scholes says that's not what happened at all. "It had nothing to do with equations and nothing to do with models," he says. "I was not running the firm, let me be very clear about that. There was not an ability to withstand the shock that occurred in the market in the summer and fall of late 1998. So it was just a matter of risk-taking. It wasn't a matter of modelling."
This is something people were still arguing about a decade later. Was the collapse of Long-Term Capital Management an indictment of mathematical approaches to finance or, as Scholes says, was it simply a case of traders taking too much risk against the better judgement of the mathematical experts?
Ten years after the Long-Term Capital Management bail-out, Lehman Brothers collapsed. And the debate over Black-Scholes and LTCM is now a broader debate over the role of mathematical equations in finance.
Ian Stewart claims that the Black-Scholes equation changed the world. Does he really believe that mathematics caused the financial crisis?
"It was abuse of their equation that caused trouble, and I don't think you can blame the inventors of an equation if somebody else comes along and uses it badly," he says.
"And it wasn't just that equation. It was a whole generation of other mathematical models and all sorts of other techniques that followed on its heels. But it was one of the major discoveries that opened the door to all this."
Black-Scholes changed the culture of Wall Street, from a place where people traded based on common sense, experience and intuition, to a place where the computer said yes or no.
But is it really fair to blame Black-Scholes for what followed it? "The Black-Scholes technology has very specific rules and requirements," says Scholes. "That technology attracted or caused investment banks to hire people who had quantitative or mathematical skills. I accept that. They then developed products or technologies of their own."
Not all of those subsequent technologies, says Scholes, were good enough. "[Some] had assumptions that were wrong, or they used data incorrectly to calibrate their models, or people who used [the] models didn't know how to use them."
Scholes argues there is no going back. "The fundamental issue is that quantitative technologies in finance will survive, and will grow, and will continue to evolve over time," he says.
But for Ian Stewart, the story of Black-Scholes - and of Long-Term Capital Management - is a kind of morality tale. "It's very tempting to see the financial crisis and various things which led up to it as sort of the classic Greek tragedy of hubris begets nemesis," he says.
"You try to fly, you fly too close to the sun, the wax holding your wings on melts and you fall down to the ground. My personal view is that it's not just tempting to do that but there is actually a certain amount of truth in that way of thinking. I think the bankers' hubris did indeed beget nemesis. But the big problem is that it wasn't the bankers on whom the nemesis descended - it was the rest of us."
Additional reporting by Richard Knight