Beruflich Dokumente
Kultur Dokumente
123
(2013)
No. 3
Proceedings of the 6th Polish Symposium of Physics in Economy and Social Sciences (FENS2012), Gdask, Poland
J.A. Lipski
and R. Kutner
Yi (t) =
1 if Yi (t) i (t),
i (t + 1) =
(1)
0 if i (t) < Yi (t) < i (t),
1 if Y (t) (t),
i
i
where i (t) is a time-dependent positive threshold considered below and Yi (t) is a time-dependent local eld
j.lipski@student.uw.edu.pl
4
X
(2)
j=1
(584)
585
3.2. Algorithm
Our algorithm makes possible to simulate the behaviour of agents. Single agent can trade only one share
at a time that is, he can buy shares only if he possesses
enough cash or sell shares only if he has at least one
share. Leverage and short sale is beyond the scope of
our model.
The algorithm consists of the initial and proper parts.
Within the initial part the input values of variables and
required parameters are prepared. This part is valid for
the case t = 0 and 0 1, where = 1, 2, . . .
For each value of 0 (at xed value of ) it consists of the
following steps.
1. The spin state, i ( 0 ) (i = 1, 2, . . . , n), of each agent
is drawn from a (discrete) 3-point uniform distribution.
2. The price P ( 0 ) is drawn from unit interval, (0, 1),
by using a uniform continuous distribution.
3. The xed values Wij (valid for any time) are drawn
from interval (2, 2) by using a uniform distribution.
4. Thanks to the above given steps we can calculate
Jij (t = 0) from Eq. (7) and subsequently Yi (t = 0)
from Eq. (2).
5. The intial values of the thresholds i (t = 0) are
drawn from the normal distribution N (0, 1).
6. The initial values of the -correlated noise, i (t =
0), are drawn from the normal distribution N (0, 1).
7. Cash and shares are granted as well to every agent
as to market maker (for details see Sect. 3.3).
Notably, each time step is divided into two rounds: the
consultation and decision ones. In the consultation round
only the relaxation of spins occur without changing any
amount of cash and shares (of each agent and market
maker). The change of cash and shares takes place only
in the decision round. This is described in detail below.
Within the proper part, valid for t 1, the dynamics
of the system is simulated. In this part the dynamics of
every agent is determined by the following algorithm.
1. For t = 1 the spin state of each agent is calculated
according to Eq. (1), as we have already all quantities required (i.e. those for t = 0). Thus, for t = 1
all decisions of agents are known.
2. Next, agent i is drawn with probability 1/n.
3. By using the spin values of i's nearest neighbours, we construct forces Jij (t = 1) exerted on
agent i (from his nearest neighbours j 's) according
to Eq. (7). This is possible as all required quantities
have been calculated one step earlier.
4. Hence, the local eld Yi (t = 1) is calculated according to Eq. (2).
586
remainder R from dividing the time step (or number) t (t = 1, . . . , L) by a natural number m (=
K + k) is lower than a xed value (or R =
t ent(t/m)m < , where Ent(x) means the entire
part of x). Number K is a natural number xed
at the beginning of the simulation, while k is also a
natural number but drawn from a uniform distribution. As k uctuates, it protects the agent trading
against periodicity (which could be present in the
case of xed m). Apparently, for t K remainder
R is always smaller than (as it vanishes);
the market price of share is either higher than the
fundamental price multiplied by factor a (> 1)
(then the agent can sell a share for the market
price) or lower than the fundamental price by factor
b (< 1) (then the agent can buy a share for the market price). Indeed, this is a fundamental behaviour
of agent because he is driven by the relation between the market price and the fundamental one
and not by the collective impact of his neighbours.
4. Main results
587
588
Fig. 4. Histograms of daily log-returns both for market data [10] and obtained from simulations in the semi-logarithmic plots. The obtained results show the non-Gaussian properties of the price process, which is satisfactorily described by our model, in particular, for
the stock market of a large capitalisation. (a) Log-returns histogram, simulation A v. WIG data since
1991, (b) log-returns histogram, simulation A v. S&P
500 data since 1968, (c) log-returns histogram, simulation B v. WIG data since 1991, (d) log-returns histogram, simulation B v. S&P 500 data since 1968,
(e) log-returns histogram. no agent esteem.
[7]
[8]
[9]
[10]
course CLXXVI,
Eds. F. Mallnace, H.E. Stanley, Societa' Italiana
di Fisica IOS Press, BolognaAmsterdam, 2012,
p. 235.
J.D. Farmer, D. Foley, Nature 460, 685 (2009).
M. Denys, M.Sc. Thesis, Warszawa 2011.
J.A. Lipski, Bachelor Thesis, Warszawa 2011.
Market data from the website www.stooq.pl .