• Non ci sono risultati.

Chapter 4 Agent-based market model

N/A
N/A
Protected

Academic year: 2021

Condividi "Chapter 4 Agent-based market model"

Copied!
14
0
0

Testo completo

(1)

Agent-based market model

In this chapter we have shifted our attention on the investigation of the agent-based mar-ket models reproducing the price dynamics features found in the second chapter for the Spanish stock market. Before doing that, we have presented some of the main market mod-els approaches, along with their merits and shortcomings, with a particular attention to the Cont-Bouchaud model [31]. We have chosen this model as the basis for developing the model we propose, which strays from the model it is based on,because of the relationships among agents. In fact, we have used the agents hierarchical structure found in the third chap-ter, and the agents wealth distribution to parameterise the Cont-Bouchaud model in order to characterise the basis of the model with empirical, and hence more realistic, relationships among agents. We have done this for the purpose of showing that the presence of imitative behaviours among agents and the diversity of agents, aspects not allowed by the efficient market hypothesis, yields the inverse power laws in the price returns probability density function typical of real markets.

(2)

4.1

Market Models

Since physicists have started looking at financial markets as complex systems, many theoret-ical market models have been proposed to explain their behaviours. The similarity between financial markets and systems of interacting particles gave a push to the birth of the first models which were only a sort of adaptation of some spin models to economic systems. Spin models were introduced by physicists at the beginning of the twentieth century to ex-plain some macroscopic behaviours which arise from the cooperation of spins, such as phase transitions. The first of these spin models was the Ising model [32], basis for the most of the market spin models, which Ising introduced to describe the ferromagnetism effect of some materials. According to the Ising model, the electromagnetic interaction between neighbour spins in a lattice, yields a cooperative behaviour at large scale, which generates the ferromag-netic effect. Adapting this model to financial markets physicists have considered the market agents instead of spins in a lattice, interacting among them, with the obvious convention that a spin-up was an agent who wants to sell, and a spin-down represented an agent who wants to buy. It is commonly believed that in a financial market, excess demand (that is the differ-ence between the number of assets offered and the number sought by the agents), exerts a force on the price of the asset. Furthermore it is believed that a positive excess demand will force the price up and a negative demand will force the price down. A reasonable suggestion for the price formation process could then be [33] :

               (4.1) where

   can be either the price of good or the relative variations of the price,

denotes the demand (   spin-up) or supply (

 spin-down) for each of the



agents, and is a factor measuring the liquidity or, more precisely, the market depth [34], i.e., how

sensitive a market is to an order imbalance. Such application of the Ising model is not so useful, in fact it yields a rapid crash of the system in one of the two stable states, all agent doing the same, and consequently the price becomes infinite. This rough model describes only a real market at the beginning of a financial bubble or crash.

(3)

4.1.1

New Spin Models

In order to increase the validity range of the spin approach, physicists have apported some modifications to the Ising model, for the purpose of better reproducing the behaviours of financial market at all time. One of these modifications is the one by Bornholdt [35], who introduced an anti-ferromagnetic coupling between each spin and the global magnetisation in addition to the coupling connecting each spin to its local neighbourhood. The resulting frustration leads to a metastable dynamics with intermittency and a phase of chaotic dynam-ics.

An example: the Bornholdt model

The term added by Bornholdt to modify the simple Ising model originated from the Minority Game[36], a mathematical interacting spin model developed in the game theory and often used to model markets. The Minority Game is a game in which agents (spins) split into two groups: however, only being in the minority group is rewarded and thus beneficial for each agent. This leads to a globally frustrated state as every single agent will try to reach this state. Similar interactions occur in real markets. For example, it is often desirable to be in the minority, when buying or selling a certain commodity. In this way, due to eq 4.1, the price is higher in the selling case, and the price is lower in the buying case, allowing positive gains. Beyond this aspect, the minority game does not provide a model for the more detailed dynamics of financial markets such as the dynamics of price. The Bornholdt approach tried to take into account two major conflicting forces seen in economic action:

“Do what your neighbours do” and “Do what the minority does” .

This two interactions have been included in a sort of local field , as follows:

                       (4.2) where 

      are the spin orientations,



is the number of spin of the model, and 



is a coupling constant. The first term is chosen as a local Ising Hamiltonian with nearest neighbour interactions



 and 

  for all other pairs.



(4)

of agent with respect to the total magnetisation. The dynamics with





  corresponds

to traders, who, in addition to a basic level of ferromagnetic noise trading, have the desire to join the global minority, for example in order to invest in possible future gains: these traders are called fundamentalists. On the other hand, the strategies with



   corresponds to

agents which follow the majority of traders, who expect that future returns correlate with the current popularity of the commodity: these ones are called chartists. At each time interval, the orientation of spin is updated according to:

        with             with   (4.3)

where is a parameter that plays the role of the inverse of the temperature in the Ising model.

The dynamics of this model, shown in Figure 4.1, is characterised by metastable phases of

Figure 4.1: Figure adapted from [35]. Subsequent snapshots of the spin dynamics of the lattice at undercritical temperature. The fi rst and the third snapshots are taken during a metastable phase, the second and the fourth are in the turbulent regime, where memory of global structures disintegrated.

approximate undercritical Ising Dynamics and intermediate phases of rapid rearrangements, reminiscent of overcritical dynamics. Identifying the value of spin with the will to buy or sell of an agent, the magnetisation 

          

   can be viewed as the excess demand,

and so as measure of price. The corresponding returns have a cumulative distribution with inverse power law tails as shown in Fig. 4.2.

Like in other spin models, the problems of this model are that while the model exhibits dynamical properties which are similar to the stylised facts observed in financial markets, a careful interpretation in terms of financial markets is still lacking. In particular, treating the magnetisation of the model as price signal is unnatural when deriving a logarithmic return of this quantity. Due to this derivation, small magnetisation values cause large signals in the returns with an exponent of the size distribution different from the underlying model’s

(5)

Figure 4.2: Figure adapted from [35]. Cumulative distribution of absolute returns, exhibiting an inverse power law behaviour within the time interval        .

exponent. In addition, spin models do not take into account the wealth of agents. Financial agents participating in a real market have large but finite resources and so cannot keep buying and/or selling assets indefinitely. This hard cut-off of agents resources in turn imposes a hard limit on the magnitude of price trends.

All the spin models do not give a realistic description of a real market system, they only reproduce some statistical aspects, without allowing an interpretation in economic terms. Due to these reasons another important family of market models has been created, the agent-based models.

4.1.2

Agent-based models

The agent-based models are again described by interacting particles, the agents, which do not follow the prescriptions of the efficient market hypothesis, they are heterogenous, and the interactions among them are different for each pair of agents. Since agent-based models allow for heterogenous and limited rational behaviour, they gained increasing interest. In general these models manage to exhibit some of the statistical properties that are reminis-cent of those observed in real-world financial markets; for example, fat-tailed distributions of returns and long-timescale volatility correlation. Despite their differences, these

(6)

mod-els draw on several of the same key ideas typical of spin modmod-els: feedback, frustration, adaptability and evolution. The underlying goal of all this research effort is to generate a microscopic agent-based model which reproduces all the stylised facts of a financial market, a model which makes sense at the microscopic level in term of financial market microstruc-ture. While each of these goals is separately achievable, the combination of them within a single model represent the strength of the agent-based models. Agent based models of financial markets developed during the last decade, such as those of Cont-Bouchaud[31] or Sornette[37], take into account observed behaviour of individual agents like momentum in-vestment, herding or learning. The only shortcoming of some of these models is attributed to the typically large number of parameters, which might allow to fit any feature of real data, and to the complexity of the model evaluation for a given set of parameters, which, in gen-eral, is not possible analytically. Recently, an alternative approach of agent-based model has been that herd behaviour may be sufficient to induce the returns fat-tail distributions. Herd-ing assumes some degree of coordination between a group of agents. This coordination may arise in different ways, either because agents share the same information or they follow the same rumour. The existence of herd behaviour in speculative markets has been documented by a certain number of studies: Scharfstein and Stein [38] discuss evidence of herding in the behaviour of fund managers, Grinblatt et all. [39] report herding in mutual fund behaviour while Trueman [40] and Welch [41] show evidence for herding in the forecasts made by financial analysts. An example of this approach is formalised in [31] as a static percolation model. We have taken the Cont-Bouchaud model as the basis we propose developing the model.

4.1.3

Cont-Bouchaud Model

This agent based model, presented in [31], is a simple model of a stock market where a ran-dom communication structure between agents generically gives rise to a heavy tails in the distribution of stock price variations in the form of an exponentially truncated power law, similar to distributions observed in recent empirical studies of high frequency market data. This model was the first one suggesting a relation between the excess kurtosis observed in asset returns, the market order flow and the tendency of market participants to imitate each

(7)

other. According to the model the high variability present in stock market returns may cor-respond to collective phenomena such as crowd effects or herd behaviour, more than to the arrival of external information or to variations in fundamental economic variables. This is shown by providing a quantitative link between the two issue discussed above: the heavy tails observed in the distribution of stock market returns on one hand and the herd behaviour observed in financial markets on the other hand. This model introduced an alternative ap-proach to agent based market models, assuming that the communication structure between agents is modelled as a random graph. This idea is the basis of other recent works, such as Egu´ıluz-Zimmermann [42], and consequently of our proposed model.

Model description

The authors have considered

agents which are represented by vertices in a network, trad-ing in a strad-ingle asset. Each agent , during each time period, may choose a state





        corresponding respectively to selling, inactivity, buying. The demand of the

agent is then represented by



, therefore the aggregate excess demand for the asset at time

 is simply          (4.4)

given the algebraic nature of the 

. The marginal distribution of agents individual demand is assumed to be:                        (4.5) where 

   . In contrast with many binary choice models in the microeconomic literature,

the authors allow for an agent to be inactive, i.e., not to trade during a given time period. Agents can be isolated or connected through links forming a cluster which contains only agents sharing the same information. The aggregate excess demand has an impact on the price of the stock, causing it to rise if the excess demand is positive, to fall if it is negative, according to eq. 4.1. In order to evaluate the distribution of stock return it is necessary to know the joint distribution of the individual demand. To do this, the authors have proposed to consider that market participants form groups or clusters through a random matching process

(8)

but that no trading take places inside a given group: instead, members of a given group adopt a common market strategy and different groups may trade with each other through a centralised market process. In the context of a financial market, clusters may represent for example a group of investors participating in a mutual fund. This is a new recipe that takes into account the interaction and communications among agents, facts which are ignored by the majority of models, which unrealistically assume that the outcome of the decisions of individuals agents may be represented as independent random variables. For any pair of agents and , the probability that a link exists between them is assumed equal to

 , where  is function of the number of agents

 ,      with      . The parameter  is

the only parameter of this model, and this parameter represents the willingness of agents to align their actions: it can be interpreted as a coordination number, measuring the degree of clustering among agents. By rewriting the equation 4.1 as a sum over clusters, one has:

                    (4.6) where 

is the size of cluster ,  the common individual demand of agents belonging

to the cluster ,   the number of cluster and







. The authors have reasonably assumed that



and are independent random variables because of the size of a group does not influence its decision whether to buy or sell. Then by defining

              (4.7) the distribution of is given by                 (4.8)

where is a unit step function at . As proved by the random graph theory [44, 45], has

a continuous density which decays asymptotically as:

                        for      (4.9)

The expression for the price variation 

 therefore reduces to a sum of

  identically

dis-tributed random variables 

with heavy-tailed distributions. For more details see [31]. In this way it is possible to calculate the moments generating function of the aggregate excess demand in term of  so as to have the expression for volatility and kurtosis. This model

(9)

provides an analytical treatment of a herd behaviour in agent based models. The behaviours of the volatility and of the kurtosis given by this model are close to the values observed on real markets. However this model lacks some of the ingredients of real markets, such as the possible feedback effect of the prices movement on the behaviour of market participants, the different wealth of agents, and their underlining cross-correlations.

4.2

Agent-based proposed model

The unrealistic assumptions of the above described model consist in the facts that all agents are assumed to imitate each other to the same degree, and to be homogenous. We have then extended the Cont-Bouchaud model considering the agents analysis results found in the earlier chapter. In a real market, the agents have limited resources at their disposal, and above all, each agent invests according to its wealth. We have found that the agent wealth distribution exhibits an inverse power law behaviour according to a Pareto law, with exponent

   . Hence, the first modification we have apported has been to assign a coefficient



at each agent , distributed according to an inverse power law with exponent    in the

interval



  . Then the demand of each agent is weighted by its corresponding wealth

coefficient. From this follows for the excess demand

          (4.10) where

is the total number of agents considered, and 

  is the demand of agent at time

step unit , following the notation of [31]. At each time step, a random network is created,

linking the pairs of agents according to a probability  



, in the same way discussed in the earlier section. This leads to the formation of opinion clusters, and all agents belonging to the same cluster operate in the same way, by buying, selling or waiting. The excess demand  and the agent action





  are computed. After that the cluster are broken up

into isolated agents, removing all links inside the clusters, and resetting their state,   



 . Finally we have introduced the price index dynamics following the simple update rule

for the price index

  defined by eq 4.1, which arise that each order acts as an impact to

(10)

4.2.1

Properties of simulated price time series

We have performed numerical simulations for a population of 

   agents and for

different values of the linking parameter . Figure 4.3 displays a typical evolution of the market price

   for three different values of          . Then we have calculated

0 2000 4000 6000 8000 10000 Time steps 60 80 100 120 140 Price

Figure 4.3: Samples of price simulated time series for different parameters  



      .

the logarithmic return time series at different unit time intervals   for a fixed value of

the linking parameter,    , and we have plotted their probability density function. In

Figure 4.4 we have shown the distribution of returns for three different unit time intervals,

           . With an increasing time interval a crossover towards a Gaussian distribution

is observed from the figure, in agreement with empirical financial data [46]. For     ,

the price returns distribution has inverse power law tails, with an exponent which can vary within the interval      , depending on . In the Count-Bouchaud model, the exponent

of the inverse power law tails can vary within the interval     . This shows that the

(11)

closer to the one of real financial data. We thought that to introduce an hierarchical structure among agents modelled on the one found in the third chapter, means to fix the value of the parameter and consequently the exponent of power law tail of the price returns pdf.

-6 -4 -2 0 2 4 6 r(∆t) 0.001 0.01 0.1 1 P(r( ∆ t)) ∆t=1 ∆t=10 ∆t=100

Figure 4.4: Semilog plot of the distribution of the price returns  



for different time intervals



         , calculated for a linking parameter    .

4.2.2

Cross-correlation of simulated agents

Up to now we have not introduced any kind of cross-correlation between agents. At each time step, they form links with other agents randomly, and with the same probability. The simulated network exhibits a hierarchical structure among agents, but it changes at each time step, washing out the correlation history of each pair of agents. Hence, there is no memory in the agent action time series, and consequently pairs of cross-correlated agents do not exist. We expect, then, that the action cross-correlation pdf should be Gaussian. For the purpose of underlying the difference with a real market, we have calculated the cross-correlation matrix

(12)

of the



simulated agents adopting for the cross-correlation coefficient the equation:

                      (4.11)

already used in stocks analysis, see Sec. 2.2 As shown in Figure 4.5, the probability

dis--0,02 -0,01 0 0,01 0,02 ρij(τ) 1 10 100 1000 P( ρij (τ))

Figure 4.5: Probability density function of the full set of correlation coeffi cients for

two time unit intervals,



   dashed line,



    straight line.

tribution function of the cross-correlation coefficients is similar to a Gaussian distribution symmetric with respect to zero, and it is stable upon increasing the time interval. This con-firms that the behaviours of the real cross-correlation coefficients pdf, found in the Spanish stock market do not correspond to a random structure.

4.2.3

Extension of the model

An interesting extension of the model is one in which the interacting model between agents is explicitly modelled in such a way as to reflect a hierarchical structure similar to what found among real agents. This can be done by allowing that the probability of forming

(13)

links between agents, depends of agents as function of their cross-correlation coefficient,       

 . We have thought that this could fix the value of the linking parameter , and

consequently the exponent of the price returns distribution. Due to the signs of the cross-correlation coefficient, the underlying dependence of 



from  

is not so obvious. If a pair of agents has a negative cross-correlation coefficient, it means that the two agents are uncorrelated, and then this can not be expressed by links. We are investigating different methods to incorporate an hierarchical structure in this model.

(14)

4.3

Results

We have shown in this chapter the importance of the agents properties in modelling financial markets. First of all, we have described some history of the market models, starting from the first models inspired by the Ising model up to the most recent agent based models, in which a herd behaviour is incorporated into the models, considering the market as a network between agents. We have shown merits and shortcomings of these models, and from the missing ingredients we have found the idea for developing our model. Before proposing the model, we have described in particular the Cont-Bouchaud model, which bases itself on a random communication structure between agents. This model proves analytically that only this intra-agents structure yields the observed heavy tails in the distribution of stock price variations of real data. We have substituted the unrealistic assumption of homogenous agents with the more realistic assumption that each agent can invest proportionally to its resources. To do that we have generated a Pareto law distribution of wealth according to the one found for the Spanish stock market, see Sec 3.1. Afterwards we have shown that the price returns pdf exhibits many statistical properties in accordance with the real data. We have proposed a possible extension of this model, consisting in the use of a cross-correlation matrix to calculate the probability coefficients of forming a link between two agents.

Figura

Figure 4.1: Figure adapted from [ 35 ]. Subsequent snapshots of the spin dynamics of the lattice at undercritical temperature
Figure 4.2: Figure adapted from [ 35 ]. Cumulative distribution of absolute returns, exhibiting an inverse power law behaviour within the time interval         .
Figure 4.3: Samples of price simulated time series for different parameters  
Figure 4.4: Semilog plot of the distribution of the price returns   
+2

Riferimenti

Documenti correlati

Si tratta, come aveva intuito Husserl, di accin- gersi finalmente a interrogare seriamente ciò che di ovvio è presupposto da qualsiasi pensiero, da qualsiasi

– P T (eμ) distribution for data and simulation in comparison with simulated aQGC signal in exclusive W + W − channel final state (left) and corresponding two-dimensional 95% CL

ities where neutrinos acquire a mass through the see-saw mechanism, even if the SUSY breaking entails universal sfermion masses, it is possible to (largely) misalign slepton and

L'anno 3000 - Sogno è un romanzo satirico fantapolitico del 1897 di Paolo Mantegazza.. È considerato uno dei precursori ottocenteschi della

Dunque, in questo implicito ma costitutivo processo di prolessi narrativa, si può vedere come il testo agiografico abbia buon gioco nell'elevare al massimo grado

>>Scaricare eBook: LA BELLEZZA DELL'AMORE NEGLI SCRITTI DI GIOVANNI PAOLO II: ETICA ED ESTETICA Download libri gratis Angela Anna Tozzi La bellezza dell'amore negli scritti

Intervento di riqualificazione urbana a Marina di Cecina Tesi di Laurea..