Lecture Notes in Economics and Mathematical Systems 662 Founding Editors: M Beckmann H.P Kăunzi Managing Editors: Prof Dr G Fandel Fachbereich Wirtschaftswissenschaften Fernuniversităat Hagen Feithstr 140/AVZ II, 58084 Hagen, Germany Prof Dr W Trockel Institut făur Mathematische Wirtschaftsforschung (IMW) Universităat Bielefeld Universităatsstr 25, 33615 Bielefeld, Germany Editorial Board: H Dawid, D Dimitrow, A Gerber, C-J Haake, C Hofmann, T Pfeiffer, R Slowi´nski, W.H.M Zijm For further volumes: http://www.springer.com/series/300 Andrea Teglio • Simone Alfarano Eva Camacho-Cuena • Miguel Ginés-Vilar Editors Managing Market Complexity The Approach of Artificial Economics Editors Andrea Teglio Assoc Prof Simone Alfarano Assoc Prof Eva Camacho-Cuena Assoc Prof Miguel Ginés-Vilar Economics Universitat Jaume I Castellon de la Plana Spain ISSN 0075-8442 ISBN 978-3-642-31300-4 ISBN 978-3-642-31301-1 (eBook) DOI 10.1007/978-3-642-31301-1 Springer Heidelberg New York Dordrecht London Library of Congress Control Number: 2012943066 © Springer-Verlag Berlin Heidelberg 2012 This work is subject to copyright All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed Exempted from this legal reservation are brief excerpts in connection with reviews or scholarly analysis or material supplied specifically for the purpose of being entered and executed on a computer system, for exclusive use by the purchaser of the work Duplication of this publication or parts thereof is permitted only under the provisions of the Copyright Law of the Publisher’s location, in its current version, and permission for use must always be obtained from Springer Permissions for use may be obtained through RightsLink at the Copyright Clearance Center Violations are liable to prosecution under the respective Copyright Law The use of general descriptive names, registered names, trademarks, service marks, etc in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made The publisher makes no warranty, express or implied, with respect to the material contained herein Printed on acid-free paper Springer is part of Springer Science+Business Media (www.springer.com) Preface Research at the intersection of economics and computer science has remarkably grown in recent years and it has become a source of interest and innovation for both disciplines The flow of knowledge and ideas between computer science and economics is traveling in both directions From one side, many aspects of our most important information networks, such as Internet, might be better understood, managed, and improved when viewed as economic systems rather than as purely technological ones On the other way around, economists have begun to apply the insights and methods of computer science in order to face new and old problems in economics1 Most of the interaction between economics and computer science turns around the concept of complexity In economics, complexity is not simply a matter of things being “complicated”, although some may view it this way, but it is referred to markets that exhibit and share some specific characteristics that are used to define complexity The concept of complexity in economics emerged historically in the fields of game theory and financial markets, where the “nearly archetypal example” can be considered the artificial stock market model created by the Santa Fe Institute in 1989 We borrow from Durlauf and Lane2 a tentative list of features that characterize complexity in economics: the presence of dispersed interaction among heterogeneous agents acting locally among each other in some space; the presence of mechanisms of competition and coordination between agents without a global entity (fictitious auctioneer) that controls interactions in the economy; a cross-cutting hierarchical organization with many tangled interactions; continual adaptation by learning and evolving agents; perpetual innovation as new markets, technologies, behaviors, and institutions create new niches in the ecology of the system; out-of-equilibrium dynamics with either zero or many equilibria existing and the system unlikely to be near a global optimum Market models that incorporate such characteristics often involve many interacting agents and, consequently, they constitute high-dimensional mathematical models that lead to complex large scale computations In recent years, computer scientists have For more details see Michael Kearns, “Economics, Computer Science, and Policy”, Issues in Science and Technology, 21(2), 2005 Brian Arthur, Steven Durlauf and David A Lane, “Introduction: Process and Emergence in the Economy”, The Economy as an Evolving Complex System II, Addison-Wesley, 1997 v vi Preface been examining new ways of representing or encoding such high-dimensional models and we can now undertake the construction and algorithmic manipulation of numerical economic models whose complexity greatly exceeds those one could have contemplated a decade ago Since 2005, the Artificial Economics conference is building a bridge between these two disciplines, facilitating the meeting of people working on different topics in economics and computer science, in order to encourage a structured multi-disciplinary approach to social sciences The VIII edition of Artificial Economics, held in Castell´ on de la Plana (Spain), followed the traditional 2-days meeting format, including the presentation of 20 selected speakers, whose contributions are collected in this volume, and the talks of three invited scholars: Silvano Cincotti (University of Genoa), Giovanni Dosi (Sant’Anna School of Advanced Studies in Pisa) and Cars Hommes (University of Amsterdam) All three researchers have extensively contributed to the development of agent-based techniques and the application of computational methods to various fields of economics, such as macroeconomics, industrial organization, finance and experimental economics In the last decade the cross-fertilization between Economics and Computer Science gave rise to novel relevant results in traditional fields in economics such as macroeconomics, the analysis of networks, finance and theory of firms Just as an example, we can mention the Eurace project3 , headed by Prof Silvano Cincotti, that brings together computer scientist and economists to create a simulation platform to study the behavior of agents and the performance of the economy in a complex environment Within the traditional field of Industrial Organization, methods from Artificial Economics have been successfully applied to the analysis of firms’ dynamics by Prof Giovanni Dosi, who developed a simulator that allows studying the process of creation and diffusion of innovation and its impact on the sustainability of economic growth Additionally to the application of Artificial Economics methods to traditional fields, we find also some novel and original applications as in the case of the complementary use of artificial methods and laboratory experiments Prof Cars Hommes has shown the effectiveness of such approach by applying artificial evolving agents to reproduce the behavior of human subjects in simple laboratory financial markets In this volume we collect the most recent research in the various branches of Artificial Economics In the field of Networks Diedrich and Beltr´ an present an agent-based model to study whether the traditional paradigm of network neutrality is an appropriate framework in managing internet traffic Hollander, Garibay, O’Neal introduce an agent-based computational model to quantify the impact of the characteristics of the underlying production network on macroeconomic output The architecture of credit networks among banks and its role on financial contagion are the main topics of the contribution of Provenzano Lopolito, Morone and Taylor focus attention on the diffusion of new technologies as a function of the characteristics of a network composed by institutional advisors and firms Eurace is the acronym of “An agent-based software platform for European economic policy design with heterogeneous interacting agents: new insights from a bottom up approach to economic modeling and simulation”, EU IST FP6 STREP grant: 035086 Preface vii In the part of the volume devoted to Macroeconomics, Chen and Inoue appliy methods of statistical physics to deal with the matching problem in the labor market Erlingsson, Raberto, Stef´ ansson, and Sturluson implement an housing-market into an agent-based macroeconomic model characterized by heterogeneous households, banks and the presence of a central bank Regarding Finance, Fischer studies the dynamical properties of a market populated by N heterogeneous consumers in the presence of financial markets allowing for saving and lending, within an agent-based framework Brandouy, Mathieu, and Veryzhenko introduce an agent-based model of heterogeneous financial investors analyzing the impact of their risk attitudes on the long-run stability of their investment strategies Stanciu-Viziteu introduces a simple game to model the bounded-rational behavior of investors in a prototypical financial market Among the contributions focusing in Industrial organization, Radivojev´ıc, Anselmi and Scalas present a stylized model of a continuous double auction, deriving the conditions for its statistical equilibrium Cruciani, Moretti and Pellizzari syudy the determinants of cooperation using an agent-based framework An agent-based model of electricity market is introduced by Guerci and Rastegar Kop´ anyi describes the convergence properties of a Bertrand competition market with agents having different learning methods In the part of the volume devoted to the field of Management, LiCalzi and Milone introduce a model of a team problem-solving with heterogeneous bounded rational agents Osinga, Kramer, Hofstede and Beulens introduce an agent-based model to study the choices of heterogeneous farmers Schouten, Polman, Westerhof and Kuhlman offer an agent-based perspective model to deal with agricultural policy issues Leitner implement a statistical analysis of managing accounting systems The final part of the volume includes some methodological questions to be addressed in order to give a more structured framework to the discipline of Artificial Economics Diks and Makarewicz present an application of artificial intelligence in modelling data generated by laboratory experiments with human subjects Grazzini, Richiardi and Sella estimate the main parameters of a simple agent-based model of innovation diffusion Castell´on de la Plana, May 2012 Simone Alfarano Eva Camacho Miguel Gin´es Andrea Teglio Acknowledgements Artificial Economics 2012 gratefully acknowledges the financial support of: • • • • • Generalitat Valenciana Spanish Ministry of Science and Research Faculty of Law and Economics, Universitat Jaume I Economics Department, Universitat Jaume I Bank of Spain Chair on Computational Economics, Universitat Jaume I We would like to thank all the members of the Scientific Committee who kindly refereed the • • • • • • • • • • • • • • • • • • • • • Frédéric Amblard - Université de Toulouse 1, France Bruno Beaufils - LIFL, USTL, France Giulio Botazzi- Scuola Superiore Sant’Anna di Pisa, Italy Olivier Brandouy - CLAREE, USTL, France Charlotte Bruun - Aalborg University, Denmark Andrea Consiglio - Università degli Studi di Palermo, Italy Giorgio Faggiolo- Scuola Superiore Sant’Anna, Italy José Manuel Galán - Universidad de Burgos, Spain Hardy Hanappi, University of Technology of Vienna Florian Hauser - Universitä Innsbruck, Austria Cesáreo Hernández- Universidad de Valladolid, Spain Juergen Huber- Universität Innsbruck , Austria Wander Jager - University of Groningen, The Netherlands Marco Licalzi - Università ”Ca’ Foscari” di Venecia, Italy Philippe Mathieu - LIFL, USTL, France Rosario Mantegna- Universita degli Studi di Palermo, Italy Mishael Milakovic, University of Bamberg, Germany Akira Namatame- National Defense Academy, Japan Juan Pavón - Universidad Complutense de Madrid, Spain Paolo Pellizzari - Università ”Ca’ Foscari” di Venecia, Italy Denis Phan - Université de Rennes I, France ix 228 Cees Diks and Tomasz Makarewicz Procreation IC new chromosomes are sampled from the old ones with probability related to their fitness Mutation For each bite in all new chromosomes, each is reversed (zeros change to ones and vice versa) with a fixed probability Crossover New chromosomes are divided into IC /2 pairs Each pair has a fixed probability to exchange the first CL and the last CH bites, where CL and CH are predefined Election Child chromosome is selected into the realized new population only if it is more fit than its parent, else the parent prevails Refer to [4] for interpretation of each of the chromosomes and some discussion Please note that this specification is fairly standard Repeated experiments If an experiment was repeated, then each experiment instance may be treated as one independent observation Imagine that it turns out that in the LtF experiments under the positive feedback the higher average initial prediction implies larger dispersion of the following prices Given a candidate explanatory model, researcher can sample theoretical time paths and hence compare the joint distributions of empirical and simulated average initial predictions and the later price dispersion Another possibility is to treat an experiment as a sample of independent shots, each being a sub-sample of interrelated observations In the LtF experiment, each experiment shot generated seven time paths (six for predictions and one for prices) Obviously these time-paths were independent between groups and dependent within each group Since usually experiments are repeated only several times, but at each shot with many subjects, this approach allows for richer estimation Our methodology can easily evaluate such cases The trick is that each subject will be represented by a vector consisting of two parts: one describing the subject’s own behavior and second the dynamics of the whole group Hence each individual observation also carries information about relevant group background characteristics Recall that the test compares the joint distribution of two vector sets – if there is any dependence between individual and aggregate variables in the experimental data, the test checks if the same pattern is observed in the sample from the analytical model Notice that in our case, we can safely assume that all initial predictions are independent, and therefore we not need to consider group variables Choice of the observation vector In many cases each experimental shot is data abundant, since subjects need to make many decisions over a substantial number of periods On the other hand, the observation vectors should be relatively short for the sake of identification In the case of LtF experiment, even with all the 13 groups we observe 78 individuals If we focus on the individual behavior, the test is reliable for no more than a three-dimensional 18 Initial Predictions in Learning-to-Forecast Experiment 229 observation vector And if want to focus only on the groups, the 13 observations allow only for a one-dimensional observation vector! This cannot be improved by sampling more vectors from the analytical model, since there are simply too little empirical observations Therefore in such cases it is crucial to reduce the dimensionality of the data This usually means a focus on some specific stylized facts which can be translated into numerical arguments This may include: convergence time; equilibrium type/variable/sustainability; level of efficiency or cooperation If the observed time paths are stationary and long enough, the best solution may be to represent them by a handful of ARMA coefficients For the example of the LtF experiment, imagine that we want to focus on the relation between the initial predictions and the price stability under the positive feedback Hence, each subject is described by a vector of her initial forecast and the standard deviation of the prices which were realized in her group The alternative is to estimate an AR models for each subject’s predictions and combine them with the initial average price 18.3 LtF initial expectations In this section, we estimate the distribution of the initial predictions from the [5] experiment These results are based on Ox code [3] which is available on request Identifying the distribution In total there are 72 observations in the twelve groups divided between two treatments (positive and negative feedback) The initial forecasts not depend on the feedback (with test statistic equal to −0.4241, see also Fig 18.1 for a histogram) Recall that the initial predictions are ‘uninformed’ and restricted to the interval [0, 100], with 50 being the focal point As mentioned, continuous distributions with mean 50 not perform well We checked uniform U (0, 100) and normal N (50, 1) distributions.2 For both we generate 720 predictions and compare them with the original sample For the sake of robustness, we also report Komogorov-Smirnov test results (see [6], pp 518-522) See Table 18.1 Continuous distributions are clearly rejected We therefore propose to focus on a composite distribution Consider an IID random variable pei,0 with the following distribution: ⎧ ⎪ ⎨ε ∼ U (50 − CL , 50) e pi,0 = 50 ⎪ ⎩ ε ∼ U (50, 50 + CH ) with prob π1 , with prob − π1 − π2 ≡ π3 , with prob π2 , (18.1) The poor fit of the normal distribution is robust against changing the variance specification 230 Cees Diks and Tomasz Makarewicz 0.06 0.06 0.06 0.05 0.05 0.05 0.04 0.04 0.04 0.03 0.03 0.03 0.02 0.02 0.02 0.01 0.01 10 20 30 40 50 60 70 80 (a) Full sample 90 100 0.01 10 20 30 40 50 60 70 80 90 (b) Negative feedback 100 10 20 30 40 50 60 70 80 90 100 (c) Positive feedback Fig 18.1: Distribution of the initial expectations in the LtF experiments where π1 , π2 , π3 ∈ (0, 1) and CH , CL ∈ (0, 50) It means that pei,0 becomes the focal point 50 with probability π2 , else it will fall into the left or right ‘wings’ with probability π1 and π3 respectively Both wings are uniform and extend to left or right from the focal point We call this distribution ‘winged focal point’ (WFP) Estimation The WFP distribution has four free parameters: simplex spanned by the three probabilities and the two cut-off points We estimate it with GA Notice that a ML estimator would be fairly straightforward here One would just take the empirical probabilities as the masses for the three parts of WFP and use the smallest and the largest observation for the cut-off points of the wings It will later appear that this particular specification is not the optimal one 1.25 1.00 Fig 18.2 GA estimation of the WFP distribution with independent chromosome clusters – average fitness for each chromosome cluster across time 0.75 0.50 0.25 25 50 75 100 125 150 175 200 225 250 275 300 325 350 375 400 In the first step, we use independent clusters of 64 chromosomes each, which we iterate for 400 periods The mutation rate is taken as 0.01 and the crossover probability as 0.6 Each chromosomes encodes probabilities with 20 bites and interval lengths with 26 bites, which gives precision of around 10−6 The fitness is taken as exp(−Di,t ) where Di,t is the Diks test statistic for chromosome i at time t Clusters converge to a narrow set of coefficients, with low differences in the obtained fitness between clusters and small variance of the coefficients within clusters, see Fig 18.2.3 This shows that there is no issue of multiple optima for our target function Therefore in the next stage we focus on a single cluster of 64 chromosomes and let it iterate for 1000 periods (with the same GA coefficients specification) The chro3 We tried different seeds for the random number generator for this and all the following estimations The results not depend on the particular sample of the pseudo-random numbers 18 Initial Predictions in Learning-to-Forecast Experiment 231 mosomes require less than 300 periods to converge which shows that any additional fitness gain is highly unlikely Table 18.1: Diks test and Komogorov-Smirnov test statistics for proposed distributions The null hypothesis in both tests is that the proposed distribution cannot be rejected as the data generating distribution ‘∗∗ ’ in the KS test denotes a test significant at 10−5 level and ‘∗ ’ in the Diks test denotes a significant test Proposed distributions of pei,0 pei,0 = 50 U (0, 100) N (50, 1) estimated WFP Test Diks test 395.58∗ 46.362∗ 27.724∗ 0.46734 KS test 3.7081∗∗ 2.6968∗∗ 3.5957∗∗ 0.87751 1.0 1.0 0.9 0.9 0.8 0.8 0.7 0.7 0.6 0.6 0.5 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 100 200 300 400 500 600 700 800 900 1000 (a) Masses of the left wing (b) Masses of the focal point 50 50 40 40 30 30 20 20 10 10 100 200 300 400 500 600 700 800 (c) Lengths of the left wing 100 200 300 400 500 600 700 800 900 1000 900 1000 100 200 300 400 500 600 700 800 900 1000 (d) Lengths of the right wing Fig 18.3: GA estimation of the WFP distribution with 64 chromosome – time paths of each chromosome GA optimization yields the following specification: 232 Cees Diks and Tomasz Makarewicz ⎧ ⎪ with probability 0.45739, ⎨εi ∼ U (9.546, 50) e pi,0 = 50 with probability 0.30379, ⎪ ⎩ εi ∼ U (50, 62.793) with probability 0.23882 (18.2) Notice that E(pei,0 ) ≈ 42.276 50 See Fig 18.3 for chromosomes time paths Separate testing (Table 18.1) demonstrates that this specification cannot be rejected; a clear difference with continuous distributions Monte Carlo experiments Our estimation is set on one set of pseudo-random numbers In order to show that nevertheless it is robust, we conducted a series of Monte Carlo experiments Table 18.2: Small sample test for the following WFP specifications: ML, estimated and estimated with ML wing lengths/masses The null hypothesis is that the specification cannot be rejected ‘∗ ’ denotes a test significant at 10% level and ‘∗ ∗’ at 5% Proposed WFP specifications Normalized test statistic Estimated ML ML wings ML masses 1.27208 1.83185∗ 2.19079∗∗ 0.852203 0.7 0.30 0.6 0.25 0.5 0.20 0.4 0.15 0.3 0.10 0.2 0.05 0.1 42 43 44 45 46 47 48 (a) U(0,100) 49 50 51 52 25 25.5 26 26.5 27 27.5 28 28.5 29 29.5 (b) N(50,1) Fig 18.4: Monte Carlo simulations of the Diks test statistic for uniform and normal distributions Notice the differences in the supports of the histograms The specific procedure for each experiment is the following For a candidate distribution we generate 1000 samples of 720 observations Each is compared with the original data by the Diks test For each tested distribution, the histogram of the test 18 Initial Predictions in Learning-to-Forecast Experiment 233 statistic is much in line with the already reported statistics First, the continuous distributions (as specified in Table 18.1) again perform poorly, see Fig 18.4 2.00 1.50 1.75 1.25 1.50 1.00 1.25 1.00 0.75 0.75 0.50 0.50 0.25 0.25 −0.5 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 −0.5 0.0 (a) WFP estimated specification 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 3.5 4.0 (b) WFP ML specification 1.75 1.2 1.50 1.0 1.25 0.8 1.00 0.6 0.75 0.4 0.50 0.2 0.25 −0.5 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 (c) WFP: estimated masses and ML lengths −0.5 0.0 0.5 1.0 1.5 2.0 2.5 3.0 (d) WFP: ML masses and estimated lengths Fig 18.5: Monte Carlo simulations of the Diks test statistic for WFP distribution with different parameter specifications Second we focus on the WFP distributions As seen on Fig 18.5a, our estimations are robust: Diks test statistics for this distribution are centered in the lower half of non-rejection interval With lower mode it does comparatively better than the ML specification (Fig 18.5b) MC studies suggest that longer wings perform poorly Fig 18.5c shows the histogram of test statistics for the WFP with our estimated wing masses, but with ML wing lengths, which are larger by around 10 and 35 for the left and right wing respectively in comparison with our estimate This specification performs comparatively poorly On the other hand, specification with estimated wings but ML masses is very close to the fully estimated specification, see Fig 18.5d Identification and interpretation The estimated masses of the wings are very close to what ML estimation would suggest On the other hand, their lengths are comparatively small, especially for the right wing We interpret this fact in the following way 234 Cees Diks and Tomasz Makarewicz It is true that some empirical initial predictions are close to 100 Their number is very small and most of the observations above the focal point of 50 are uniformly spread in the [50, 63] interval As a result, the [50, 100] interval would cover all observed forecasts, but at the expense of predicting unrealistically many observations larger than 63 It turns out that it is more efficient to simply treat the largest observations as outliers and to focus on a better fit to the most important part of the right wing A similar argument holds for the left wing This is confirmed by the small sample test (with the MC theoretical sample SM size of 500), see Table 18.2 An alternative would be to specify the right wing as a bimodal distribution: with the points being concentrated in the [50, 63] interval, but also with some positive mass associated with an interval close to 100 Unfortunately, we would need much more observations than available in order to identify properly any such distribution Therefore we argue that the estimated WFP is a fair trade between reliability and feasibility An alternative would be to use the hybrid with estimated lengths and ML probabilities To conclude, despite data scarcity our procedure was able to identify a non-linear model with four parameters This shows its usefulness for indirect estimations of non-linear models in the context of repeated experiments 18.4 Conclusions In this paper, we estimate the composite distribution of the initial price expectations for the LtF experiments from [5] Our results have two consequences First, the initial forecasts are likely to be significantly less than the experimental fundamental price 60 and the focal point 50 This systematic under-evaluation on the side of human subjects may be important to evaluate the experiment Also, it should be incorporated into analytical models, else they may have poor fit to the data For example, our analysis validates the investigation by Anufriev M et al [1] Second, this investigation is just a simple example of our methodology It demonstrates that even if the underlying data generating process results in discontinuous distribution of the data, it can still be successfully identified This can be used for repeated experiments, where each experimental group is treated as an independent set of dependent individual observations, in order to identify the link between group and individual behavior References Anufriev M, Hommes C, Philipse R (2010) Evolutionary selection of expectations in positive and negative feedback markets Diks C, van Zwet WR, Takens F, DeGoede J (1996) Detecting differences between delay vector distributions Phys Rev E 53:2169–2176, DOI 10.1103/PhysRevE.53.2169, URL http://link aps.org/doi/10.1103/PhysRevE.53.2169 18 Initial Predictions in Learning-to-Forecast Experiment 235 Doornik J (2007) Object-oriented matrix programming using Ox, 3rd edn Timberlake Consultants Press, London, URL www.doornik.com Haupt R, Haupt S (2004) Practical Genetic Algorithms, 2nd edn John Wiley & Sons, Inc., New Jersey Heemeijer P, Hommes C, Sonnemans J, Tuinstra J (2009) Price stability and volatility in markets with positive and negative expectations feedback: An experimental investigation Journal of Economic Dynamics and Control 33(5):1052 – 1072, DOI 10.1016/j.jedc.2008.09.009, URL http://www.sciencedirect.com/science/article/pii/S0165188909000293, complexity in Economics and Finance Press W, Flannery B, S ST, Vetterling W (1989) Numerical Recipes in Pascal, 1st edn Cambridge University Press, Cambridge Chapter 19 Small sample bias in MSM estimation of agent-based models Jakob Grazzini, Matteo Richiardi and Lisa Sella Abstract Starting from an agent-based interpretation of the well-known Bass innovation diffusion model, we perform a Montecarlo analysis of the performance of a method of simulated moment (MSM) estimator We show that nonlinearities of the moments lead to a small bias in the estimates in small populations, although our estimates are consistent and converge to the true values as population size increases Our approach can be generalized to the estimation of more complex agent-based models 19.1 Introduction In this chapter we present an example of the use of simulation-based econometric techniques for the estimation of agent-based (AB) models While the full details of the estimation strategy can be found in [18], here we focus on the small sample properties of the simulated moment estimator We show the existence of a small sample bias in the estimates, which however vanishes as the sample size increases The bias turns out to be originated by non-linearity of the moments selected for estimation, a feature that is quite common in AB models as non-linearities are intrinsically linked to complex systems As an application, we use a discrete-time operationalization of the wellknown Bass model of innovation diffusion [4] This model describes the evolution over time of the number of adopters by means of a differential equation We reinterpret Jakob Grazzini Catholic University of Milan, Institute of Economic Theory and Quantitative Methods, via Necchi 5, 20123 Milano, e-mail: jakobgrazzini@gmail.com Matteo Richiardi University of Turin, Department of Economics and LABORatorio Revelli, Collegio Carlo Alberto, via Real Collegio 30, 10024 Moncalieri, Torino e-mail: matteo.richiardi@unito.it Lisa Sella Ceris - CNR, via Real Collegio 30, 10024 Moncalieri, Torino e-mail: lisa.sella@unito.it A Teglio et al (eds.), Managing Market Complexity: The Approach of Artificial Economics, Lecture Notes in Economics and Mathematical Systems 662, DOI 10.1007/978-3-642-31301-1_19, © Springer-Verlag Berlin Heidelberg 2012 237 238 Jakob Grazzini, Matteo Richiardi and Lisa Sella this equation as an individual probability of adoption, which depends on the number of linked agents that have already adopted Our work contributes to the still sparse literature on the structural estimation of AB models Indeed, this is identified as a key weakness of AB models: AB models often remain at a theoretical level and lack a sound empirical grounding [13] When present, this is often limited to some ad-hoc calibration of the relevant parameters However, estimation is crucial for the empirical validation of the model, for comparing the model with other available models, and for policy analysis The main reason for this state of affairs is that, even if AB models can be regarded as a set of mathematical equations [26], their properties remain hidden in the complexity of the relations among the many elements in the model The lack of an analytical formalization linking the behavior of the agents with the outcome of the system impedes a traditional approach to model estimation, and calls for computational methods These methods, known as simulation-based estimation techniques [37, 38], have been originally developed in the econometric literature to deal with analytical models leading to criterion functions without simple analytical expression (for instance because of integrals of large dimensions in the probability density function or in the moments) Their application to AB models, however, is not straightforward Consequently, only a handful of examples exist on the structural estimation of AB models Winker, P and Gilli, M [15, 39] estimate respectively and parameters of an AB model of the foreign exchange market introduced by Kirman, A [22, 23], by employing the method of simulated moments (MSM) Their focus is on optimization heuristics In [40] they deal with the problem of moments selection, and propose a set of statistics on exchange rate returns to estimate models of exchange rate In [17] the consistency of the MSM estimator applied to agent-based models is investigated The MSM is only one among the many simulation based econometric techniques that can be used, but it is relatively simple and intuitive and therefore it gained popularity in the AB modelling community.1 However, it is still considered by many more or less as a black box By means of Montecarlo experiments on our illustrative model, we aim at opening up this black box The chapter is structured as follows Section 19.2 describes the original Bass model Section 19.3 describes our AB version of the Bass model Section 19.4 gives a brief overview of the estimation strategy, which is explained in more details in our companion paper Section 19.5 focuses on the small sample properties of the estimators, and describes the origins of the bias Section 19.6 concludes The use of other techniques is even more limited Boswick, H.P et al [6] estimate, by means of a non-linear least square method, a dynamic asset pricing model characterized by agents with heterogeneous beliefs Dancik, G M et al [9] use a Gaussian Process emulator of scalar computer model output for sensitivity analysis, (Bayesian) calibration, and model comparison Their methodology is relevant for models that are expensive to run, in money or time, and for which the number of possible evaluations is therefore limited Finally, Alfarano S et al [2, 3] estimate AB models that are simple enough to derive a closed form solution for the distribution of relevant statistics 19 Small sample bias in MSM estimation of agent-based models 239 19.2 The Bass model The Bass model [4], which provides a mathematical explanation of the different stages of product adoption described in the seminal work by Everett Rogers [34] (innovators, early adopters, early majority, large majority, and laggards), and formalizes the crucial distinction between innovators and imitators, is considered as one of the most important empirical generalization in marketing, and it is widely used in sales and technology adoption analysis The model is an example of early epidemic models of innovation diffusion [14] It consists of a differential equation that specifies the rate of adoption h(t) as a function of an external force and an internal (endogenous) one The external influence is constant over time and represents the effects of advertisement, while the internal influence depends on how many others have already adopted at time t and formalizes word-of-mouth: h(t) = p + qF (t) (19.1) where F (t) = N (t)/m is the c.d.f of adopters, that is the ratio of those who have already adopted (N (t)) over the number of potential adopters (the market potential m) p is the parameter for external influence and q is the parameter for internal influence, with p + q < 1.2 The internal influence in the Bass model operates as a mean field force over the whole population of potential adopters: every individual is connected to every other individual in the population At the beginning the adoption is slow since the number of agents that have already adopted is small and therefore the interaction term is negligible Once the number of adopters starts to increase, the probability of adoption for those who have not already adopted (the population at risk) increases and the diffusion gets faster As the population at risk gets smaller, the number of new adopters decreases until the diffusion process is completed The diffusion dynamic follows a typical S-curve The model is deterministic and thus requires some sort of adaptation to be taken to the data The literature on the estimation of the Bass model has followed two strategies The most popular is to add a noise to the aggregate pattern of adoptions predicted by the model [4, 6, 21, 36] We call this approach the macro approach The noise is meant to catch not only sampling variability and measurement errors, but also specification errors The properties of the noise determine the properties of the estimators What is most important here, however, is that the estimators that have been proposed following this approach are not even consistent, given that (i) convergence cannot be obtained by letting the observation period grow, because the process is finite and saturation (that is, full adoption) is sooner or later obtained, and (ii) convergence cannot be obtained neither by letting population size grow, because the This specification of the hazard function had already been introduced to characterize innovation diffusion processes prior to Bass’ work [8,30] However, empirical applications were scant, because knowledge of the number of potential (and ultimate) adopters m was required to compute F (t) Bass contribution was to express the adoption ceiling as a parameter, which could be estimated together with p and q using aggregate sales data 240 Jakob Grazzini, Matteo Richiardi and Lisa Sella noise is added directly to the aggregate outcome A second strategy is to consider the adoption process as a duration model assuming equation 19.1 specifies an homogeneous hazard rate for all individuals in the population [35] We call this approach the micro approach In this case the only source of variability comes from sampling errors, while the model is assumed to be correctly specified The corresponding ML estimator is consistent in population size 19.3 The AB version We identify two main shortcomings in the literature we have briefly reviewed above: the macro approach gives raise to inconsistent estimates, while the micro approach is not able to account for the discrete nature of many diffusion processes We now elaborate on the latter issue Our model shares with the micro approach the same interpretation of equation 19.1 as an individual probability of adoption, conditional of being still at risk, but considers that adoption can take place only at discrete time intervals, rather than continuously This is more appropriate for many applications (think for instance of movie attendance, where most individuals go the cinema on Saturday night and in any case not on a 24/7 basis) Even when the process is indeed continuous, information on cumulative adoption generally becomes available only at discrete time intervals, which in our modelling framework makes the decision to adopt essentially discrete In other words, the kind of mean-field interaction assumed in the Bass model requires that information is centrally collected and then diffused Individuals have to rely on data collection by some statistical agency to take their decisions —exactly as the researcher does to analyze those decisions and estimate the parameters of the model If data release coincides with the information release on which individuals take their decisions (which is quite plausible if the network structure is highly connected), a discrete framework is more appropriate However, the micro approach assumes a continuous duration model On the other hand, our estimation strategy is tailored to the discrete nature of the process 19.4 Estimation Let’s consider an homogeneous population of m individuals, where the individual hazard of adoption is given by eq 19.1 As standard in this literature, we assume that the individuals act independently of each other within each time interval In [18] we develop estimators for p and q as a function of m, and show that these estimators are unbiased, consistent and asymptotically normal for large populations m We then propose a MSM estimator [11, 24, 31, 33] to estimate the market potential m, which minimize the distance between the observed moment τr (which is given) and the simulated moment τs (m), obtained by simulating the adoption time of m individuals 19 Small sample bias in MSM estimation of agent-based models 241 Fig 19.1: Average adoption time for the adopters (τ (T, m)), different values of m Other parameters: p = 0.03, q = 0.4, T = 10 Ten artificial adoption sequences are simulated for each value of m For each sequence, 10 replications of the estimation procedure are performed, with different pseudo-random numbers For each set of estimated parameters, τ (T, m) is computed The graph reports average values with ht = pˆ(m) + qˆ(m)Nt−1 /m The moment we use is the mean adoption time for those who have adopted in the observation period: τ (T, m) = Nt T (tnt ) (19.2) t=0 Figure 19.1 shows how the moment responds to changes in m, for fixed values of the other parameters For each value of m, τ (T, m) is a random variable Figure 19.2, which depicts its skewness, shows that it is not significantly different from The distribution is 242 Jakob Grazzini, Matteo Richiardi and Lisa Sella Fig 19.2: Skewness of the τ (T, m) distribution, different values of m Other parameters: p = 0.03, q = 0.4, T = 10 Ten artificial adoption sequences are simulated for each value of m For each sequence, 10 replications of the estimation procedure are performed, with different pseudo-random numbers For each set of estimated parameters, τ (T, m) is computed The graph reports the skewness of the conditional distributions τ (T, m|m) therefore (almost) symmetric, a property that will turn out to be important in understanding the direction of the small sample bias In facts, our final estimators for m, p and q are consistent but subject to a small sample bias, although not large Preliminary findings show that, if the process is 19 Small sample bias in MSM estimation of agent-based models 243 indeed discrete, they perform very well with respect to the other estimators proposed in the literature, which also suffer from small sample bias.3 19.5 Small sample bias Where does the small sample bias come from? Figure 19.1 contains the answer The theoretical moment is not linear in m If the observed moment, which is a random variable, is symmetric and centered around the theoretical moment, we have E[τ −1 (m) = m] (19.3) The direction of the bias depends on the sign of the first and second derivatives of the moment, at the true value of the parameter (see also [17]) For example, if the first derivative is positive, a positive second derivative implies that the moment is accelerating in m: it is less steep at the left than at the right of the true value of the parameter Therefore, a low realization of the moment τL leads to a very low inferred value of the parameter m ˆ L = τ −1 (τL ), while a high realization τH leads to a not-so-high inferred value m ˆ H = τ −1 (τH ), with E[m ˆ L, m ˆ H ] < m We get a downward bias Figure 19.3 illustrates the possible cases Given the shape of the mean adoption time for the adopters (figure 19.1), an upward bias is expected for m ˆ in small samples, that is exactly what we get from the Montecarlo analysis The bias in the other parameters is consequential: an upward bias in m ˆ implies a downward bias in pˆ and qˆ, given that the simulated penetration rate F (t) is lower than the true (but unobserved) one The bias vanishes as the population of potential adopters increases because with a higher number of adopters the uncertainty over their mean adoption time reduces: the mean adoption time converges to its theoretical value Therefore, any extraction of the real data would produce the same mean adoption time, and the problem outlined above disappears 19.6 Conclusions In this paper we have shown an application of simulation-based econometric techniques to the estimation of AB models The model chosen for the demonstration is important both because innovation diffusion is a wide area of application of AB models [10] and because the model has been widely studied in its analytical form However, the estimation strategies proposed in the literature have either poor properties, or are limited to the case of a continuous diffusion process Conversely, our three-stage estimator assumes a discrete process, that converges to a continuous one Moreover, most estimators based on the macro representation of the diffusion process are not even consistent (see our companion paper [18] for a discussion) ... http://www.springer.com/series/300 Andrea Teglio • Simone Alfarano Eva Camacho-Cuena • Miguel Ginés-Vilar Editors Managing Market Complexity The Approach of Artificial Economics Editors Andrea Teglio Assoc Prof Simone... around the concept of complexity In economics, complexity is not simply a matter of things being “complicated”, although some may view it this way, but it is referred to markets that exhibit and... characteristics that are used to define complexity The concept of complexity in economics emerged historically in the fields of game theory and financial markets, where the “nearly archetypal example”