Locklin on science

Music, molecules and misanthropy (econophysics part 1)

Posted in econophysics, philosophy by Scott Locklin on February 2, 2010

I make no secret of my disdain for “social scientists.” Most social science is just some guy telling you a story, and pretending to be a big shot. It isn’t much different to me than some ancient bearded fellow at the campfire explaining lightning as sparks from Thor’s hammer. Economists shouldn’t be so bad. They have actual numeric data, data on the economy itself, financial data and individual data. They have grand theories about how the world works. They should be able to do something. But their ideas usually have the substance of political ideology. If they’re feeling particularly ambitious, they’ll wire their idiot ideology up to some weaksauce math like Granger causality.

Physicists are people interested in modeling things from first principles. They occasionally try to come up with some more interesting models than professional economists have come up with thus far. For example, consider a bunch of people in an auditorium listening to some bad opera music. According to something like standard utility theory, each person in the audience will clap based on how much they individually enjoyed the opera. The collective clapping function is the linear sum of the individual clapping functions. If you believe standard utility theory, every individual in the crowd has N claps worth of utility in them, and will give those N claps according to when they precious well intend to clap and stop. Same thing with standing ovations.

Ever been in one of these audiences? If you have, and you paid attention, you’d notice that people mostly clap and stop clapping in total synchrony with people around them. Same thing with standing. Occasionally some brave person will stand prematurely, and the social forces in the theater will force him back down again. Then the damn fool will stand up again when the rest of the crowd tells him it is OK. Same thing with clapping, or stopping clapping. Some people will stop clapping before those around them do. They sit uncomfortably for a while, then they start clapping again, until everyone else around them decides to stop. You can also observe patterns and defects in the behavior of people in this social lattice: there may be a group on the right, or towards the front who are more enthusiastic or subject to peer pressure.

“people, or spin-1/2 particles? hard to say from far enough away; everything looks small”

As it turns out, this behavior can be modeled pretty well using the ferromagnetic random field Ising model; a model which derives magnetic properties based on how microscopic spins in a substance work and interact with each other. In a ferromagnet, such spins have what amounts to peer pressure from exchange forces arising from the Pauli exclusion principle. A random field is added to each spin location to give a “tendency” to an individual clapper (or a spin). An overall driver field is added to provide a stimulus (this field can be 0, like when there is no external magnetic field, or they turn out the lights). And you can vary the strength of the “peer pressure” forces between spins or clappers. You can observe all the phenomena of ferromagnetism: domain walls, echos and hysteresis in the social lattice of the clapping opera fans. One of the interesting results of all this is that, in systems with a lot of peer pressure, you can get very abrupt drop off of clapping without a sharp change in the driver field (aka, how much the lights come on after the Opera). In fact, this is sometimes observed, generally in societies with strong peer pressures. Even when it is not abrupt, the drop off follows a pretty distinct scaling law. The details of such models are mostly in the network type, which, in the case of concert halls, is a square lattice, like the one shown below.

“+/- denotes opinion, color is tendency, and the big arrow an external driver field”

I’m not the only person to think of using Ising models to model crowd behavior; there is a small industry of econo-physicists who use such models. I originally read about it years ago in a book called Synergetics by Hermann Haken (a book which has been formative in my way of looking at the world). Not only are these kinds of models pretty good at reproducing phenomenology, as J.P. Bouchaud and friends proved, they’re even pretty good at reproducing actual numbers in more or less controlled experiments. They’re good at other things too; for example, such networks can reduce to Hopfield nets in some approximations. Which rather indicates they’re also useful for modeling how individuals make certain kinds of decisions as well. In other words; not only do you act like you are one of these spin-1/2 particles, in many situations, you act like your brain is made up of a scale free network of them. The same models can be used to model advertising or political campaigns, rumors, mass hysterias and fashion trends. And the numbers match up pretty well. I’ve seen the model applied to all kinds of things. I even know about a way of mapping it onto the Bass diffusion model.


“The end of a clapping session. Note rapid fall off; the black curve dies off faster than the echo time of the room it happened in, meaning social pressure to stop clapping travels faster than the speed of sound -I stole the graph from a paper by Q. Michard and J.P. Bouchaud” which is well worth your attention if you like this brief treatment

Consider all this the next time you are in a concert hall clapping for some trained baboon who thinks he is Ludwig von Beethoven, and the dimwits next to you are going into transports over what a wonderful performance it was (of course it was wonderful; they paid $300 for the seats!). Do you find yourself clapping because you think the monkey deserves it? Or do you find yourself clapping because you’re a molecule in a lattice of humanity? What does that say about you in the rest of your day to day life? How much of what you do and think you are is just because of social pressure? How many celebrated trends and movements, no more enduring and dignified than a spin-1/2 particle helplessly flopping around in response to other mindless spin-1/2 particles? Let’s face it; if you know someone else who has similar opinions to yours, if you run in a crowd, if there are others who are like you: this is probably why. You have to be pretty misanthropic to grasp this on an emotional level, but it’s something philosophers have been saying for centuries, and now a days you can actually write code which models it.

The implications for trading trends are obvious. Since people in “peer pressure” situations can  change their minds abruptly, one needs to be ready for the flip over, or at least aware of the nonlinear conditions which can lead to an abrupt change in people’s positions. Are their hints as to when people are going to stop clapping? Well, let’s talk about that in part two. Professor Didier Sornette seems to think so. Sornette worked with the Random Field Ising model, but his fame has come from a sort of scaling law he has come up with dealing with trend followers and opinion bubbles.

Advertisements

32 Responses

Subscribe to comments with RSS.

  1. Dan said, on February 2, 2010 at 7:45 am

    Wow, this blows my mind. It can be strangely rewarding looking at your own behavior from these angles.

    • Scott Locklin said, on February 2, 2010 at 9:07 am

      Humans are social animals, so I suppose it’s nothing to be ashamed of. But it can also be liberating to not be one of those little dots.

  2. Lloyd G. said, on February 2, 2010 at 10:45 am

    It’s interesting how herd behavior, or intellectual cowardice (or whatever you want to call it) can visit the scientific community, when scientific thought bumps up against political correctness — witness James Watson’s fate. The guy discovered DNA, for fcuk’s sake, but when he uttered a word of social heresy he was treated like some maniac crank. And he found that he had very few real friends in academia.

    In popular lore, scientists are heroic figures who tell the truth, regardless of how doing so might hurt them personally. Galileo, alone, standing before the Church, is one of science’s icons. Nowadays most PhD scientists are public employees, working for universities. As such they tend to conform to the ethos/group think of modern universities.

    • Scott Locklin said, on February 2, 2010 at 11:16 am

      I won’t argue with that at all. This blog, for example, would be utterly impossible if I were trying to get tenure somewhere. In fact, it would probably be impossible if I were working for any large organization … and I don’t even write about controversial things. Modern American Cubical Man in all his many incarnations has less freedom of speech than a Soviet apparatchik.

      • William O. B'Livion said, on February 2, 2010 at 10:36 pm

        But every day he makes the choice to show up to that Cubical.

        You choose to blog under your own name, that is not necessary.

        • Scott Locklin said, on February 2, 2010 at 10:56 pm

          While this is beside the point, most bloggers lose their anonymity eventually -how many Lisp slinging former physicist quants in Berkeley could there be? As far as I know, there are a grand total of about a half dozen Lisp slinging quants of any description in the entire world. That kind of narrows it down a little.

          Be that as it may, once upon a time, people could say what they wanted without fear of being crucified by politically correct ding dongs policing your speech. If the president’s chief of staff can’t call a bunch of morons “retarded,” what hope is there for cubical man even making an off color joke? If the man who discovered DNA’s physical structure can’t opine on subjects dealing with, well, human DNA, what hope is there for cube-farm scientist having an original thought he can convey to the world?

          I like how Thomas Fleming put it: “… a world made safe for democracy is a world in which no one dares to raise his voice for fear that mommy will put you away some place where you can be reeducated.”

  3. maggette said, on February 2, 2010 at 11:33 am

    Herdin at its best…or worst (matters of taste I think):)

    • jay said, on February 2, 2010 at 7:06 pm

      Haha, I was totally going to post that link, too.

      You’re all individuals!

      “We’re all individuals!”

  4. better said, on February 2, 2010 at 6:37 pm

    I like the social scientist Noam Chomsky, he knows everything and he needs no proof to know he’s right.

    • Scott Locklin said, on February 2, 2010 at 9:37 pm

      Well, to his credit, his work was pretty good when he was helping the CIA and Air Force slaughter innocent “Dances with Na’vi” types. I remember being surprised to read a reference to some of this early work in a book on symbolic dynamics.
      I know from experience playing moral scold is easier than doing math, and you get more credit for it, even when you’re being retarded.

  5. regionswork said, on February 6, 2010 at 4:06 am

    FYI – The Quants: It Pays To Know Your Wall Street Math

    Heard on Fresh Air from WHYY

    February 1, 2010 – TERRY GROSS, host:

    This is FRESH AIR. I’m Terry Gross.

    The guy who basically invented card counting to beat the house in blackjack, Ed Thorp, took his math skills to Wall Street in the 1960s, started a hedge fund, and paved the way for a new breed of mathematical traders who became known as quants.

    The quants were the math whizzes who, with the help of computers, came up with the complex formulas for hedge fund investments and for designing complex investment vehicles like mortgage derivatives and credit-default swaps, things that were behind the market collapse of 2008.

    My guest, Ed Thorp, is one of the people profiled in the new book “The Quants: How a New Breed of Math Whizzes Conquered Wall Street and Nearly Destroyed It.” Later, we’ll meet the author, Scott Patterson. He’s a staff reporter at the Wall Street Journal.

    Scott Patterson, Ed Thorp, welcome to FRESH AIR. Ed, let’s start with your story, since you’re considered the father of the quants, like, one of the first quants; and with you, it all started with mathematical formulas you came up with for counting cards in blackjack in casinos.

    link to audio and/or transcript http://www.npr.org/templates/story/story.php?storyId=123209339&sc=emaf

    • Scott Locklin said, on February 6, 2010 at 4:18 am

      I’ve heard great things about this interview, and will get around to it eventually. Every single thing I’ve heard from Ed Thorp has been solid gold.

  6. Bob / Pittsburgh said, on February 8, 2010 at 2:14 am

    Going back to the beginning of your post: Joseph Wechsburg wrote very entertainingly of the claque in the Vienna Opera House; it was an organized group whose function was to appropriately initiate and modulate applause. (Sometimes that’s what they did, sometimes not). http://www.josephwechsberg.com/html/wechsberg-new_yorker-articles-1940s.html#LifeClaque

    • jay said, on February 8, 2010 at 2:32 am

      Yeah,

      They used to be called claquers, now I think they’re called CNBC.

  7. sharpend said, on February 8, 2010 at 4:30 am

    I totally see Sasquatch Dude, Feynman and Durden as kindred characters. I don’t have any time for Macro Economists for the reasons you say. The internet is littered with the heavies of the field making shockingly wrong statements. They may have data but they can’t even agree on data. But I don’t think the profession is terminal. But it is getting harder for me to identify or categorize where the light will come from.

    Econophysics obviously, but much of what gets me excited these days comes from operations management. Maybe it is all the same.

    In my mind economists would serve the world better by identifying real problems in the free market system and remove those blockages rather than prescribing sloppy remedies after a disaster has happened.

    Why would this blog be more of an issue for tenure than a corp? Is it your radical leftist leanings? Or just for not being a cubical man.

    • Scott Locklin said, on February 8, 2010 at 4:46 am

      Ops research has come up with some cool stuff, but having worked in the field a bit … well, we’re a long, long way from central planning. I don’t know if econophysics will ever help us manage stuff better, but at least it gives a framework for understanding things.

      I think me saying mean things about Taleb and Chuck Schumer would cause me problems in almost any large organization, even if they are completely true. Everyone loves a smart ass until it comes time to employ one. I’ve never seen myself as real political, or at least I don’t get excited by the same things which motivate others along political lines, which probably makes me some kind of wingnut.

      • Ilya said, on February 19, 2010 at 3:07 am

        What about you, Doc Locklin? Do you employ smart asses?

  8. Chris said, on February 18, 2010 at 6:34 am

    Okay… interesting, but too cynical. When I’m at the opera, I always clap and try to gauge when to start and stop by the rest of the audience. However, this doesn’t imply that my assessment of the performance is reflected in my clapping in my own mind. I am entirely aware of being subsumed into the crowd and the moment, but I try not to stand out. It is distracting, rude, and egotistic to draw attention to oneself by sitting on one’s hands or continuing the applause an uncomfortably long time. I don’t equate politeness with an inability in aesthetic judgement. I’m shooting for unadjusted, not maladjusted.

    • Scott Locklin said, on February 18, 2010 at 7:26 am

      “CYNIC, n. A blackguard whose faulty vision sees things as they are, not as they ought to be. Hence the custom among the Scythians of plucking out a cynic’s eyes to improve his vision.” -Ambrose Bierce

      Whether you’re aware of it or not is kind of irrelevant. You’re still a node in the hive mind. Personally, I rarely clap at all in these things; I frown and run for the door. That kind of makes me a dead node in the network; still well modeled by the RFIM. Kind of a jerk, too, but, you know: there’s value in counter trending.

      There’s also a method to my cynical madness, to be revealed in part 2.

  9. Matt said, on February 19, 2010 at 12:01 am

    The thing with economies is that, in addition to being extremely complex, the ‘rules’ often change. We’re in an economic situation now that’s never existed before, I think it’s a bit unfair to get mad at economists for making seemingly little progress. The ‘laws’ of physics haven’t changed for a very long time; they’ve been the same for as long as people have been trying to discover them, but the same isn’t true of economics.

    You could say that the way people make decisions hasn’t changed much and I think we have made some progress in understanding these processes. But as societies have changed and evolved, the way these individual processes combine and interact to form markets has also changed considerably.

  10. […] 24, 2010 Thanks to Dr. Scott Locklin’s blog post from some time ago, which you can read here, I was able to find a link with some reporter interviewing Ed Thorp, who’s a prominent […]

  11. H Chen said, on March 26, 2010 at 4:10 am

    The situation/ environment prescribes what model should be used. I doubt any self respecting economist would endeavor to prove that the standard utility theory dictates how people behave in the auditorium of an opera. However if you can think of better models of monopolistic behavior, production and pricing of consumer goods, or strategic behavior than what is found in economic literature, then you might have a nobel prize on your hands.

    • Scott Locklin said, on March 26, 2010 at 6:11 am

      I think a lot of self regarding economists do use utility theory on the auditorium of an opera problem, which is why they don’t understand bubbles.

      As for the other stuff, that’s up to the econophysicists. I’m not interested in problems like that. I like trading problems. The payoff is better.

  12. Aaron said, on April 9, 2010 at 8:42 pm

    Hints to when people might stop clapping?

    Have a look at a stochastic oscillator mate, or what about an RSI or implied volatility? If enough people are looking at it, and beleive it to be true etc… technical analysis; too simple to be true?

    • Scott Locklin said, on April 13, 2010 at 10:28 am

      Classical TA is just crappy filters. I prefer good filters. Awesome filters is kind of my day job.

  13. […] way back when I blathered about the random field Ising model as a model for collective human behavior about a year ago? Well, Toffoli has forged ahead and […]

  14. […] 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 […]

  15. human mathematics said, on September 20, 2011 at 6:26 pm

    Not sure where you get that characterisation of utility theory, but Ising spin is hardly first principles. I would call that “some weaksauce math”. Kind of like the paper that tries to model financial markets with percolation theory. (In that case econ. has the stronger claim to first principles because they at least model transactions, not just prices.)

    The weakness in utility theory is that utility is an index function for “whatever happened”, and then economists derive normative conclusions from it. Well, give neuroeconomics another 10-20 years and maybe we’ll see a change. Bentham even wished for an fMRI.

    • human mathematics said, on September 24, 2011 at 8:26 pm

      Just to be clear, I’m not totally against the Ising spin model for social phenomena. I would use it for the adoption of oral sex as a good first idea. But I don’t think it holds any special intelligence. It’s not like we have achieved high-decimal accuracy with it as in modelling magnetism.

  16. BTC bubbles | Locklin on science said, on April 17, 2013 at 3:20 am

    […] you don’t know about LPPL models, click on these two helpful links. The basic idea is, if the price is formed by market participants looking at what other market […]


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: