Locklin on science

What is a bubble? (econophysics, part 2)

Posted in econophysics by Scott Locklin on August 14, 2011

“In science there is only physics; all the rest is stamp collecting.“-Lord Kelvin

In long ago (it took me this long to figure out how to make LaTeX in wordpress) part 1, I discussed the random field Ising model for opinion diffusion. What motivates this model? Well, we observe in nature that people’s opinions are influenced by the opinions of people around them. The random field Ising model is one very sensible way of modeling this. It’s particularly useful in systems where the statistical or geometric properties of the social network are well understood.

The nice thing about physics-like approaches is you don’t always need to know details, like what the geometric properties of the social network are. You can figure out a lot by just thinkin’. Didier Sornette’s ideas are like this. Effectively, in bubbles, people stop taking positions based on underlying fundamentals information, and start taking positions based on price. In other words, the entire market becomes trend following. If you take a position based on price, and everyone else starts to do the same thing, the prices will rise faster than exponentially via feedback. So, if you take the log of the price series, and notice stuff with super linear growth: those are bubbles.

One of the things my pals the economists don’t realize about markets is who the market consists of. There are a lot of ways to think about markets that flatter our egos, but a very useful way of thinking about markets is a group of people with edge versus a bunch of people who don’t know what they’re doing -who I’ll call “noise traders” because that’s what Fisher Black called them. This isn’t very charitable, as a lot of the “people who don’t know what they’re doing” have other priorities, like hedging or forming an index, or just buying and selling when some dope tells him to. But for the purposes of argument, since they’re not profit takers, they’re trading on what amounts to noise. When you get informed versus noise traders, you get a reversion to the fair value of the instrument fairly rapidly. The profit takers will trade with the noise traders who give them the price they want, and the price will move towards a place where profit takers can no longer make a profit.

Now, I’m asking you to take my word for these facts, but they’re stuff you can derive using freshman calculus. Some more advanced trickery (renormalization group theory -not as scary as it sounds: mostly, this is a trick for looking at symmetries in systems, a handy trick, used everywhere in physics) gets you the loq periodic power law (LPPL). Using the LPPL, we can potentially forecast things like when the bubble pops. How do you forecast something like this? Well, you use the following price evolution equation to find the crash point t_c:

\log(p(t)) = A + B(t_c - t)^\beta + C(t_c - t)^\beta \cos( \omega \log(t_c-t)+\phi)

“With three parameters, I can fit an elephant.” -Lord Kelvin

The first thing you should notice is all the parameters there are to fit here. With three parameters, I can fit an elephant, said Lord Kelvin; he wasn’t kidding. Wolfram has a useful demo. Given the hairiness of this function and the lack of data, this should give you pause. Seven parameters! Then … things actually get worse. We know that price time evolution follows an Ornstein–Uhlenbeck process which means our equation isn’t really an equation: there is stochastic calculus built into it. One can ignore this and blindly fit anyway, but this isn’t how the pros do it: Sornette and company account for it in various ways, using moving windows, bits of Black Scholes, multiple fits to isolate the range of the “less hairy” parameters (aka, A, B, C are relatively easy to fit assuming you get everything else right -the interesting bits are \omega, \beta, t_c ), multiple constrained fits on parameters (aka, constrain potential values to make sure \omega and t_c isn’t being fit to noise and A doesn’t call the top of the market at some absurdly high value), Lomb periodograms, various GARCHy and Black Scholesey time series models with the log periodic piece baked in. Oh, and they use optimizer/fitters from Annealing to genetic algorithms and various other optimization tricks of the trade. It’s a tough function.

Interesting things to make note of: A is important, as it calls the top. t_c obviously is important as it calls the date of the crash. Most important, though, is \beta and \omega , without which, you can’t identify whether or not you’re in a bubble regime. No power law growth with oscillations: no bubble. The meaning of these parameters is also interesting. It’s obvious what they mean from a fitting standpoint, but some of those numbers come from the actual physics of markets. For example, \omega contains microstructure information about the “herdiness” of the market. \beta actually comes from the structure of human markets, and seems to remain similar across many examples.

Does all this stuff work? I dunno. Certainly, running the rude implementation of it I found on Rnabble looks … evocative at least.

Might be interesting to build an oscillator which only fits the run-ups (though of course, the ones here are fit in sample, and so they look better than they probably are), and gets you out of the trade as they get closer together. Better yet: use lazy learning -maybe something like Dynamic Time Warping on time series which have been post-facto identified as bubble-like, with LPPL oscillations in the run-up. Or, generate LPPL time series using the model and DTW your way onto new ones to forecast burst bubbles. To my mind (and considering some interesting unexploited time scales), the log periodicity itself is interesting, and probably represents a common “orbit” in market dynamics which does not necessarily end in crashes, and which could be captured via some variants on the usual techniques.

Or maybe it’s all horse shit. Personally, I think the most productive looking route for research into this subject is not going to fit parametric models like the above using ML and what not: the basic insight of Sornette and company is to give you a vague idea of what groups of noise traders and informed traders will do to a price series in the presence of different populations of each. Indeed, in Sornette’s early research (which he seems to have made some money speculating on), most of those parameters were not present. Paring the equation down and trying to get the \omega and \beta right might pay a few dividends; as I said above -simple oscillator might work better.

One of the problems with this model as a model is that these populations of market participants are themselves a dynamic quantity. Think about what happens in a market collapse in a healthy market: informed traders move in to buy when the noise traders freak out and sell off. Those numbers slosh around a lot. The really big collapses happen when, whether because of tight credit or severe uncertainty, informed traders decide to stay home. But then, sometimes they don’t stay home. This isn’t really “modelable” in any way I can think of. This is something that requires the big picture judgement of a Monroe Trout or Paul Tudor Jones.

Generally though, such fitted models are not useful to speculators, as getting the fit right (in any model) is an art form, and when the parameters change over time, it becomes rather hopeless. That’s one of the reasons why people who trade end up using moving averages instead of GARCH. We know that volatility can be modeled with GARCH … but can it be forecasted by models fit to GARCH? Well, sometimes, but not really. However, ideas like GARCH are crucial to our understanding of how markets function. I’d say at some point, log periodic power laws will also be considered similarly useful. But right now, we’re still figuring it out.

http://quantivity.wordpress.com/2011/02/08/curiosity-of-lppl/

Everything you always wanted to know about Log Periodic Power Laws but were afriad to ask. -my favorite review article on the subject thus far.

Advertisements

11 Responses

Subscribe to comments with RSS.

  1. Aaron Smyth said, on August 15, 2011 at 6:34 am

    You dont happen to know if Sornette has called a new bubble in gold by any chance? Be interesting to hear you’re take on it, using the filters you have worked out so far…

    • Scott Locklin said, on August 15, 2011 at 4:05 pm

      Funny, I ran the gizmo I have on gold. Looked like a lousy fit when looking at prices from 2004 on. Using only the last year’s worth of data, it calls a peak around 50 trading days from now at 2200. I don’t believe it; it also looks like a lousy fit. Mind you, I’m using GLD rather than actual spot prices: this almost certainly biases the fit in weird ways.

      My gizmo is very crude; it’s just a GA fit on some of the interesting parameters. Supposedly Sornette called one of the downturns in gold in 2010. BTW, Sornette’s predictions are encrypted, so you only know what he’s calling after it’s happened: don’t want to effect the experiment!

      I haven’t done the bits I was talking about above (filters + lazy learning). I expect I’ll get to it one day.

      • Aaron Smyth said, on August 16, 2011 at 11:53 am

        Yeah he called, well lets say a top, in 2009. I was looking through one of his papers the other night and noticed he was using search trends from Google as one of his inputs. It turns out that presently, the searches for “buy gold” are the highest they have ever been by a margin, the highest from 2004. Who knows, maybe it will turn out to be delfation after all…

        http://www.google.com/insights/search/#cat=0-7&q=%22buy%20gold%22&date=1%2F2004%2092m&cmpt=q

      • Aaron Smyth said, on September 25, 2011 at 6:39 pm

        You were close with the time scale, (too close!!) i thought it would have happened a lot sooner to be fair; the monthly gold chart was just laughable. I tried warning a few goldbugs… yeah, that was a mistake. One reply i got was “the gold market laughs at my parabolas” – if only i could bottle schadenfreude the world would be a better place.

  2. Martin said, on August 15, 2011 at 9:01 am

    Somewhat off-topic:

    “Effectively, in bubbles, people stop taking positions based on underlying fundamentals information, and start taking positions based on price. In other words, the entire market becomes trend following. If you take a position based on price, and everyone else starts to do the same thing, the prices will rise faster than exponentially via feedback.”

    Marx argued and the Post-Keynesians followed him in this, I believe, that there are two circuits. One circuit is the Good – Money – Good-circuit, this pretty much describes what goes on in the real economy, money as a medium of exchange, facilitating double coincidence of wants etc. The second circuit, is the Money – Good – Money-circuit. Here, money is sought for its own end and the demand for a good consists primarily in how much money it can be exchanged for.

    Of course in the real world, both circuits occur simultaneously with respect to all goods, but the second circuit is a pretty good description of the market for financial assets. Preventing bubbles and recognizing bubbles, in this context is recognizing when this second circuit becomes inconsistent with the first and starts to dominate the first.

    I don’t think you can fit this with the method described and I have difficulty seeing how this moves our understanding beyond this simple idea.

  3. wburzyns said, on August 15, 2011 at 10:24 am

    “With three parameters, I can fit an elephant.” -Lord Kelvin

    Von Neumann needed four parameters to do that: “With four parameters I can fit an elephant, and with five I can make him wiggle his trunk.” (from Wikiquote: Attributed to von Neumann by Enrico Fermi, as quoted by Freeman Dyson in “A meeting with Enrico Fermi” in Nature 427 (22 January 2004) p. 297)

  4. Linkpost, 8/21/11 « Organicist said, on August 21, 2011 at 8:32 pm

    […] Scott Locklin – What is a Bubble? (Econophysics, Part 2) […]

  5. JJ said, on August 22, 2011 at 3:48 pm

    If you don’t know, you’re taki-taki profile page seems to have disappeared. I can’t find the classic Locklin articles! Cheers.

    • Scott Locklin said, on August 22, 2011 at 5:38 pm

      Thanks; they revamped their website … quite a while ago. I fixed the link in the sidebar.

    • TT said, on August 24, 2011 at 1:14 am

      Stethers?

  6. […] What is a bubble? (econophysics, part 2) (scottlocklin.wordpress.com) […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: