Davoud Taghawi Nejad
HomeArticles and Press C.V.EmergenceBusiness CycleOther ProgramsFavorits


Technology shocks and trade in a network: How business
cycles emerge from the interaction of autonomous agents.

-- If you are not familiar with the concept of emergence or if you want to see a demonstration of emergence click here --

 

PowerPoint Presentation with animation

PDF Presentation  (If PP-presentation does not work)

 

In this paper I devised an agent-based computational microeconomics model of agents that trade in a networkof trading partners. I assume, that agents who have decreased profits change their trading partners. At fixed intervals a new production technology becomes available to an agent. Because the technological change leads to temporary inefficient trading networks, business cycles emerge.

The mechanism is the following: If an agent introduces a new technology he changes his trading pattern. As a result, some of his trade partners can have a decrease in profits. The agents who have lower profits start changing trading part-
ners, too. This affects other agents, who in turn start changing partners. In short, the technology shock triggers a snowball effect of agents changing their trading partners; the GDP decreases. When agents find new trading partners and regain their
profits the GDP increases.

The agent-based model was implemented in 1800 lines of object-oriented C++ code. The program generated a cyclical pattern and it could be rejected that the pattern is a random walk. It shows statistical properties which are similar to the patterns of the US GDP.

The Model

The model has three different ingredients: agents, factors of production and a
final good. There are four different types of agents. They differ only in the fact,
that they produce a different factor of production. There are four different types
of factors of production. The factors of production are used, by the agents, to
produce a final good. The final good is the medium of exchange of the economy.
An agent's wealth is the amount of final goods, he possess.
    The model is implemented as an agent-based computer program. In an
agent-based computer simulation every agent gets simulated, much like computer-
player in a computer game. As computer-players act and interact - play - with
each other and with the human player, agents perform actions and interact
(economically) with the other agents. So the agents in the program are actually
trading, producing and changing partners.
    The program runs over a number of rounds. In each round the agents exe-
cute a series of behavioral rules. Stage 1: each agent replenishes his factors of
production. He replenishes the factor of production that corresponds to his type
to 50 units. Further he replenishes each of the other three factors of production
to one unit. (rule 1). Then this product is traded in bilateral relations between
individuals (rule 2). Subsequentially the factors of production are used with a
Cobb-Douglas technology to produce the final good (rule 3). An agent pays a
fixed amount for every trading partner he has. (rule 4) Stage 2: If an agent
makes less profit than the year before, he deletes connections to unprofitable
trading partners and creates connections to new agents. They pay search costs.
(rule 5, 6 and 7) Agents do not change their partners every round, because
changing partners is costly. Stage 3: Agents draw randomly a new technology.
They implement this new technology, if their new technology is profitable. (rule
8) Changing the technology is also costly.
    The simulation is done by a 1500 lines object oriented program in C++
(plus 250 lines auxiliary code to produce the network graphs). Objects are
hybrid forms of code (functions) and variables. Agents are objects. The object’s
variables are the agent’s state information, such as his wealth, his set of trading
partners, his factors of production. The object's functions are the agent’s rules
of behavior. The agent's rules manipulate the agent's variables. In case of
trade they lead to interaction with other agents. When the rules are decisions,
then they take into account the agent's variables and the interaction with other
agents.
    In this model, as in most agent based models, all agents have the same func-
tions, but different variables and constants. Stated differently, everything else
equal they behave the same, but have different possessions, production capa-
bilities and trading partners. The agent object has a variety of state variables
and behavioral methods. An agent’s state information includes its type (what
factor of production he produces), his Cobb-Douglas function, the factors of
production he currently possesses and his wealth.

4.1       Agents

Each type of agent is ex-ante homogeneous. The only difference between the
agent types is that they produce different factors of production. The agents are
neo-classical in the sense that they optimize in a marginalist manner. Contrary
to standard neoclassical models, the agents do not trade on a central market and
have incomplete knowledge about the future. They do not know how the net-
work evolves and which new technologies will be developed in the future. Agents
maximize their wealth or equivalently maximize their profits, the net gains from
trade and production minus the costs of maintaining trade relationships.
    Agents have one constant and a set of variables that represent their type,
possessions and connections to trading partners. Further, agents have 8 behav-
ioral rules.

4.2       Rounds and Agents' actions

The simulation runs over several rounds, which consist of 7 sub-functions8 . In
every sub-round each agent, in sequential order, executes one rule. Except for
step 2 of stage 1, where rule 2 (Trade), gets executed 100 times alternatingly
in sequential and reverse order. In stage 3, the agents execute rule 6 and 7
respectively, only when rule 5 says so. The sub-functions are listed below; the
rules will be exposed in the remainder of this section.
    In the first stage, the network in which the agents operate is given. Therefore
the agents behave in this part like standard neoclassical agents. In the second
stage agents redesign their network. In the third stage they change technology.
    In each of the steps in the second and the third stage, agents have to de-
cide between two options. These dichotomous decisions are between adding a
trading partner or not, between deleting a trading partner or not and between
implementing a new technology or not. The agents decide between two options
by calculating the respective profits. In order to calculate the profits they go in
their “head” twice through stage 1, once, with and once without the considered
change.

Round

Stage 1
   1. Replenishment of the factor of production (Rule 1)
   2. Trade with trading partners (Rule 2 repeated 100 times in alternating
        order)
   3. Production of the final good (Rule 3)
   4. Paying the cost for trading partners (Rule 4)
Stage 2
   1. Ceasing connections with unprofitable trading partners (Rule 5 → Rule
      6)
   2. Establishing connections with new trading partners (Rule 5 → Rule 7)
Stage 3
   1. Changing technology. (Rule 8)

 


Files

Paper

PowerPoint Presentation with animation

PDF Presentation  (If PP-presentation does not work)

Simulation source and windows program

You can find an explanation how to run the simulation in"R E A D M E.txt" file in the zip file.
For the source code to be executed an application GRAPHVIZ must be installed.
The program was originally developed for Linux. The Windows version is merely a quick adaptation, but fully functional except for batch jobs.

 

 

 

 

 


Etomite »

Davoud Taghawi-Nejad

« Error »

Etomite encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
 
PHP error debug
  Error: mysql_connect() [function.mysql-connect]: Access denied for user 'taghawi_neja_1'@'r2web14.masterlogin.de' (using password: YES) 
  Error type/ Nr.: Warning - 2 
  File: /opt/users/www/taghawinweb69/html/taghawi-nejad.de/index.php 
  Line: 107 
  Line 107 source: if(@!$this->rs = mysql_connect($this->dbConfig['host'], $this->dbConfig['user'], $this->dbConfig['pass'])) {  
 
Parser timing
  MySQL: 0.0000 s s(0 Requests)
  PHP: 0.0301 s s 
  Total: 0.0301 s s