MODELLING INVESTMENT IN ARTIFICIAL STOCK
MARKETS: ANALYTICAL AND NUMERICAL RESULTS
Roberto da Silva
Departamento de Informática Teórica, Instituto de Informática,

arXiv:cs/0505001v1 [] 29 Apr 2005

Universidade Federal do Rio Grande do Sul.
Av. Bento Gonçalves, 9500, CEP 90570-051, Porto Alegre, RS, Brazil∗
Alexandre Tavares Baraviera
Instituto de Matemática, Universidade Federal do Rio Grande do Sul,
Av. Bento Gonçalves, 9500, CEP 91509-900, Porto Alegre, RS, Brazil†
Silvio Renato Dahmen
Instituto de Fı́sica, Universidade Federal do Rio Grande do Sul,
Av. Bento Gonçalves, 9500, CEP 91501-970, Porto Alegre, RS, Brazil‡

Abstract
In this article we study the behavior of a group of economic agents in the context of cooperative
game theory, interacting according to rules based on the Potts Model with suitable modifications.
Each agent can be thought of as belonging to a chain, where agents can only interact with their
nearest neighbors (periodic boundary conditions are imposed). Each agent can invest an amount
σ i = 0, ..., q − 1. Using the transfer matrix method we study analytically, among other things, the
behavior of the investment as a function of a control parameter (denoted β) for the cases q = 2
and 3. For q > 3 numerical evaluation of eigenvalues and high precision numerical derivatives are
used in order to assess this information.
keywords: Game Theory; statistical mechanics; transfer matrix methods.

∗
†
‡

Electronic address: rdasilva@inf.ufrgs.br
Electronic address: baravi@mat.ufrgs.br
Electronic address: dahmen@if.ufrgs.br

1

I.

INTRODUCTION

Consider a game where N players can invest their money (up to some upper limit) on
some public–fund asset. The fund manager, as a rule, doubles the amount of money received
and divides it equally among all N investors. Depending on the total amount each player
invested, some might end up making a profit while others may lose money. Assume that
players have no information whatsoever about their co-players’ moves. The question is:
what is the best move a player can make? If we adopt one of the tenets of classical game
theory, namely that players are completely rational, then there are two possible solutions
to the problem which maximize profit (when all invest the maximum amount possible, thus
doubling their initial capital) or minimize losses (no one invests anything). In the real
world however people are not rational in the sense of classical game theory and factors as
expectations about the behavior of other players or some sort of insider information might
play a role when deciding how to invest.
The irrationality of market agents is one of a myriad of factors which account for the
high complexity of financial markets and the difficulty in modelling them. Markets may also
be affected by political turmoil, unseasonable weather variations and the like. In the past
few years models have been introduced in order to throw some light into the behavior of
markets, mainly with aims at forecasting long-term behavior see for example [3, 4]. These
models, which have the advantage of being either analytically or numerically treatable and
usually use some kind of data input from real markets, are nonetheless unable to take into
account the human factor in decision-making scenarios. To circumvent these difficulties a
new approach, inspired on the ideias of statistical mechanics has been suggested [5], where
one extends the set of causal factors in decision–making scenarios from the individual–
specific to group determinants of behavior: players’ decisions are not market–mediated but
rely on group–level influences.
With these ideias in mind our aim in this work is to extend the model for the game
discussed above through the introduction of cooperation, i.e. we allow agents to have partial
information on the decision of its immediate neighbors, in a way to be described precisely in
what follows. Furthermore, we allow for some kind of randomness, the only thing known a
priori being the probability of some decision, and not the decision itself. In this way we hope
to describe the average behavior of a large group of agents without entering in the details
of a realistic (and certainly very difficult) theory on psychological state of each agent.
Our main interest will be to see how is the average behavior of a (large) group of cooper2

ative economic agents. Each agent, labelled by the index i, is allowed to invest an amount
σ i . Before the investment, the agent i exchange information with agent i + 1 (defined as the
neighbor of i; this concept is symmetric, i.e., i is also neighbor of i + 1). Based on that information agents make decisions as to how much they will invest according to some probability
distribution parameterized in terms of a two real variables: J and β. The first measures how
strongly people interact with each other (group–level influence) while the later is a measure
of how strongly a player might deviate from the group. To model this we choose a suitably
defined function which measures the probability of i investing σ i given that i + 1 would like
to invest σ i+1 . In a way to be precisely formalized later, β allows us to change the expected
behavior of each agent.
The paper is organized as follows: In section 2 we explain the model and make the
connection with statistical mechanics. Using the standard transfer matrix technique[8] we
analyze in section 3 some integrable cases (q = 2 and q = 3) in order to gain information
about how the average investment changes as a function of β. In section 4 we numerically
evaluate the evolution for q ≥ 4. We introduce a method for calculating the investment using

derivatives of the biggest eigenvalue, which is based on the use of 5 points in a graphic. We
finish the paper with some conclusions and perspectives.

II.

FORMULATING THE PROBLEM: THE POTTS MODEL

We consider an ensemble of N agents, where each can invest an amount σ i ∈ {0, 1, . . . , q−

1}, q a fixed integer. This restriction on q has been made for the sake of clarity. The

methods employed can be easily generalized to the case where σ i ∈ {d0 , . . . , dq−1 }, the di ’s

being arbitrary real numbers.

The families of conditional probabilities, i.e. the probability that i + 1 would invest σ i+1
given that i invested σ i are chosen as


P (σi+1 |σ i ) = c exp −β · J(σ i ) · δ σi ,σi+1 .

(1)

Our motivation for this particular choice comes from physics, where this probability is
interpreted as that of two variables (called classical spins) σ i and σ i+1 being equal or having
different values. It depends on two physical parameters: J(σ i ) is the so–called interaction
strength. This is in most cases a material–dependent quantity and accounts for the different
collective properties materials may exhibit (ferromagnetic, antiferromagnetic, etc.). β is
proportional to the inverse temperature T −1 and brings about entropic effects (ordered
3

states for low temperatures and disorder for high temperatures). Being proportional to
a temperature, in physical systems β is always non negative, and we likewise assume our
β ≥ 0.

In general J and β can be seen as competing terms: J is associated to the energy cost of

a given spin configuration. For J > 0 (< 0) a configuration where spins are equal (different)
has a higher energy than the opposite configuration, which means that it is energetically
more favorable to be non–magnetic (or ferromagnetic); on the other hand, the temperature
β −1 tends to destroy magnetic order. Transposing these ideas to the financial context can
say that J(σ i ) measures how strongly people respond to their neighbors’ moves, that is if
they are susceptible to the influence of other players or not. In this sense it models distinct
profiles of investors, which can go from agressive (does not go along “with the pack”) to
conservative (does what others do). β is a measure of the strength of individual response and
independent of what others do. Social scientists refer to this term as the “individual–specific
random” and “unobservable” (from the point of view of the modeler) since it is associated
to personal beliefs [5].
With the neighbor-to-neighbor interaction rule introduced above we can describe the
behavior of the whole group: The first important quantity which needs to be defined is the
joint probability density (j.p.d), P (σ1 , σ 2 , ..., σN ) of a particular investment configuration
σ ≡ (σ 1 , σ 2 , ..., σ N ) of a group. The quantity invested is defined through
L(σ) = σ 1 + σ 2 + ... + σ N

(2)

and we would like to obtain the average value of L.
To calculate the j.p.d we may adopt a recursive formulation without any loss of generality:
we take the investment of the first agent to be exactly σ 1 , i.e., P (σ 1 ) = 1 and from that
derive the quantity we want. With this “boundary condition” on P (σ1 ) we have the following
theorem:
Theorem 1 The probability distribution P (σ1 , σ2 , ..., σN ) can be written as a product form
P (σ1 , σ 2 , ..., σ N ) =

N
−1
Y
i=1

P (σi+1 |σi )

(3)

with P (σi |σ i−1 , ..., σ 1 ) = P (σi |σ i−1 ) for i = 1, ..., N.
Proof. ¿From the definition
P (σ N |σ1 , σ 2 , ..., σ N −1 ) =
4

P (σ 1 , σ 2 , ..., σ N )
P (σ 1 , σ 2 , ..., σ N −1 )

(4)

Considering the hypothesis P (σN |σ 1 , σ2 , ..., σN −1 ) = P (σN |σN −1 ) we thus have
P (σ 1 , σ 2 , ..., σ N ) = P (σ1 , σ 2 , ..., σ N −1 )P (σN +1 |σ N ) .

(5)

and applying this recursively:
P (σ 1 , σ 2 , ..., σ N ) = P (σ1 , σ 2 , ..., σN −1 )P (σN |σ N −1 )
= P (σ1 , σ 2 , ..., σN −2 )P (σN −1 |σ N −2 )P (σN |σ N −1 )
= P (σ1 )

NQ
−1
i=1

P (σi+1 |σi ) =

According to equations (1) and (3) we have
"

P (σ1 , σ 2 , ..., σ N ) = cN exp −β

N
−1
X
i=1

NQ
−1
i=1

P (σ i+1 |σ i )

J(σ i ) · δ σi ,σi+1

#

where cN is the normalization constant defined before and such that
q−1
X dX

dq−1

dq−1

σ1 =d0 σ 2 =d0

A.

...

X

P (σ1 , σ2 , ..., σN ) = 1

.

σ N =d0

Investment formulas and the Potts model

The Potts hamiltonian of N interacting spins under the action of a magnetic field D is
given by [6]
H (σ) =

X

J(σ i )δ σi ,σj + D

N
X

σi.

(6)

i=1

hi,ji

The fact that the total investment L (2) is mathematically the same as the magnetization
of the Potts hamiltonian (6) means that we may directly transpose the techniques and ideas
of statistical mechanics into the financial scenario.
The probability density function for the system to present a specific investment value L
is given by
P (L) =




Z −1 exp [−βH(σ)]

 N



0

5

if

otherwise

L=

PN

i=1

σi
(7)

where ZN (β), the normalization constant, is a sum over all possible configurations
X

ZN (β) =

exp [−βH (σ)] .

(8)

σj =0,...,q−1

and is known as the partition function.
Our aim is to describe how the investment depends on β, given a fixed set of parameters
J(1), J(2), ..., J(N). For this purpose, let us consider the expected value of L according to
the distribution (7), i.e.
1
hL (σ)i =
Z

N
X

X

σ j =0,...,q−1

i=1

!

σ i exp [−βH (σ)] .

For the sake of those not familiar with the methods of statistical mechanics, we briefly
discuss how in our analogy between spin systems and economic games quantities of interest
can be calculated:
1. The term D

N
P

σ i is introduced for convenience since investment per capita is

i=1

calculated through the formulae
l(β) =

1
1 ∂
hL(β)i = −
log ZN (β)
N
βN ∂D

,
D=0

which is the analogue in statistical mechanics to the average spontaneous magnetization. It clearly obeys the inequality 0 ≤ l ≤ q − 1.
2. As previously discussed, investment depends essentially on the way how neighbors
cooperate, i.e. the distribution J(0), J(1), ....J(q − 1) defines the kind of profiles

investors have.

The first question one might ask would be: what is the behavior of the per capita investment l(β) at β = 0 and β → ∞ ? One may describe these limits in a straightforward
manner:

Theorem 2 The per capita investment is such that
l(0) =

q−1
;
2

l(∞) = σ min if Jmin satisfies the inequality Jmin < Jk for all k = 0, . . . , min − 1, min +

1, . . . , q − 1.

6

Proof. The probability of a given state σ = {σ i }N
i=1 is
P (σ) =

e−βH(σ)
;
ZN (β)

For β = 0 all states are equiprobable since, from the equation above, the probability does
not depend on σ; hence, the probability of each state is 1/q N . For simplicity we assume that
q N is even, the odd case being left to the reader. The per capita investment can be written
as

N (q−1)
X
1
l(0) =
(number of states with sum = i)i
Nq N i=0

We can see that the number of states corresponding to the sum i is the same as the number
corresponding to the sum N(q − 1) − i. Then,
1
l(0) =
Nq N

N (q−1)/2

X
i=0

(number of states with sum = i)N(q − 1) =
1
qN
q−1
N(q
−
1)
=
N
Nq
2
2

since the number of states with sum between 0 and N(q − 1)/2 correspond to (q N )/2.
is

For arbitrary values of β let us call σ M = {σ min }N
i=1 . Then, the probability of any state
e−βH(σ)

P (σ) =
P
e−βH(σM ) 1 + σ′ 6=σM

′

e−βH(σ )
e−βH(σM )



In the limit β → ∞, P (σ) = 0 except for the state σ M , where P (σ M ) = 1.

Notice that

the case where mini Ji is reached in more than one point is not covered by the theorem.
In the next section we give a case by case description of investment as a function of β.
To do this we adapt transfer matrix method to our model. Contrary to spin systems, in
the present problem nontrivial behavior appears, and this might lead to interesting new
possibilities in the scenario of economic games.

7

III.
A.

ANALYTICAL CASES
The two state model: q = 2 (Ising Model)

We start by considering the partition function (8)
Z =

P

···

P

···

σ 1 =0,1

=

σ 1 =0,1

P

σN =0,1



N
N
P
P
β
exp −β
J(σ i )δ σi ,σi+1 − 2 D (σ i + σ i+1 )
i=1

i=1

N
P Q

σN =0,1 i=1

exp −βJ(σ i )δ σi ,σi+1 − β2 D(σ i + σ i+1 )



(9)

= T r MN
where σ N +1 = σ 1 (periodic boundary conditions are assumed) and the transfer matrix M is
given by


M =

exp (−βJ0 )

exp (−(β/2)D)

exp (−(β/2)D) exp (−βJ1 − βD)




It is possible to diagonalize M and write (9) in terms of eigenvalues λ1 and λ2 of M in a
simple way
N
ZN (β, D) = λN
1 + λ2

(10)

These eigenvalues are given by
λ1,2 (β) =
with

 √ i
1 h −βJ0
e
+ e−Dβ−βJ1 ± Θ
2

Θ = 4e−Dβ + e−2(βJ0 ) + e−2β(D+J1 ) − 2e−β(D+J0 +J1 )
Ji = J(i)

i = 0, 1 .

One can now write
1
l(β) = − βN

∂
∂D

N
log λN
1 +λ2



D=0

∂
∂
λ1 + Nλ2N −1 ∂D
λ2
Nλ1N −1 ∂D

= −

1
1
N
βN (λN
1 +λ2 )

= −

1
1 1
[ ∂ λ
β λ1 (1+(λ2 /λ1 )N ) ∂D 1

8

∂
+ ( λλ21 )N −1 ∂D
λ2 ]



D=0

D=0

In the limit of a large group of agents (N → ∞) the expression above converges to
l(β) = −

1 1 ∂
λ1
β λ1 ∂D

(11)
D=0

An explicit calculation gives
l(β, J0 , J1 ) =

4e2βJ1

√
−eβ(J1 −J0 ) + 2e2βJ1 + 1 + ∆
√
√
− 2eβ(J1 −J0 ) + e2β(J1 −J0 ) + eβ(J1 −J0 ) ∆ + ∆ + 1

where
∆(β, J0 , J1 ) = 4e2βJ1 − 2eβJ1 e−βJ0 + e−2βJ0 e2βJ1 + 1 .

(12)

A few remarks can be drawn from these equations:
1. With the explicit expressions of the eigenvalues one can easily show that
l(β = 0) =

1
2

independently of the values of J0 and J1 (as expected from the last theorem).
2. When J0 = J1 one has ∆ = 4e2βJ0 and

l(β) = 1/2 for all β ∈ R
The other important limit l(β → ∞) has an explicit Ji dependence that can be summarized
below:

l(β → ∞) =





















1
2

ifJ0 > J1 > 0 or

1

ifJ1 < J0 < 0 or J1 < 0 and J0 > 0

0

ifJ0 < J1 < 0 or J1 > 0 and J0 < 0

J1 > J0 > 0

This result follows from the expression for l(β, J0 , J1 ) above. At this point we would
like to make an important comment on the mean value of Ji . More specifically we are
interested in the positivity or negativity of Ji for this tells us to what extent agents are
cooperating and the probability of their making investments.For example, if J0 > 0 and
J1 < 0, the probability of two neighbors investing the same σ i = 1 is greater than the
cojoint investment of σ i = 0.
This behavior can be better seen in Figs. 1 and 2. The first one depicts investment as a
function of β for the ratio J0 /J1 > 0. In the second figure the sign of this ratio is reversed.
9

1
0.9
J1 < J0 < 0

Investiment

0.8

J0 / J1 > 0

0.7
0.6

J0 > J1 > 0

0.5
0.4

J1 > J0 > 0

0.3
0.2
J0 < J1 < 0

0.1
0
0

1

2

3

β

4

5

6

FIG. 1: Investment as function of β. Case J0 /J1 > 0, q = 2.

These clearly show how investment behavior (how agents cooperate) is drastically modified
as a function of the profit and depends not only on cash flow (cash receipts minus cash
payments over a given period of time).
1
J0= 1 and J1 = −2

Investment

0.8

J0= 2 and J1 = −1

0.6

0.4

J0= −1 and J1 = 2

0.2
J0= −2 and J1 = 1

0
0

0.5

1

β

1.5

2

FIG. 2: Investment as function of β to q = 2, case J0 /J1 < 0

10

B.

The three state model: q = 3

In this case we have the following transfer matrix:


−βJ0
−βD/2
−βD
e
e
e



 −βD/2 −β(J1 +D)
M =e
e
e−3βD/2 


−βD
−3βD/2
−β(J2 +2D)
e
e
e

The problem of computing eigenvalues is analytically tractable for general values of set

{J0 , J1 , J2 } but the expressions obtained are generally very difficult and do not improve our

understanding of the problem. However some interesting sub-cases can be considered:

1.

Case 1: J0 = J1 = 0 and J2 = J

In this case by making the change of variables
x = e−βJ and y = e−βD/2
we arrive at



1 y

y2







M =  y y2 y3 


2
3
4
y y xy

(13)

One may clearly see that in this matrix the second row is obtained from the first through
multiplication by y. Hence detM = 0 and therefore M admits 0 as an eigenvalue. One may
thus compute analytically the other eigenvalues by solving the equation
λ2 − (1 + y 2 + xy 4 )λ + (x − 1)(y 4 + y 6) = 0,
where the largest eigenvalue is
λ=

√ 
1
1 + y 2 + xy 4 + ∆
2

Here we have
∆ = 2y 2 + 5y 4 + 4y 6 − 2xy 4 − 2xy 6 + x2 y 8 + 1 ⇒ ∆(D = 0) = 12 − 4x + x2

11

and so
l(β) = −
=

=

1 ∂λ ∂y
βλ ∂y ∂D

D=0

√1
(2+x+ 12−4x+x2 )



2+e−βJ +

√

h
1 + 2x +

1
12−4e−βJ +e−2βJ





12−5x+2x2
√
12−4x+x2

−βJ

1 + 2e

i
+

12−5e−βJ +2e−2βJ
√

12−4e−βJ +e−2βJ



One may observe that two cases follow from theorem 3.1: β = 0 and β → ∞ when J < 0.
We have l(0) = 1 and if J < 0, l(β → ∞) = 2. But with the expression for l we can also
obtain results beyond the range of the theorem, for example, when J > 0. In this case
√ 

1
l(β → ∞) = 2+√
12 = 0.816 97 · · · .
1
+
12
2.

Case 2: J0 = J2 = 0 and J1 = J

In this case we have



2



1 y y




M =  y xy 2 y 3 


y2 y3 y4

The discussion is analogous to that of section (III B 1). The largest eingenvalue is given by
λ=

√ i
1h 4
(y + xy 2 + 1) + ∆ ,
2

with
∆ = 4y 2 + 2y 4 + 4y 6 + y 8 − 2xy 2 − 2xy 6 + x2 y 4 + 1 .
A straighforward calculation gives
l(β) = 1
Thus the investment is independent of the parameter J1 when J0 = J2 = 0.

3.

Case 3: J0 = J and J1 = J2 = 0

Now M takes the form



2



x y y




2
3
M = y y y 


y2 y3 y4
12

As before we have
λ=
with

√ i
1h
x + y2 + y4 + ∆
2

∆ = x2 + 4y 2 + 5y 4 + 2y 6 + y 8 − 2xy 2 − 2xy 4 = x2 + 12 − 2x − 2x = 12 + x2 − 4x
For l(β) we have the following expression
1

i
l(β) = h
√
e−βJ + 2 + 12 − 4e−βJ + e−2βJ

3+ √

12 − 3e−βJ



12 − 4e−βJ + e−2βJ

!

The case J > 0 is not covered by theorem 3.1. From the expression above we obtain
√
3 + 12
√
l(β → ∞) =
2 + 12
The only cases where one has analytical solutions are for q < 4. For other values of q one
has to employ numerical methods in order to gain some information, as we discuss in the
next section.

IV.

NUMERICAL ANALYSIS

For those cases which are not analytically treatable we can employ an algorithm that
combines a routine of numerical derivation with eigenvalues computing. To see how the
method work, we first consider the following matrix, written as a function of ξ:


e−β J0
e−β ξ/2
e−βξ
···
e−βξ(q−1)/2)



 e−βξ/2 e−β (J1 +ξ) e−3βξ/2 · · ·
e−βξq/2




M(ξ) = 
e−βξ
e−3βξ/2) e−β (J2 +2ξ) · · ·
e−βξ(q+1)/2 




.
.
.
.
.
..
..
..
..
..




−βξ(q−1)/2
−βξq/2
−βξ(q+1)/2
−β (Jq−1 +(q−1)ξ)
e
e
e
··· e

Let λξ be the largest eigenvalue corresponding to matrix M(ξ) and λ−ξ the one from M(−ξ).
If ξ << 1 one has:
∂λ
∂ξ

since

∞

D=0

λξ − λ−ξ X ξ (2k+1) λ(2k+1) (0)
=
+
2ξ
2(2k + 1)!
k=1

λξ = λ0 + λ′0 ξ +

ξ 2 ′′
λ
2 0

+

ξ 3 ′′′
λ
3! 0

+ ...
(14)

λ−ξ = λ0 − λ′0 ξ +
13

ξ 2 ′′
λ
2 0

−

ξ3 ′′′
λ
3! 0

+ ...

A numerical estimate to order ( O(ξ 2 ) ) is
∆(1) λ(ξ) =

λξ − λ−ξ
.
2ξ

A more refined numerical estimate can be obtained using not only two but four points λξ ,
λ−ξ , λ2ξ and λ−2ξ .
1.2

Theoretical
Numerical

l(β)

1.1

J1 = J2 = 0
J0 = J

ξ = 0.001
1.0

J0 = J2 = 0
J1 = J

J0 = J1 = 0
J2 = J

0.9

0.8
-2

0

2

4

6

β

8

10

12

14

16

FIG. 3: Investment as function of β to q = 3. A comparison of the numerical result with analitical
results.

Theorem 3 Consider a function λ ∈ C ∞ (R). A numerical approximation to order O(ξ 4 )

of λ′ (D) is given by

1
4
∆(2) λ(ξ) = − ∆(1) λ(2ξ) + ∆(1) (ξ)
3
3

Proof. Considering a Taylor expansion
λ2ξ = λ0 +

2ξλ′0

+ 4ξ

′′
2 λ0

and

(15)

λ′′0
λ
λ
− 8ξ 3 0 + 16ξ 4 0 + ....
2!
3!
4!

(16)

3!

+ 16ξ

(3)

λ2ξ = λ0 − 2ξλ′0 + 4ξ 2

(4)
4 λ0

+ ....

2!

+ 8ξ

(3)
3 λ0

4!
(4)

Combining the equations (14), (15) and (16), we obtain
2
(5)
8λξ − λ2ξ + λ−2ξ − 8λ−ξ = 12ξλ′0 − ξ 5 λ0
5
So
λ′0




4 λξ − λ−ξ
λ2ξ − λ−2ξ
−
+ O(ξ 4 )
=
4ξ
3
2ξ


14

which gives us

1
4
∆(2) λ(ξ) = − ∆(1) λ(2ξ) + ∆(1) (ξ)
3
3

To assess the applicability and performance of the method, we applied it to the integrable
q = 3 case with numerical results using 4–point derivative. In Fig. 3 we show how the
numerical results compare with the analytical ones. By using a higher number of points we
observe a significant difference on the results (see Fig. 4) over selected regions, as compared
to a lesser number.

A.

Numerical analysis for q > 3 considering distinct profiles of agents

In this section we analyze some numerical results for q > 3. We consider three possible
profiles:
1. aggressive or risk-prone agents: in this case the probability of an agent’s investment increase as a function of invested value. We modelled this through
J(σ i ) = −(σ i + 1) < 0,
where σ i = 0, ..., q − 1.
2. conservative agents: the probability of investment decreases as function of invested
value. In this situation
J(σ i ) = −(q − σ i ) < 0,
where σ i = 0, ..., q − 1.
3. random agents: the probability of the investment is randomly chosen for each agent,
such that
J(σ i ) = ⌊rand[0, 1] · q⌋
where rand[0, 1] is a random number uniformly generated in the interval [0, 1].
We generated plots with q = 10, 15, 20 for three different profiles. In Fig. 5, we show
the risk–prone (a) and conservative (b) profiles. From (a) we conclude that all agents are
inclined to invest the maximum quantity for β → ∞ since greater quantities are privileged

by the probability distribution. Differently, for (b) as β → ∞ , the investment of each agent
15

0.8173

(a)
2 points

0.8172

l(β)

4 points

0.8171

0.8170

0.8169
6

7

8

9

10

11

12

β

13

14

15

1.1835

(b)
1.1830

l(β)

2 points

1.1825

4 points

1.1820
6

8

10

12

β

14

1.00012

(c)

2 points
1.00008

l (β)

4 points

1.00004

1.00000
0

2

4

6

8

β

10

12

14

16

FIG. 4: Comparative numerical derivates for q = 3, using three points and five points. (a) J0 =
J1 = 0 and J2 = J; (b) J1 = J2 = 0 and J0 = J; (c) J0 = J2 = 0 and J1 = J.

goes to 0. We then may conclude that conservative agents lead to the situation of complete
stagnation as β → ∞ , independent of the number possibilities in the investment q. On the

other hand, risk prone agents lead the market to invest the maximum at this limit.

An alternative profile seems to be more appropriate: The random profile (3) was also
explored in an experiment using 12 seeds (12 different random choices of the string J(σ i ),
16

20
18

l(β)

16

q = 10
q = 15
q = 20

(a)

14
12
10
8
6
4

l(β)

0.0

0.1

0.2

β

10
9
8
7
6
5
4
3
2
1
0

0.3

0.4

0.5

(b)

q = 10
q = 15
q = 20

0.1

0.2

0.3

β

0.4

0.5

0.6

FIG. 5: Numerical results for the behavior of investiment as function of β for q = 10, q = 15 and
q = 20 for two diferent profiles: (a) agressive and (b) conservative.

i = 1...N) and q = 15 as depicted in Fig. 6 ). This figure represents the average over the
12 seeds. The behavior of seeds are not similar in the sense that they may yield different
values of investment at β → ∞.
V.

SUMMARY AND CONCLUSIONS

We have studied the investment behavior of a group of agents as a function of a parameter
that mimics the mean profit obtained by agents. Our results illustrated different situations
based on possible investors’ profiles. In a model where q represents the number of possible
investment amounts, we obtained analytical results for q = 2 and 3. For larger values of q we
performed a series of numerical simulations by combining exact diagonalization algorithms
with numerical derivatives.
Our results indicate that the behavior of each investor is key to determining the dy-

17

13

l(β)

12
11
10
9
8
7
0.0

0.1

0.2

β

0.3

0.4

0.5

11

l(β)

10
9
8
7
6
0.0

0.1

0.2

0.3

0.4

X Axis Title

FIG. 6: (a) Plot for 12 different seeds for q = 15; (b) mean value over the seeds.

namics of the market. As recent results in the context of agents’ simulation show [1], pure
mathematical models can capture some of the intrincacies of real markets when they, as
pointed out in [5], try to include real people’s idiosyncrasies (beliefs, sentiments, etc.) that
are known to play a significant role (not to mention other important influences as seasonable changes in production, political turmoil, and the like). Even though our model is still
mathematical, in the sense that it is based on a well known model of statistical mechanics
and we identify behavior in terms of known physical quantities, we believe that our ideas
might help indicate a way towards a more realistic market modelling.

18

Aknowledgments

The authors thank A. C. Bazzan for enlightening discussions

[1] R. da Silva, A. C. Bazzan, A. Baraviera, S. R. Dahmen, “Emerging Collective Behavior in
a Simple Artificial Financial Market”, to be published in: Proc. IV Int. Joint Conference on
Autonomous Agents and Multi-Agent Systems (AAMAS), Utrecht (2005)
[2] A. Dragulescu, V. M. Yakovenko, Eur. Phys. J. B17, 723-729 (2000)
[3] W. Brock, Stud. Econ. 8, 3-55 (1993)
[4] L. Blume, Games Econ. Behav. 5, 387-424 (1993)
[5] S. N. Durlauf, Proc. Natl. Acad. Sci. USA 96, 10582-10584 (1999)
[6] F. W. Wu, Rev. Mod. Phys. 54, 235 (1982)
[7] R. Mantegna, H. E. Stanley, “An Introduction to Econophysics”, Cambridge Univ. Press,
Cambridge, (2000)
[8] K. Huang, “Statistical Mechanics”, John Wiley, New York, (1987)

19

