Tampilkan postingan dengan label instability. Tampilkan semua postingan
Tampilkan postingan dengan label instability. Tampilkan semua postingan

Senin, 18 Februari 2013

A real model of Minsky

Noah Smith has a wonderfully informative post on the business cycle in economics. He's looking at the question of whether standard macroeconomic theories view the episodic ups and downs of the economy as the consequence of a real cycle, something arising from positive feed backs that drive persisting oscillations all on their own, or if they instead view these fluctuations as the consequence of external shocks to the system. As he notes, the tendency in macroeconomics has very much been the latter:
When things like this [cycles] happen in nature - like the Earth going around the Sun, or a ball bouncing on a spring, or water undulating up and down - it comes from some sort of restorative force. With a restorative force, being up high is what makes you more likely to come back down, and being low is what makes you more likely to go back up. Just imagine a ball on a spring; when the spring is really stretched out, all the force is pulling the ball in the direction opposite to the stretch. This causes cycles.

It's natural to think of business cycles this way. We see a recession come on the heels of a boom - like the 2008 crash after the 2006-7 boom, or the 2001 crash after the late-90s boom - and we can easily conclude that booms cause busts.

So you might be surprised to learn that very, very few macroeconomists think this! And very, very few macroeconomic models actually have this property.

In modern macro models, business "cycles" are nothing like waves. A boom does not make a bust more likely, nor vice versa. Modern macro models assume that what looks like a "cycle" is actually something called a "trend-stationary stochastic process" (like an AR(1)). This is a system where random disturbances ("shocks") are temporary, because they decay over time. After a shock, the system reverts to the mean (i.e., to the "trend"). This is very different from harmonic motion - a boom need not be followed by a bust - but it can end up looking like waves when you graph it...
I think this is interesting and deserves some further discussion. Take an ordinary pendulum. Give such a system a kick and it will swing for a time but eventually the motion will damp away. For a while, high now does portend low in the near future, and vice versa. But this pendulum won't start start swinging this way on its own, nor will it persist in swinging over long periods of time unless repeatedly kicked by some external force.

This is in fact a system of just the kind Noah is describing. Such a pendulum (taken in the linear regime) is akin to the AR(1) autoregressive process entering into macroeconomic models and it acts essentially as a filter on the source of shocks. The response of the system to a stream of random shocks can have a harmonic component, which can make the output look roughly like cycles as Noah mentioned. For an analogy, think of a big brass bell. This is a pendulum in the abstract, as it has internal vibratory modes that, once excited, damp way over time. Hang this bell in a storm and, as it receives a barrage of shocks, you'll hear a ringing that tells you more about the bell than it does the storm.

Still, to get really interesting cycles you need to go beyond the ordinary pendulum. You need a system capable of creating oscillatory behavior all on its own. In dynamical systems theory, this means a system with a limit cycle in its dynamics, which settles down in the absence of persisting perturbation to a cyclic behavior rather than to a fixed point. The existence of such a limit cycle generally implies that the system will have an unstable fixed point -- a state that seems superficially like an equilibrium, but which in fact will always dissolve away into cyclic behavior over time. Mathematically, this is the kind of situation one ought to think about when considering the possibility that natural instabilities drive oscillations in economics. Perhaps the equilibrium of the market is simply unstable, and the highs and lows of the business cycle reflect some natural limit cycle?

Noah mentions the work of Steve Keen, who has developed models along such lines. As far as I understand, these are generally low-dimensional models with limit cycle behavior and I expect they may be very instructive. But Noah also makes a good point that the data on the business cycle really doesn't show a clear harmonic signal at any one specific frequency. The real world is messier. An alternative to low dimensional models written in terms of aggregate economic variables is to build agent based models (of much higher dimension) to explore how natural human behavior such as trend following might lead to instabilities at least qualitatively like those we see.

For some recent work along these lines, take a look at this paper by Blake LeBaron which attempts to flesh out Hyman Minsky's well known story of inherent market instability in an agent based model. Here's the basic idea, as LeBaron describes it:
Minksy conjectures that financial markets begin to build up bubbles as investors become increasingly overconfident about markets. They begin to take more aggressive positions, and can often start to increase their leverage as financial prices rise. Prices eventually reach levels which cannot be sustained either by correct, or any reasonable forecast of future income streams on assets. Markets reach a point of instability, and the over extended investors must now begin to sell, and are forced to quickly deleverage in a fire sale like situation. As prices fall market volatility increases, and investors further reduce risky positions. The story that Minsky tells seems compelling, but we have no agreed on approach for how to model this, or whether all the pieces of the story will actually fit together. The model presented in this paper tries to bridge this gap. 
The model is in crude terms like many I've described earlier on this blog. The agents are adaptive and try to learn the most profitable ways to behave. They are also heterogeneous in their behavior -- some rely more on perceived fundamentals to make their investment decisions, while others follow trends. The agents respond to what has recently happened in the market, and then the market reality emerges out of their collective behavior. That reality, in some of the runs LeBaron explores, shows natural, irregular cycles of bubbles and subsequent crashes of the sort Minsky envisioned. The figure below, for example, shows data for the stock price, weekly returns and trading volume as they fluctuate over a 10 year period of the model:


Now, it is not surprising at all that one can make a computational model to generate dynamics of this kind. But if you read the paper, LeBaron has tried hard to choose the various parameters to fit realistically with what is known about human learning dynamics and the behavior of different kinds of market players. The model also does a good job in reproducing many of the key statistical features of financial time series including long range fundamental deviations, volatility persistence, and fat tailed return distributions. So it generates Minsky-like fluctuations in what is arguably a plausible setting (although I'm sure experts will quibble with some details).

To my mind, one particularly interesting point to emerge from this model is the limited ability of fundamentalist investors to control the unstable behavior of speculators. One nice feature of agent based models is that it's possible to look inside and examine all manner of details. For example, during these bubble phases, which kind of investor controls most of the wealth? As LeBaron notes,
The large amount of wealth in the adaptive strategy relative to the fundamental is important. The fundamental traders will be a stabilizing force in a falling market. If there is not enough wealth in that strategy, then it will be unable to hold back sharp market declines. This is similar to a limits to arbitrage argument. In this market without borrowing the fundamental strategy will not have sufficient wealth to hold back a wave of self-reinforcing selling coming from the adaptive strategies.   
Another important point, which LeBaron mentions in the paragraph above, is that there's no leverage in this model. People can't borrow to amplify investments they feel especially confident of. Leverage of course plays a central role in the instability mechanism described by Minsky, but it doesn't seem to be absolutely necessary to get this kind of instability. It can come solely from the interaction of different agents following distinct strategies.

I certainly don't mean to imply that these kinds of agent based models are superior to the low-dimensional modelling of Steve Keen and others. I think these are both useful approaches, and they ought to be complementary. Here's LeBaron's summing up at the end of the paper:
The dynamics are dominated by somewhat irregular swings around fundamentals, that show up as long persistent changes in the price/dividend ratio. Prices tend to rise slowly, and then crash fast and dramatically with high volatility and high trading volume. During the slow steady price rise, agents using similar volatility forecast models begin to lower their assessment of market risk. This drives them to be more aggressive in the market, and sets up a crash. All of this is reminiscent of the Minksy market instability dynamic, and other more modern approaches to financial instability.

Instability in this market is driven by agents steadily moving to more extreme portfolio positions. Much, but not all, of this movement is driven by risk assessments made by the traders. Many of them continue to use models with relatively short horizons for judging market volatility. These beliefs appear to be evolutionarily stable in the market. When short term volatility falls they extend their positions into the risky asset, and this eventually destabilizes the market. Portfolio composition varying from all cash to all equity yields very different dynamics in terms of forced sales in a falling market. As one moves more into cash, a market fall generates natural rebalancing and stabilizing purchases of the risky asset in a falling market. This disappears as agents move more of their wealth into the risky asset. It would reverse if they began to leverage this position with borrowed money. Here, a market fall will generate the typical destabilizing fire sale behavior shown in many models, and part of the classic Minsky story. Leverage can be added to this market in the future, but for now it is important that leverage per se is not necessary for market instability, and it is part of a continuum of destabilizing dynamics.

Senin, 14 Januari 2013

Steve Keen on "bad weathermen"

I've made quite a lot of the analogy between the dynamics of an economy or financial market and the weather. It's one of the basic themes of this blog, and the focus of my forthcoming book FORECAST. I don't pretend to be the first one to think of this at all. I know that the head of the Bank of England Mervyn King has talked about this analogy in the past, as have many others.

But the idea now seems to be gathering more popularity. Steve Keen even writes here specifically about the task of economic forecasting, and the entirely different approaches used on weather science, where forecasting is now quite successful, and in economics, where it is not:
Conventional economic modelling tools can extrapolate forward existing trends fairly well – if those trends continue. But they are as hopeless at forecasting a changing economic world as weather forecasts would be, if weather forecasters assumed that, because yesterday’s temperature was 29 degrees Celsius and today’s was 30, tomorrow’s will be 31 – and in a year it will be 395 degrees.

Of course, weather forecasters don’t do that. When the Bureau of Meteorology forecasts that the maximum temperature in Sydney on January 16 to January 19 will be respectively 29, 30, 35 and 25 degrees, it is reporting the results of a family of computer models that generate a forecast of future weather patterns that is, by and large, accurate over the time horizon the models attempt to predict – which is about a week.
Weather forecasts have also improved dramatically over the last 40 years – so much so that even an enormous event like Hurricane Sandy was predicted accurately almost a week in advance, which gave people plenty of time to prepare for the devastation when it arrived:

Almost five days prior to landfall, the National Hurricane Center pegged the prediction for Hurricane Sandy, correctly placing southern New Jersey near the centre of its track forecast. This long lead time was critical for preparation efforts from the Mid-Atlantic to the Northeast and no doubt saved lives.

Hurricane forecasting has come a long way in the last few decades. In 1970, the average error in track forecasts three days into the future was 518 miles. That error shrunk to 345 miles in 1990. From 2007-2011, it dropped to 138 miles. Yet for Sandy, it was a remarkably low 71 miles, according to preliminary numbers from the National Hurricane Center.

Within 48 hours, the forecast came into even sharper focus, with a forecast error of just 48 miles, compared to an average error of 96 miles over the last five years.

Meteorological model predictions are regularly attenuated by experienced meteorologists, who nudge numbers that experience tells them are probably wrong. But they start with a model of the weather than is fundamentally accurate, because it is founded on the proposition that the weather is unstable.

Conventional economic models, on the other hand, assume that the economy is stable, and will return to an 'equilibrium growth path' after it has been dislodged from it by some 'exogenous shock'. So most so-called predictions are instead just assumptions that the economy will converge back to its long-term growth average very rapidly (if your economist is a Freshwater type) or somewhat slowly (if he’s a Saltwater croc).

Weather forecasters used to be as bad as this, because they too used statistical models that assumed the weather was in or near equilibrium, and their forecasts were basically linearly extrapolations of current trends.
How did weather forecasters get better? By recognizing, of course, the inherent role of positive feed backs and instabilities in the atmosphere, and by developing methods to explore and follow the growth of such instabilities mathematically. That meant modelling in detail the actual  fine scale workings of the atmosphere and using computers to follow the interactions of those details. The same will almost certainly be true in economics. Forecasting will require both lots of data and also much more detailed models of the interactions among people, firms and financial institutions of all kinds, taking the real structure of networks into account, using real data to build models of behaviour and so on. All this means giving up tidy analytical solutions, of course, and even computer models that insist the economy must exist in a nice tidy equilibrium. Science begins by taking reality seriously.

Rabu, 12 Desember 2012

Elements of a stable financial system

It's hardly a hell raising demand for revolution, but this speech by Michael Cohrs of the Bank of England is worth a quick read and offers some pretty encouraging signs that authorities -- in the UK, at least -- are moving (slowly) toward financial regulations that seem pretty sensible and might really help avoid future crises or make them less frequent. I read it as a kind of wish list, but of wishes that are fairly realistic.

On a theoretical level, perhaps the most important thing Cohrs calls for is greater awareness of economic and financial history, with the idea that we might prepare our minds better for the natural instabilities that seem to create crises so frequently:
At the heart of much of the current policy debate is how the FPC, PRA and FCA develop better processes for anticipating the next problem – whether the problem is an asset bubble, poor risk mismanagement or a flawed or misunderstood financial product. And these are important steps to take. But it seems to me there is an inherent tendency for policymakers to re-fight the last war. As I said above, I am a believer that understanding the past provides a foundation on which to assess the future. But we shouldn’t pretend we can eliminate financial crises completely. Nor that the next crises will necessarily be a carbon copy of the last one.
My anxiety about getting financial regulation to better mitigate future risks has its roots in the issues one sees in the financial crises of the past couple of hundred years or so. Virtually every type of financial institution has been the cause of a crisis at some point in history – country banks back in 1825, universal banks in 1931, small banks in the 1970s, savings and loan companies in the 1980s, international banks in the 1980s and 1990s (debt crises in Latin America and Asia respectively), and even a hedge fund in 1997.
Pretty much all types of financial institution got involved in the problems of 2007/2008. The roll call included insurance companies (although thankfully not those in the UK) alongside investment banks as well as some more traditional commercial and mortgage banks. I find it hard to see a common thread (other than high leverage ratios) amongst the types of institutions that struggled or the mistakes that they made. It is not clear that the reforms we are putting into place today would have, or could have, averted all the problems faced in these crises. Therefore, experience tells me its origins are unlikely to be in an institution and from a product that is obvious to us now. ... I realize this uncertainty is rather unhelpful.
Actually, I think it is very helpful. Nothing is more dangerous than belief that now , as we know how things can go wrong, we can probably perform a few engineering tricks and hence avoid further problems in the future. This was the facile belief furthered in the decade prior to the past crisis, especially in basic textbooks of economics and finance and research papers furthering belief in the inevitable "spiral to efficiency" of modern markets (infamously described in this rather embarrasing 2005 paper by Robert Merton and Zvi Modie, which was published even as the markets were on the verge of collapse!).

Cohrs goes on to discuss a number of ideas all being pursued with the idea of making finance more "sustainable." These include establishing simple rules by which large institutions can be wound down and let fail safely when they ought to (this might include using penalties or taxes to establish insurance funds beforehand to handle such events), making financial institutions LESS CONNECTED and changing the culture of finance as well so that financial institutions themselves "ensure they can be regulated." Ok, that final one may be a rather huge challenge.

The good thing is that people from the Bank of England are going around saying these things. Let's hope they can manage to put some of these principles in place, especially in some globally consistent way.

Selasa, 24 Januari 2012

Markets -- increasingly complex dynamics over the past decade

Didier Sornette is among the most creative scientists I know, and always seems to come up with an approach to problems that is more or less orthogonal to what anyone has done before. In a paper just out (as a preprint), he and Vladimir Filimonov offer a really novel analysis on the old question about whether market movements are caused by A. external influences such as news (exogenous causes) or B. influences internal to the market itself such as emotions, avalanches of belief and opinion, etc. (endogenous causes). This matter, of course, touches directly on the infamous efficient markets hypothesis, which insists on interpretation A (all A, no B).

I've written before (here and here, for example) about various studies trying to match up news feeds with big market moves to see if the latter can be explained by the former. Generally, the evidence suggests no, implying some mixture of A and B. Sornette and Filimonov now take a very different approach, which is an attempt to use mathematics to directly measure how much of the dynamics of a time series can be attributed to endogenous, internal causes. The mathematical technique is itself interesting. If it can be trusted, then the results suggest that markets in the past decade have become much more strongly driven by internal, endogenous dynamics than they were before. As the authors point out, this could well reflect the explosion of algorithmic trading, as computers interact with one another in lots of complex feedback loops.

The authors envision their technique as a device for measuring the amount of "reflexivity" in the market, referring to the term used by George Soros to describe how human perceptions and misperceptions interact in the market to drive changes. This is a fascinating idea if it can be done. Here's how it works. Sornette and Filiminov model price time series as being generated by a statistical "point process" -- the idea is to generate price dynamics by modelling the arrival of actual buy and sell orders in the market. The simplest way to do this is to use a Poisson process, with equal probability at all times. This gives a random time series of price movements, but an unrealistic one that lacks the most interesting properties of real markets -- fat tails in the distribution of returns, and long term memory in the volatility (and also volume fluctuations). To get realistic time series, it's possible to let the arrival of buy and sell orders have strong correlations in time, as they in fact do in real markets. This technique is referred to as a "self-excited Hawkes model."

Another way to put this is as follows. In an ordinary Poisson process, the average number of events striking in an interval dt (say, 1 second) is a constant, λ. In the richer process with correlations, this will now be a function of time λ(t). The key to the analysis here is expressing this quantity (essentially, the rate of buy and sell orders hitting to book around time t) as the sum of two very different processes -- 1. a background contribution due to external events such as news, which drive the market, and 2. a feedback contribution coming from the tendency for orders now to have consequences, leading to further orders in the future. The result is eq.(1) of the paper:
Here the first term on the right is the background (which drives the exogenous dynamics) and the second term is the feedback, with h being some function that reflects the likelihood that an event at time ti generates another one at time t later. The first term creates a steady stream of events, the second one creates events which create events which create events, a branching stream of further consequences.


Now, the task of fitting time series generated by such processes to real financial data is more involved and relies on some standard maximum likelihood techniques. The authors also assume for simplicity that the function h has an exponential form (events tend to cause others soon after, and less so with increasing time). The key parameter emerging out of such fits is n, which can be interpreted as the fraction of events of endogenous origin, or in effect, the fraction of market activity due to internal dynamics. The statistical fit also estimates μ, this being the background level of exogenous shocks, which also rises and falls with time. Sornette and Filimonov use data on E-mini futures on a second by second basis over about 12 years to run the analysis, the key results of which come out in the figure below.


The four parts going downward show volume and price, and then the estimated background and the fraction of events caused by internal dynamics, n. The most interesting feature is the general rise in n over the decade showing an increasing influence of internal dynamics, or events which causes further events through internal market mechanisms. In contrast, the background of exogenous shocks -- information driven dynamics -- remains more constant (except with a spike around the time of the Lehman Bros collapse). From this the authors offer a few comments:
The first important observation is that, since 2002, n has been consistently above 0.6 and, since 2007, between 0.7 and 0.8 with spikes at 0.9. These values translate directly into the conclusion that, since 2007, more than 70% of the price moves are endogenous in nature, i.e., are not due to exogenous news but result from positive feedbacks from past price moves. The second remarkable fact is the existence of four market regimes over the period 1998-2010:
(i) In the period from Q1-1998 to Q2-2000, the final run-up of the dotcom bubble is associated with a stationary branching ratio n fluctuation around 0.3.
(ii) From Q3-2000 to Q3-2002, n increases from 0.3 to 0.6. This regime corresponds to the succession of rallies and panics that characterized the aftermath of the burst of the dot-com bubble and an economic recession.
(iii) From Q4-2002 to Q4-2006, one can observe a slow increase of n from 0.6 to 0.7. This period corresponds to the “glorious years” of the twin real-estate bubble, financial product CDO and CDS bubbles, stock market bubble and commodity bubbles.
(iv) After Q1-2007 the branching ratio stabilized between 0.7 and 0.8 corresponding to the start of the problems of the subprime financial crisis (first alert in Feb. 2007), whose aftershocks are still resonating at the time of writing.
It should be emphasized that the analysis here is only sensitive to endogenous dynamics over timescales of only around 10 minutes or less. This stems from some assumptions necessary to deal with the highly non-stationary character of the data, as trading volume has exploded over the decade. Hence, the lower values of n earlier in the decade could reflect the failure of this analysis to detect important endogenous feedbacks operating on longer timescales (in the burst of the dot-com bubble, for example).


Now for what is perhaps the most fascinating thing coming out of this paper -- the idea that this analysis may be able to distinguish big markets movements caused by real news or other fundamental changes from those more akin to bubbles and caused purely by human behaviour (panics and the like) or algorithmic feedbacks. Sornette and Filimonov looked at two specific events, on 27 April and 6 May 2010, where markets moved suddenly and in a dramatic way. The first was caused by S&P downgrading Greece's debt rating, the second is, of course, the Flash Crash. The same analysis using their method shows strikingly different results for these two events:

 
The "branching ratio" here is just the n we've been talking about -- the fraction of market dynamics caused by internal dynamics. The most significant finding is that while the first event of 27 April showed absolutely no change in this value, expected given the apparently clear origin of this event in external information, the 6 May Flash Crash shows a sudden spike in the internal dynamics. Hence, based on this example, it appears that this parameter n acts like a flag, identifying events caused by powerful internal feedbacks. As the authors put it,
The top four panels of Fig. 3 show that the two extreme events of April 27 and May 6, 2010 have similar price drops and volume of transactions. In particular, we find that the volume was multiplied by 4.7 for April 27, 2010 and by 5.3 times for May 6, 2010 in comparison with the 95% quantile of the previous days’ volume. The main difference lies in the trading rates and in the branching ratio. Indeed, the event of April 27, 2010 can be classified according to our calibration of the Hawkes model as a pure exogenous event, since the branching ratio n (fig. 3D1) does not exhibit any statistically significant change compared with previous and later periods. In contrast, for the May 6, 2010 flash crash, one can observe a statistically significant increase of the level of endogeneity n (fig. 3D2). At the peak, n reaches 95% from a previous average level of 72%, which means that, at the peak (14:45 EST), more than 95% of the trading was due to endogenous triggering effects rather than genuine news.
Do you believe it? It sounds plausible to me. I guess the thing that would be good to see is some thorough tests of the method applied to time series for which we know the origin of the dynamics. That is, take something like a chaotic oscillator and drive it with some external noise with a controllable level and see if this method generally gives reliable results in teasing out how much of what happens is driven by the noise, and how much by the internal dynamics. Perhaps this has already been done in some of the papers describing the development of the self-excited Hawkes model. I'll try to check on this.


In any event, I think this is certainly a provocative and interesting new approach to this old question of internal vs external dynamics in markets. And I actually don't find the result surprising at all that n has increased markedly over the past decade. This is precisely what one would expect as trading moves over to algorithms that react to what other algorithms do on a sub second basis.