Agent Based Models 2010


Published on

A brief literature review and roadmap through agent-based models of financial markets. Laying out the key decisions agent based model builders need to make and some of the empirical results from recent models investigating the effect of short-selling bans, leverage etc.

  • Be the first to comment

Agent Based Models 2010

  1. 1. Agent-based models<br />Nick Wade<br />Northfield Information Services Asia Ltd.<br /><br />+81 (0)3 5403 4655<br />
  2. 2. Overview<br />Define Agent-based model<br />Literature review – the history<br />Building an agent-based model<br />Observed Behavior<br />References<br />
  3. 3. Motivation<br />At a macro level we observe complex behavior in financial markets:<br />Return jumps<br />Volatility clustering<br />Fat tails<br />Bubbles<br />Performance persistence of fundamental and technical signals<br />To model markets we can either:<br />Propose more flexible models (e.g. finite-moment log stable model)<br />Create a “behavioral” model of the interactions of participants (agents) at a micro level, and observe resulting macro behavior<br />Most interestingly, very simple rules and constraints at the agent level can result in fascinating complex behaviors at the macro level<br />
  4. 4. Definition – agent based model<br />An “Agent” is defined by Russell and Norvig (1995) as:<br />“anything that perceives its environment through sensors and acts through effectors” [e.g. a cat; the automatic toilet flush; mousetrap]<br />An agent-based model is a form of artificial market where securities are bought and sold by “agents” following decision rules<br />Example: often, agent-based models consist of a single investor allocating wealth to a set of funds (agents) based on a performance rule. Each period the agents typically have a choice between two securities (cash and a risky asset)<br />
  5. 5. Literature I<br />Early History:<br />Mandelbrot (1963) references a 1915 paper on the non-normality of price time-series<br />The Effect of Market Design:<br />Stigler (1964), Garman (1976)<br />From the latter: “does the auction market imply leptokurtosis”?<br />Early Models:<br />Cohen, Maier, Schwartz & Whitcomb (1983)<br />Kim and Markowitz (1989)<br />Frankel and Froot (1988)<br />De Grauwe, Dewachter, Embrechts (1993)<br />Lux (1997)<br />Kirman (1991)<br />Chiarella (1992)<br />Levy, Levy, Salomon (1994)<br />Review LeBaron (2006) Problem: complex models, unrealistic behavior<br />
  6. 6. Literature II<br />Developments in Term of Agent Decision Rules<br />Cont and Bouchard (2000) noise traders subject to herding<br />Lux and Marchiesi (2000) traders are fundamentalist, chartist, or noise traders<br />Problem: everything clears; there is no persistent order book<br />Recent Developments<br />Mike & Farmer (2008) most complete order-book model to date<br />Calibrated on market data<br />Fat tails, spread distribution well reproduced, volatility increases as a result of autocorrelation [liquidity effect]<br />Latest advances:<br />Herding ,Cont and Bouchard (2000)<br />Dynamic price placement, Preis et al (2007)<br />Threshold behavior Cont (2007)<br />
  7. 7. Examples of Applications<br />Cargo routing (Southwest Airlines)<br />Supply chain (Proctor & Gamble)<br />Traffic flow<br />Climate change<br />Modeling the effect of regulatory changes<br />Changing from fractions to decimals (NASDAQ)<br />Removing leverage<br />Short-sale restrictions<br />
  8. 8. Building an agent-based model<br />Agent decision rules<br />Trading mechanism<br />Securities<br />Evolution or learning<br />Benchmarks / Calibration<br />
  9. 9. Agent Decision Process<br />Commonly: Fundamentalist, Chartist, Noise-traders<br />Simple rules – formulate a “value” based on a simple rule or algorithm, buy if price is below that value, sell if above<br />More complex process<br />allow different signals, for example using commonly available/used financial statement data<br />allow agents to choose weights for signals, neural networks<br />attach a cost to signals, attach a cost to additional nodes<br />generate new signals by mixing<br />evolution: mutation or innovation<br />Issues<br />Similar or different agents?<br />How much memory to allow, should it be the same across agents?<br />Synchronicity, or asynchronous innovation?<br />
  10. 10. Intelligent Agents<br />Agents can use AI to formulate decisions<br />Adaptation mechanisms:<br />Imitation<br />Reaction<br />Reactive learning<br />Generative learning<br />Evolution<br />
  11. 11. Notes on Learning<br />DeLongSchleifer Summers (1991) introduce noise trader<br />Lettau (1997) interesting result that agents learn but are overly optimistic as a result of lucky as well as skillful groups winning…<br />Gode & Sunder (1993) zero intelligence agents in the presence of budget constraints produce behavior that looks “smart” => need to be cautious in separating which results are due to learning and adaptation, and which are due to the structure imposed!<br />
  12. 12. Notes on Learning II<br />Arifovic (1996) GA learning<br />Routledge (1994) GA, costly information<br />Beltratti, Margarita, and Terna (1996)<br />Neural network forecasting tools for agents<br />Vary “intelligence” of trades by adding nodes (at a cost)<br />Find an equilibrium cost level where both can exist<br />Reick (1994) actual trading rules<br />
  13. 13. Notes on Learning III<br />Fogel (1995) broad perspective on GA methods<br />Vriend (2000) social versus independent learning<br />Lee et al (2002) “the important factor in market fluctuations is not the events themselves but the human reactions to those events”<br />Kurz et al (2003) – agents form beliefs based on the available data and their behavior reduces to rational expectations only as a special case (!)<br />Yang and Satchell (2003) “the market in the absence of technical traders would reach fundamental equilibrium with fluctuations only due to exogenous shocks”<br />Mackey-Glass – chaotic process<br />Kyrtsou (2006): captures feedback behavior in a market when heterogeneous investors interact<br />When rules are non-linear, arrival of information can cause high volatility and instability. Not so when rules are linear.<br />
  14. 14. Trading Mechanism<br />There are various options in terms of the actual trading of securities<br />Assume a simple price response to demand<br />E.g. P(t+1)-P(t) = alpha*(Dt – St), set alpha carefully or introduce a market maker to fill in, which in turn opens up questions about inventory control models…<br />Build market such that an equilibrium price can be found easily<br />Which involves market structure assumptions and is often therefore no good for exploring high frequency trading<br />Explicitly model trading dynamics (e.g. order book model) such that market looks like reality<br />E.g. limit and market orders, crossing etc <br />Chakrabarti (1999), Yang (2000)<br />
  15. 15. Securities<br />Usually simplistic – often just cash and a risky security<br />Often dividend is revealed each period – a luxury real investors do not have<br />Obvious extensions<br />Multiple securities, cross-market impact<br />Multiple markets, information flow across markets<br />Multiple asset classes, information flow across AC<br />
  16. 16. Evolution<br />Friedman (1953)<br />Blume & Easley (1990) utility maximization is not synonymous with wealth maximization<br />
  17. 17. Benchmarks/Calibration<br />Validation – is it a good model?<br />Which parameters lead to equilibrium?<br />Understand parameter boundaries between simple and complex behaviors<br />In order to see observed market phenomena we need to allow a broad range of memories from 6 months to 30 years.<br />
  18. 18. Time<br />Time can be measured in various ways<br />Calendar time<br />Event time<br />Trading/Transaction time<br />Consider how much history should be available to agents, and differ (or not) across agents<br />Rate of change – has a huge impact on convergence<br />Slow learning: market converges rapidly to an equilibrium state<br />Fast learning: fat tails, volatility persistence (i.e. clustering), technical and fundamental trading leads to predictable returns (i.e. a lot of the stylized facts we observe in real markets)<br />See LeBaron, Arthur, Palmer (1998)<br />
  19. 19. The effect of short-selling<br />Mizuta et al (2010)<br />Construct an agent-based model following Lux and Marchiesi (2000) having fundamentalist, chartist, and noise-trading agents<br />Compare regulated and unregulated market<br />Dynamics of unregulated market look like “real world” i.e. TOPIX<br />Volatility increases with regulation<br />Less efficiency in regulated market<br />Bubbles in regulated market<br />Conclude that short-sale restrictions are of benefit only for very short periods of time during crisis, and at other times short-selling improves efficiency and reduces volatility <br />
  20. 20. The effect of Leverage<br />Thurner, Farmer, Geanakoplos (2009)<br />No/some leverage: as a stock declines, buy more<br />Lots of leverage: as a stock declines, sell some (margin call)<br />In a no/moderate leverage environment, volatility is damped by funds buying as prices fall<br />In a high leverage environment, volatility is increased by funds selling as prices fall<br />This leads to fat tails, and autocorrelation increases with leverage leading to volatility clustering<br />
  21. 21. Application<br />Clearly of use evaluating the effect of changes in market participants <br />a change in the data available, frequency of innovation or additional trading strategies<br />changes in the environment due to regulatory changes e.g. a ban on short selling, reductions in leverage, predilection for particularly levels of liquidity etc etc<br />Unclear how useful agent-based models may be as forecasting tools beyond these “scenario” models<br />
  22. 22. References<br />Arifovic, J., 1996. The behavior of the exchange rate in the genetic algorithm and experimental economies. Journal of Political Economy 104, 510-541.<br />Beltratti, Margarita and Terna<br />Blume, L., Easley, D., 2001. If you’re so smart, why aren’t you rich? Belief selection in complete and incomplete markets, Tehnical report, Cornell University, Ithaca, NY.<br />Chakrabarti, R., 1999. Just another day in the inter-bank foreign exchange market. Journal of Financial Economics 56(1), 29-64.<br />Cont, R.,2007. Volatility Clustering in financial markets: empirical facts and agent-based models, in: Long Memory in Economics, 289-309.<br />Cont, R., Bouchard, J.P., 2000. Herd behavior and aggregate fluctuations in financial markets. Macroeconomic Dynamics 4, 170-196.<br />DeLong, J.B., Schleifer, A., Summers, L.H., Waldmann, R., 1991. The survival of noise traders in financial markets, Journal of Business 64, 1-19.<br />Fogel, D.B., 1995. Evolutionary Computation: Toward a New Philosophy of Machine Intelligence, IEEE Press, Piscataway, NJ.<br />Friedman, M., 1953. The case for flexible exchange rates, in Essays in positive economics, University of Chicago Press, Chicago, IL.<br />Garman, M.B., 1976. Market microstructure. Journal of Financial Economics 3, 257-275.<br />Gode, D.K., Sunder, S., 1993. Allocative efficiency of markets with zero-intelligence traders. Journal of Political Economy 101, 119-37.<br />
  23. 23. References II<br />Kurz, M., Jin, H., Motolese, M., 2003. The Role of Expectations in Economic Fluctuations and the Efficacy of Monetary Policy, working paper. Department of Economics, Stanford University.<br />Kyrtsou, C., 2006. Heterogeneous Non-Linear Trading Rules and Routes to Chaotic Dynamics, forthcoming Working Paper, LAMETA, University of Montpellier I.<br />LeBaron, B., 2006. Agent-based computational finance, handbook of computational economics 2, 1187-1233.<br />LeBaron, B., Arthur, W.B., Palmer, R., 1999. Time series properties of an artificial stock market, Journal of Economic Dynamics and Control 23, 1487-1516.<br />Lee, W., Jiang, C., Indro, D., 2002. Stock Market volatility, excess returns, and the role of investor sentiment. Journal of Banking & Finance 26, 2277-2299.<br />Lettau, M., 1997. Explaining the facts with adaptive agents: the case of mutual fund flows. Journal of Economic Dynamics and Control 21, 1117-1148.<br />Lux, T., Marchiesi, M., 1999. Scaling and criticality in a stochastic multi-agent model of a financial agent. Nature, 397, 498-500<br />Mandelbrot, B.B., 1963. The Variation of Certain Speculative Prices. The Journal of Business, 36, 394-419.<br />Mike, S., Farmer, J.D., 2008. An empirical behavioral model of liquidity and volatility, Journal of Economic Dynamics and Control 32, 200-234.<br />Preis, T., Golke, S., Paul, W., Schneider, J.J., 2007. Statistical analysis of financial returns for a multiagent order book model of asset trading. Physical Review E 76 (1).<br />
  24. 24. References III<br />Rieck, C., 1994. Evolutionary simulation of asset trading strategies. In: Hillebrand, E., Stender, J. (Eds.), Many-agent simulation and artificial life. IOS Press.<br />Routledge, B.R., 1994. Artificial selection: genetic algorithms and learning in a rational expectations model. Technical Report, GSIA, Carnegie Mellon, Pittsburgh, PA.<br />Russell, S., Norvig, P., 1995. Artificial Intelligence. Prentice Hall, NJ.<br />Stigler, G., 1964. Public regulation of the securities markets. Journal of business, 117-142.<br />Thurner, Stefan, Farmer, J. Doyne and Geanakoplos, John, Leverage Causes Fat Tails and Clustered Volatility (January 11, 2010). Cowles Foundation Discussion Paper No. 1745. Vriend, N., 2000. An illustration of the essential difference between individual and social learning, and its consequences for computational analysis, Journal of Economic Dynamics and Control 24, 1-19.<br />Yagi, I., Mizuta, T., Izumi, K., working paper. A study on the effectiveness of short-selling regulation using artificial markets.<br />Yang, J., 2000. Price Efficiency and inventory control in two inter-dealer markets, Technical report, Bank of Canada, Ottawa, Canada.<br />Yang, J.-H., Satchell, S., 2003. The Impact of Technical Analysis on Asset Price Dynamics, Working Paper, Faculty of Economics and Politics, Trinity College, University of Cambridge.<br />Yousefmir, M., Huberman, B.A., 1997. Clustered volatility in multiagent dynamics. Journal of Economic Behavior and Organization 32, 101-118.<br />