Agent-based herding model of financial markets
Kirman's ant colony model, previously presented on our website as agent based (based on [1]) and stochastic (based on [2, 3]) model, has become classical example of herding modeling. Application of this model towards economic, financial or other social scenarios might seem doubtful as human society is far more complex than ant colony, but methodologically it is more useful to start from very simple and stylized model and later add complexity on top of it. Furthermore we have already shown that Kirman's herding dynamics could be applicable in agent-based marketing (see comparison of Kirman's and Bass diffusion model). In this text we will consider financial market scenario and obtain stochastic differential equations similar to the existing stochastic models considered in [4, 5].
Discussion and model presented in this text is the main topic of our paper on Microscopic reasoning for the non-linear stochastic models of long-range memory [6].
Introduction of variable event time scale
Original Kirman's model assumes constant agent meeting rate. In financial market scenario one could draw analogy between these events and trades, as trade is pair-wise interaction of traders, or agents in model's case, and also a great opportunity to reconsider available options. Thus we rewrite original one-step transition probabilities as
where
In this, more general, case derivation of stochastic differential
equation in the manner it was done in [2]
(also discussed on our
website)
is rather troublesome. Though alternatively we can use one-step process
formalism [3, 7].
In such case we compactly express Master equation using one-step
operators,
where
As one-step operators act on continuous functions they can be expanded using Taylor series up to the second order terms:
where
where
The above Fokker-Planck equation,
To simplify model we can introduce dimensionless time,
where
Introducing price and return
While introducing variable time scale we assumed that there are at least two types of traders - some are rational, while some are not so. In recent agent-based modeling [8] it is also very common to assume that there are two types of traders in the market - fundamentalists and noise traders. By definition fundamentalists are assumed to be rational investors aiming for the long term profits, while noise traders rely on technical trading strategies aiming for short term profits.
Fundamentalists base their decision on information about the stock's
value in the market. This information is quantified via so-called
fundamental price,
where
Contrary noise traders attempt to forecast future prices based on previous price movements. As they are using price charts to make forecast, they are also called chartists. As very is a wide selection of very different chartist trading strategies, chartists are likely to make very different forecasts. Difference in forecasts would lead to difference in bids. This intrinsic disagreement might be macroscopically seen as irrational mood of noise traders. Thus theirs' excess demand can mathematical be expressed as [2]:
where
Now one can use Walras law in order to obtain definition of price and, later, return. Original Walras law [9] assumes that trading in the market occurs trough the market maker, who stabilizes the market. Market is consider to be stable if all agents' excess demands equal zero:
here one can assume that fundamental price remains constant (i.e., it is not a function of time). As we have definition of price, now we can obtain definition of return:
Note that in the above we have expressed
In [2] definition of return,
where
Derivation of stochastic model for absolute return, y
Eqs.
to obtain stochastic model for
If we consider
We find that Eq.
which is known to give power law statistics:
As relations between different model parameters are
Using these predictions we have reproduced

The above comparison is very important as stochastic differential
equation
There is another stochastic model whose stochastic differential equation
resembles Eq.
Eq.
Due to the similarity between Eqs.
In case of generalized CEV process we can't reproduce

Applet
This applet numerically solves Eq.
where
The applet plots both time series and statistical properties in real time. In the first few moments it may show incorrect and very approximate results - please wait a bit for a program to "settle down", it will start to show correct and precise results as time passes.
References
- A. P. Kirman. Ants, rationality and recruitment. Quarterly Journal of Economics 108: 137-156 (1993).
- S. Alfarano, T. Lux, F. Wagner. Estimation of Agent-Based Models: The Case of an Asymmetric Herding Model. Computational Economics 26: 19-49 (2005).
- S. Alfarano, T. Lux, F. Wagner. Time variation of higher moments in a financial market with heterogeneous agents: An analytical approach. Journal of Economic Dynamics and Control 32: 101-136 (2008).
- S. Reimann, V. Gontis, M. Alaburda. Interplay between positive feedback in the generalized CEV process. Physica A 390: 1393-1401 (2011). arXiv: 1008.0568 [physics.data-an].
- J. Ruseckas, B. Kaulakys. 1/f noise from nonlinear stochastic differential equations. Physical Review E 81: 031105 (2010). arXiv: 1002.4316 [nlin.AO].
- A. Kononovicius, V. Gontis. Agent based reasoning for the non-linear stochastic models of long-range memory. Physica A 391: 1309-1314 (2012). doi: 10.1016/j.physa.2011.08.061. arXiv: 1106.2685 [q-fin.ST].
- N. G. van Kampen. Stochastic process in Physics and Chemistry. North Holland, Amsterdam, 2007.
- M. Cristelli, L. Pietronero, A. Zaccaria. Critical Overview of Agent-Based Models for Economics. Proceedings of the School of Physics 'E. Fermi', Course CLXXVI, ed. F. Mallnace, H. E. Stanley, pp. 235-282. SIF-IOS, Bologna-Amsterdam, 2012. doi: 10.3254/978-1-61499-071-0-235.
- A. Jolink. The evolutionist economics of Lean Walras. Routledge, London and New York, 1996.
- C. W. Gardiner. Handbook of stochastic methods. Springer, Berlin, 2009.
- V. Gontis, J. Ruseckas, A. Kononovicius. A Non-linear Stochastic Model of Return in Financial Markets. In: Stochastic Control, ed. C. Myers. InTech, 2010. doi: 10.5772/9748.
- P. E. Kloeden, E. Platen. Numerical Solution of Stochastic Differential Equations. Springer, Berlin, 1999.