IDEAS home Printed from
   My bibliography  Save this paper

Sum: A Surprising (Un)Realistic Market - Building A Simple Stock Market Structure With Swarm


  • Pietro Terna

    (Universit di Torino)


With SUM, a Surprising (Un)realistic Market, we are dealing with the micro-foundations of a stock market. We avoid any artificially simplified solution about price formation, such as to employ an auctioneer to clear the market; on the contrary, our model produces time series of prices continuously evolving, transaction by transaction. The core of the model is represented by a computational structure that reproduces closely the behavior of the computerized book of a real stock market. The agents send to the book their buy and sell orders, with the related limit prices. The book executes immediately the orders if a counterpart is found in its log; otherwise, it records separately the buy and sell orders, to match them with future orders. The book is cleared at the beginning of each day. Our (un)realistic market emerges from the behavior of myopic agents that: (i) know only the last executed price, (ii) choose randomly the buy or sell side and (iii) fix their limit price by multiplying the previously executed price times a random coefficient. This structure generates increasing and decreasing price sequences with relevant volatility. Also bubbles and crashes appear in this market, generated within the market structure, without the need of exogenous explanations. In this framework, we then relax hypothesis (i) for a small quota of the agents, in order to investigate the consequences of the presence either of subjects using technical trading rules to forecast the future market prices and of cognitive agents capable to learn from their experience. In some way, the last ones can correspond to the artificially intelligent agents behaving as econometricians proposed by Sargent (1993). More generally, within this model we can investigate empirical puzzles that are hard to understand using the traditional representative agent structure. Among these puzzles, the time series predictability and the volatility persistence. Swarm represents for our task the correct developing framework: it provides a multilayer structure and offers the computational power needed to run the experiments for a sufficient number of cycles. Here the multilayer structure contains: (i) the observer layer, that shows the results, and (ii) the model layer, that runs either the time schedule and the environment, with the stock market (realistic) book and the (unrealistic) agents.

Suggested Citation

  • Pietro Terna, 2000. "Sum: A Surprising (Un)Realistic Market - Building A Simple Stock Market Structure With Swarm," Computing in Economics and Finance 2000 173, Society for Computational Economics.
  • Handle: RePEc:sce:scecf0:173

    Download full text from publisher

    File URL:
    Download Restriction: no

    References listed on IDEAS

    1. Pietro Terna, 2000. "The "mind or no-mind" dilemma in agents behaving in a market," Advances in Complex Systems (ACS), World Scientific Publishing Co. Pte. Ltd., vol. 3(01n04), pages 257-269.
    2. Robert Axelrod, 1997. "Advancing the Art of Simulation in the Social Sciences," Working Papers 97-05-048, Santa Fe Institute.
    3. Nigel Gilbert & Pietro Terna, 2000. "How to build and use agent-based models in social science," Mind & Society: Cognitive Studies in Economics and Social Sciences, Springer;Fondazione Rosselli, vol. 1(1), pages 57-72, March.
    Full references (including those not matched with items on IDEAS)


    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.

    Cited by:

    1. Cappellini, Alessandro & Ferraris, Gianluigi, 2007. "Waiting Times in Simulated Stock Markets," MPRA Paper 7324, University Library of Munich, Germany.
    2. Alessandro N. Cappellini & Gianluigi Ferraris, 2009. "Waiting Times In Simulated Stock Markets," Advances in Complex Systems (ACS), World Scientific Publishing Co. Pte. Ltd., vol. 12(02), pages 195-206.

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Flaminio Squazzoni, 2010. "The impact of agent-based models in the social sciences after 15 years of incursions," History of Economic Ideas, Fabrizio Serra Editore, Pisa - Roma, vol. 18(2), pages 197-234.
    2. Matteo Richiardi, 2003. "The Promises and Perils of Agent-Based Computational Economics," LABORatorio R. Revelli Working Papers Series 29, LABORatorio R. Revelli, Centre for Employment Studies.
    3. Lilian N. Alessa & Melinda Laituri & C. Michael Barton, 2006. "An "All Hands" Call to the Social Science Community: Establishing a Community Framework for Complexity Modeling Using Agent Based Models and Cyberinfrastructure," Journal of Artificial Societies and Social Simulation, Journal of Artificial Societies and Social Simulation, vol. 9(4), pages 1-6.
    4. Christ of Zöllig & Kay W. Axhausen, 2012. "Assessment of infrastructure investments using agent-based accessibility," Chapters, in: Karst T. Geurs & Kevin J. Krizek & Aura Reggiani (ed.), Accessibility Analysis and Transport Planning, chapter 4, pages 54-70, Edward Elgar Publishing.
    5. Francis Tseng & Fei Liu & Bernardo Alves Furtado, 2017. "Humans of Simulated New York (HOSNY): an exploratory comprehensive model of city life," Papers 1703.05240,, revised Mar 2017.
    6. Christof Zoellig & Kay W Axhausen, 2011. "Calculating Benefits of Infrastructural Measures," ERSA conference papers ersa10p1354, European Regional Science Association.
    7. Johannes Dahlke & Kristina Bogner & Matthias Mueller & Thomas Berger & Andreas Pyka & Bernd Ebersberger, 2020. "Is the Juice Worth the Squeeze? Machine Learning (ML) In and For Agent-Based Modelling (ABM)," Papers 2003.11985,
    8. Jakub Bijak & Jason D. Hilton & Eric Silverman & Viet Dung Cao, 2013. "Reforging the Wedding Ring," Demographic Research, Max Planck Institute for Demographic Research, Rostock, Germany, vol. 29(27), pages 729-766.
    9. Roberto Aringhieri & Giuliana Carello & Daniela Morale, 2016. "Supporting decision making to improve the performance of an Italian Emergency Medical Service," Annals of Operations Research, Springer, vol. 236(1), pages 131-148, January.
    10. Ugo Merlone & Daren Sandbank & Ferenc Szidarovszky, 2013. "Equilibria analysis in social dilemma games with Skinnerian agents," Mind & Society: Cognitive Studies in Economics and Social Sciences, Springer;Fondazione Rosselli, vol. 12(2), pages 219-233, November.
    11. Günter Küppers & Johannes Lenhard, 2005. "Validation of Simulation: Patterns in the Social and Natural Sciences," Journal of Artificial Societies and Social Simulation, Journal of Artificial Societies and Social Simulation, vol. 8(4), pages 1-3.
    12. Andrew W. Bausch, 2014. "Evolving intergroup cooperation," Computational and Mathematical Organization Theory, Springer, vol. 20(4), pages 369-393, December.
    13. Ulfia A. Lenfers & Julius Weyl & Thomas Clemen, 2018. "Firewood Collection in South Africa: Adaptive Behavior in Social-Ecological Models," Land, MDPI, vol. 7(3), pages 1-17, August.
    14. Andrew Hoegh & Frank T. Manen & Mark Haroldson, 2021. "Agent-Based Models for Collective Animal Movement: Proximity-Induced State Switching," Journal of Agricultural, Biological and Environmental Statistics, Springer;The International Biometric Society;American Statistical Association, vol. 26(4), pages 560-579, December.
    15. Zhai, Xueting & Zhong, Dixi & Luo, Qiuju, 2019. "Turn it around in crisis communication: An ABM approach," Annals of Tourism Research, Elsevier, vol. 79(C).
    16. Hedström, Peter & Wennberg, Karl, 2016. "Causal Mechanisms in Organization and Innovation Studies," Ratio Working Papers 284, The Ratio Institute.
    17. Giovanni Dosi & Andrea Roventini, 2017. "Agent-Based Macroeconomics and Classical Political Economy: Some Italian Roots," Italian Economic Journal: A Continuation of Rivista Italiana degli Economisti and Giornale degli Economisti, Springer;Società Italiana degli Economisti (Italian Economic Association), vol. 3(3), pages 261-283, November.
    18. Lamieri, Marco & Bertacchini, Enrico, 2006. "What if Hayek goes shopping in the bazaar?," MPRA Paper 367, University Library of Munich, Germany, revised 21 Jun 2006.
    19. Matteo Richiardi & Ross E. Richardson, 2017. "JAS-mine: A new platform for microsimulation and agent-based modelling," International Journal of Microsimulation, International Microsimulation Association, vol. 10(1), pages 106-134.
    20. Tao Zhang & William J. Nuttall, 2007. "An Agent Based Simulation of Smart Metering Technology Adoption," Working Papers EPRG 0727, Energy Policy Research Group, Cambridge Judge Business School, University of Cambridge.

    More about this item


    Access and download statistics


    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:sce:scecf0:173. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F. Baum (email available below). General contact details of provider: .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.