Home Download Help Forum Resources Extensions FAQ NetLogo Publications Contact Us Donate Models: Library Community Modeling Commons Beginners Interactive NetLogo Dictionary (BIND) NetLogo Dictionary User Manuals: Web Printable Chinese Czech Farsi / Persian Japanese Spanish

NetLogo User Community Models(back to the NetLogo User Community Models)
WHAT IS IT?
This program is simplified version of the one used for the work on Suhadolnik et al. (2010). If stock markets are complex, monetary policy and even financial regulation may be useless to prevent bubbles and crashes. On this study, we suggest the use of robot traders as an antibubble decoy. To make our case, we put forward a new stochastic cellular automata model that generates an emergent stock price dynamics as a result of the interaction between traders. After introducing socially integrated robot traders, the stock price dynamics can be controlled, so as to make the market more Gaussian.
We set the stochastic cellular automata model to study the stock price dynamics where the interactions between the market participants play a key role. Initially, there are only agent traders representing humans, and subsequently, robot traders enter the market. The traders are represented by cells on a twodimensional L x L grid. There are N traders who can either buy or sell only one share, and these are two mutually exclusive states. At any given time step t, the population of traders N is divided into two distinct groups of buyers Nb and sellers Ns.
The stock market dynamics emerges as a result of the synchronous update of cells, according to a local probabilistic rule. Here, traders consider the information related to the behavior of their neighbors (Moore neighborhood) and also that related to the “fundamentals”. More details about the model can be found on Suhadolnik et al. (2010).
HOW TO USE IT
 Setup settings:
The "setupblank" button sets the grid only with agent sellers and the robot sellers according to the density set in the "robotsinitialdensity" slider.
If you want to draw your own pattern, use the "Addindividually" button and choose what kind of trader you want to add in the "Add" chooser. Then use the mouse to draw in the grid.
The "buyersinitialdensity" slider determines the initial density of buyers when using the "setuprandom" button. The same applies to the "robotsinitialdensity" slider which determines the density of robots in the grid.
The "obsinidiscard" input determines how many observations are discarded from the initialization of the model.
Turn the "fixseed?" switch on to keep the random seed fixed across different experiments that you run. The random seed could be set in the "randomseedno" input.
Notice that you could also choose the colors used in the grid to represent each kind of trader using the color buttons below the grid.
 Model parameters:
mi  parameter tracking the speed at which the strategy switches from imitation to fundamental.
lambda  parameter modulating a trader’s response based on the difference between the fundamental value and the current price of the stock.
k  parameter controlling the intensity of the response of the traders to their neighbours states. When k=1, the probability of buying is proportional to the number of neighbors who have previously bought; this characterizes a weak linear response. Large values of k represent strong responses.
See the paper for a detailed description of the model.
 Running the model:
The "goforever" button runs the model until it achieves the "rununtilnobs". The "goonce" button runs the model only once observation.
THINGS TO TRY AND NOTICE
1  Setup randomly the distribution of agent traders into the grid without robots, also using a fixed random seed. Then run it until you find some extreme events (outlier returns). Notice the shape of the final distribution of returns. Is it gaussian?
2  Once you have identified and extreme event, parameterize the model to stop some periods before it (use the "rununtilnobs" input) and then run the model stepbystep (use the "goonce" button). What happens in the grid previous to the extreme events?
3  Setup the model again using the same configurations, but put some robots on the grid (let's say about 20%). Run the model for the same number of steps. Have you found any extreme event? How does the distribution looks like this time?
4  Experiment with different values for the model parameters.
EXTENDING THE MODEL
 This model might be easily extended so as to have heterogenous agents regarding the fundamental value of the stock, or the model parameters.
 The market clearing mechanism could have an additional parameter inserted into the hyperbolic tangent function.
 Other neighborhoods concepts might be used (e.g.: Von Neumann).
 An interesting study might arise from experimentations using diferent grid sizes. Notice that the number of cells (agents) in the grid actually determines the heterogeneity of the returns magnitudes.
 Simplifications to the model specification could be tried. What if we fix the weight ascribed to either strategy instead of the endogenous formulation proposed in the paper?
 Can you think about other rules for the robots? What if they could move through the grid?
REFERENCES
 Suhadolnik, N., Galimberti, J. and Da Silva, S. (2010) "Robot traders can prevent extreme events in complex stock markets", Physica A: Statistical Mechanics and its Applications, DOI: 10.1016/j.physa.2010.07.025.
A working paper version for this article could be found at:
PROGRAM DETAILS
Author: Jaqueson Kingeski Galimberti 
(back to the NetLogo User Community Models)