Sunday, 24 October 2010

High Frequency Trading and Flash Crash – 1: The Ones Who Saw It Coming

The ignorant, pompous academics who created “Continuous-time Finance” — ignorant because they were pompous, pompous because they were ignorant — considered it the crown jewel of their intellectual achievements. Happy were those years of success in the limelight, with this one nominating that one for the Nobel Prize who then turned around and nominated this one for the same. Nobels all around, was the happy cry. Nobels to the Crowd!

To understand Continuous-time Finance (CTF), we have to understand Newtonian mechanics and its language, differential calculus.

Newtonian mechanics revolve around key terms like instantaneous speed and constant acceleration. These are not intuitive concepts. The only way of really grasping them is through mathematics, specifically, calculus. In fact, this branch of mathematics was invented by Newton (and independently, by Leibniz) for that very purpose.

Newton was working to solve the puzzle of the working of celestial bodies that begins with the old question: Why does an apple fall from a tree to the ground but the moon does not? The answer is that the moon is constantly falling but is kept in orbit by the centrifugal force of its rotation around the earth. To get to that answer, one has to know the dynamics of falling bodies: how far they fall and how fast. That is the definition of speed.

We calculate the speed of a moving object by dividing the distance it has traveled by the time it takes to travel. The distance between NY and LA is 3,000 miles. If a plane travels it in 5 hours, the speed of the plane is 600 miles/hour.

What about the speed of a golf ball dropped from the top of the Empire State Building? The building is 1,800 ft tall and it takes 10 seconds for the ball to hit the sidewalk.

In this case, we cannot directly divide the distance by time. What worked for the speed of the plane won’t work here because we assumed the speed of the plane was constant, a logical assumption for our purposes. But the speed of the falling golf ball is not. It’s zero at the top of the building, just before the fall. It is quite high — something we need to calculate — when the ball hits the sidewalk. Between these two points, the speed constantly increases. Since space and time are continuous, it is a perfectly valid question to ask: what would the speed of the ball be in, say, 3.21 seconds after the fall, or after it has fallen 329.73 feet? That is instantaneous speed, the speed at that instant. That is where differential calculus comes in. It is a tool for calculating the instantaneous change in the value of a variable (speed or distance fallen, in our example), as a result of instantaneous change in another variable (time).

CTF is the adaptation of this system to finance. It is finance in a “world” in which prices change continuously and instantaneously, just like the distance traveled by a falling golf ball, only that prices are bi-directional. They go up and down.

The first use of calculus in finance dates back to the beginning of the 20th century. In 1900, French mathematician Louis Bachelier published a differential equation describing stock price movement. It is a perceptive and intelligent model. In Vol. 3 I showed how its use decades later significantly contributed to the success of the Black Scholes option valuation formula.

Of course, the stock price changes in the Paris Bourse of the early 20th century were far from instantaneous. But Bachelier reasoned that the sum of instantaneous changes could approximate the price change over longer intervals; that, after all, is what the other half of calculus – integral calculus – is all about. At any rate, the stock prices seemed to set the irreducible minimum level of activity to which one could apply calculus without looking absurd or ridiculous. Sure, one could use calculus to “calculate” the change in the price of a pizza pie “as a result of” change in its size. But that would be a fool’s errand, a pointless and absurd exercise that only an idiot would undertake. So the matter rested there for nearly 50 years.

It must be a cosmic law of fools that if a fool’s errand exists, a fool is bound to show up, if not sooner then later. The fool came in the form of Paul Samuelson. The future “Titan” had set out to make a name for himself and had decided on mathematics as the desired means. If a Frenchman could apply differential calculus to stock prices, the American was going to outdo him and apply it to all prices – a pound of sugar, a house, an airplane engine, a dozen eggs, a cup of coffee, a diamond ring, a bulldozer. He was coming whether prices were ready or not.

A publicity picture that the New York Times used in his obituary last year shows Samuelson against a blackboard with some bogus equations. Here is the picture.


In this picture, the blackboard is used the way a Caribbean Island might be used in the photo-shoot of a swim-suit model: to accentuate the main attraction’s endowments – physical in one case, intellectual in the other. Let us look at it closely.

In the center, there is price-vs-quantity (P-Q) graph, the crudest and most superficial idea in economics, the if-price-goes-up-demand-drops stuff that only a Sarah Palin might buy. That is what Samuelson is teaching. But he has jazzed up that nonsense with the standard notation of calculus. P and Q have become P(t) and Q(t), meaning that they are “functions of time”, i.e., they change with time.

In the upper right hand corner, at about “one o’clock”, P is expressed by a partial derivative equation. The first term is L, which must stand for labor. The second term is t, which is time. The equation is saying that price — any price — changes with “labor” and time. “Labor” is presumably the “price of labor” or wages.

I need to digress here to say a few words on the role and function of math and why we use it.

Take this simple problem. A father is 48 years old; his son, 18. How many years from now will the father’s age be 3 times the son’s?

If all you know of math is arithmetic, you will struggle with this problem; you have to use a relatively complex chain of reasoning to solve it.

Thanks to Islamic mathematicians, however, we have algebra, the science of manipulating the unknowns. Let the unknown “number of years from now” be X. X years from now, father will be (48 + X) years old; his son, (18 + X). For what value of X then (48 + X) is 3 times (15 + X)? Solving (48 + X) = 3 (18 + X), we get X = -3. Negative X means that the event happened 3 years ago, when the father was 45 and the son 15.

Note how math corrected us. We stated the problem in the future tense: “how many years from now will ...”. Math ignored that phrasing and gave us the right answer by pointing to the past.

That is the function and raison d`etre of mathematics: a tool to employ when intuition, imagination or contemplation could not solve the problem, or solve it only with great difficulty. In the example of the falling golf ball, if you do not know how to differentiate a function, you could not possibly know that the speed of a golf ball 3.21 seconds after the fall would be 102.72ft/second.

Return to the blackboard now and look at P(t)and Q(t): Price and quantity are functions of time, meaning that they change with time. What purpose does this addition of “change with time” serve? Time is a condition of experience. There is absolutely nothing in the world, without exception, which is not a “function of” time. We bothered with learning algebra and writing the equation (48 + X) = 3 (18 + X) because it helped us solve a problem. But writing P(t) instead of P merely looks more complex without in any way helping us learn more about how prices change.

Every single expression on the blackboard behind Samuelson is an indictment of the writer, a prime facie evidence of chicanery. Only a complex character – 1/3 pompous ass, 1/3 ignorant fool, 1/3 perspicuous cheat – would put this tritest of facts into mathematical language – and pose in front of it.

(In calculus, the “function of” association is used not for stating the obvious but for signaling the variable with regards to which a function is to be differentiated or integrated. The distance X that a golf ball falls is X = 16t(squared). To find the speed of the ball at an instant, we must differentiate the function with respect to t. So, we say that X is a function of time, t: X = f(t). The differentiation, by the way, yields V(t) = 32t. The speed of the ball 3.21 seconds later would be V(3.21) = 32 x 3.21 = 102.72ft/second.)

Not everyone fell for Samuelson, though. Harvard refused to hire him. The newspaper of the record mentioned the incident in the obituary but used a red herring to spin it:
Harvard made no attempt to keep him, even though he had by then developed an international following. Mr. Solow said of the Harvard economics department at the time: “You could be disqualified for a job if you were either smart or Jewish or Keynesian. So what chance did this smart, Jewish, Keynesian have?”
We could see that Mr. Solow is being disingenuous. Harvard not keeping Samuelson had nothing to do with his smartness or Jewishness or Keynesianism. Only that the pre-Dershowitz, pre-Summers, pre-Kagan Harvard of yesteryears at times saw through the fools and passed on the opportunity to retain them. Those were the days that the nation’s oldest university could have gone either way.

There was of course a reason for Samuelson’s embrace of mathematics, which I pointed out in Vol. 1:
The years leading up to World War II and immediately following it, brought unprecedented advances in technical and theoretical knowledge that culminated in the building of the atomic bomb. Mathematics was instrumental in that success. A skillful mathematician, it was believed, could solve all problems that lent themselves to mathematical formulation.

Pursuing mathematical finance was advantageous in other ways too. It provided a respite from the contentious ideological disputes in economics between the Left and Right that in the era of McCarthyism were beginning to assume an ever sharper, and potentially career-ruining, tone. Research in mathematical finance had no downside risk. It was socially safe, it provided a perfectly respectable line of research and, with luck, it could lead to new discoveries and from there, to fame and fortune.
Even the purest of mathematical thoughts are not completely void of ideological content, so there was a subtext to the use of mathematics, a hidden message of sorts. If Western economics could be described by the mathematics of Newtonian mechanics, it “followed” that economic system of the West was as solid and permanent as the world itself. And it would last that long. That theoretical lagniappe played no small part in facilitating the funding and propagation of Samuelson’s economics.

Ultimately, though, what the man said was drivel. It corresponded to nothing in real life, so it was forgotten. Then came the collapse of the Bretton Woods system in the early 70s and the rise of speculative capital which gave a new lease on life to the application of mathematics in finance.

Speculative capital is capital engaged in arbitrage: simultaneously buying and selling two equivalent positions. That amounts to – and requires – the instantaneous buying and selling of the positions. From Vol. 1:
After any purchase, the speculator faces the risk that what he has just bought will fall in price. That can only happen with the passage of time. It is through time that the price of widgets drops, and it is through time that the speculator fails to find a buyer. Time is the medium through which the risk–and everything else–materializes. To the uncritical, yet practical, mind of the speculator, time appears as the source of the risk. He concludes that if the time between his purchase and sale is shortened, the risks of the transaction must proportionally diminish. In the extreme case, when the time between the two is zero, the risk would completely disappear. In that case, he could earn a risk-free profit. That is because no purchase is made unless a sale is already in hand. When the time between purchase and sale is reduced to zero, the two acts become simultaneous. A simultaneous “buy-low, sell-high” results in a risk free profit. That is arbitrage. The speculator has found the Holy Grail of finance: making money without risking money.
Speculative capital rapidly expanded to dominate the trading pattern of financial markets. The expansion required people skilled in mathematics to detect the arbitrage opportunities. These people were found in the math and physics departments. The newcomers applied themselves and their skills to their new field and soon produced a voluminous body of work in finance that seemed coherent, even revolutionary and groundbreaking. The Black-Scholes option valuation formula is perhaps the most outstanding example of their accomplishments.

That is how continuous-time finance came to be, with the practitioners of the discipline becoming known as “quants” or “rocket scientists” by virtue of their mastery of mathematics.

But they knew nothing of economics or finance. In Bernestein’s early 90s bestseller, Capital Ideas, tellingly sub-titled The Improbable Origins of Modern Wall Street, there is a telling passage about them:
The gap in understanding between insiders and outsiders in Wall Street has developed because today’s financial markets are the result of a recent but obscure revolution that took root in the groves of ivy rather than in the canyons of lower Manhattan. Its heroes were a tiny contingent of scholars, most at the very beginning of their careers, who had no direct interest in the stock market and whose analysis of the economics of finance began at high levels of abstraction.
“No direct interest in the stock market” means no background in economics and finance. And the “high levels of abstraction” that Bernstein observed likewise had to do with forcing mathematics on finance without regard to, or awareness of, its social aspects. We saw in Vol. 3, for example, how Black, Scholes and Merton priced the options and yet got the options fundamentally wrong.

The consequence of this ignorance, as always, was in prediction of the future. If you know the relation between mass, force and acceleration, you could predict with precision the behavior of a satellite millions of miles from the earth. You could surmise the existence of a planet even if you could not see it.

Economic relations are never that exact, but fundamentals still apply. If you know that profit rate tends to fall, you would not be surprised by the persistent unemployment in the West or the events taking place in Europe; you would not ask, How is it that as the people’s health improve, they have to work longer and harder for less wages and a smaller safety net?

Or, if you know that arbitrage is by definition self-destructive, you would expect a crash in financial markets – if not sooner, then later.

But the pioneers of modern finance knew nothing of these principles. They noted the increase in trading and observed that it led to lowering spreads. But they interpreted it as the march of capital markets towards “efficiency”, which to them meant low trading costs. And since the markets were only rising, it stood to reason that everyone would soon be trading.

The new world of CTF thus envisioned was a bona fide Norman Rockwell tableau in which everyone constantly and incessantly traded: businessmen in New York during their commute, Valley girls in LA on their way to parties, salt-of-the-earth farmers in the Midwest, the rednecks in the South, retirees in Florida, blacks in Watts and smartly dressed preppies in Greenwich – they all traded all the time. Jews, too. Yes, most definitely Jews, too.

The real life turn of events proved a tad more Gothic.