Updating Wealth in an Asset Pricing Model with Heterogeneous Agents

We consider an asset-pricing model with wealth dynamics in a market populated by heterogeneous agents. By assuming that all agents belonging to the same group agree to share their wealth whenever an agent joins the group or leaves it , we develop an adaptive model which characterizes the evolution of wealth distribution when agents switch between different trading strategies. Two groups with heterogeneous beliefs are considered: fundamentalists and chartists. The model results in a nonlinear three-dimensional dynamical system, which we have studied in order to investigate complicated dynamics and to explain wealth distribution among agents in the long run.


Introduction
The traditional approach in economics and finance is based on a representative rational agent who knows the market equilibrium equations and is able to solve the model.Simon 1 documents that knowledge of the economic environment is an extreme assumption.Moreover, it would be difficult to compute the rational expectations equilibrium in nonlinear market equilibrium models, even if the agent knew all the equilibrium equations.
As a consequence, many recent studies model agents as boundedly rational see, e.g., Conlisk 2 for a survey on bounded rationality and assume that they are heterogeneous see 3, 4 for an extensive survey of heterogeneous agent models .Many authors have introduced heterogeneous agent models in order to investigate some important facts in financial markets, see, for example, Brock and Hommes 5 , Hommes 6 , Chiarella and He 7-9 , Chiarella et al. 10 ,Anufriev et al. 11 , Anufriev 12 , and Anufriev and Dindo 13 .Examples of the impetus behind these kinds of models are i the question of whether the behavior of agents can be described as if they are rational claimed by Friedman 14 and ii some stylized empirical findings such as the excess volatility exhibited by markets difficult to explain by means of a representative agent model .
The key aspect of these models is that they consider expectations feedback and the adaptiveness of agents see, e.g., Brock and Hommes 5, 15 .To be more specific, at each time agents choose from a set of different types of trading strategies by looking at their past performance measured by the profits they have made .Brock and Hommes 5 introduce adaptive beliefs to the present discounted value asset-pricing model and observe endogenous price fluctuations similar to those observed in financial markets.Chiarella and He 7 extend the model of Brock and Hommes 5 by assuming that agents have different risk attitudes and different expectations for both the first and second moments of price distribution.
A common feature of this kind of heterogeneous agent model in asset-pricing theory is the independence of optimal demand for the risky asset from agents' wealth, as a result of the assumption of the constant absolute risk aversion CARA utility function such as the exponential one .Nevertheless, some authors document that a framework in which investors' optimal decisions depend on their wealth is more realistic, see, for example, Levy et al. [16][17][18]and Campbell and Viceira 19 .This framework is in line with the assumption of a constant relative risk aversion CRRA utility function.The only utility function with CRRA property is the power utility function, of which the logarithmic utility function is a special case.The use of CRRA utility functions in financial markets is important in capturing the interdependence of price and wealth dynamics.
For this reason, in recent years, several models have focused on the study of the market equilibrium price and wealth distribution when the economy is populated by boundedly rational heterogeneous agents with CRRA preferences.Chiarella and He 8 study an assetpricing model with heterogeneous agents having logarithmic utility functions.In the case with two groups of agents, that is, fundamentalists and chartists, the authors prove the existence of multiple equilibria and the convergence of the return and wealth proportions to the steady state with the higher return under the same variance.The model shows volatility clustering as well as other anomalies observed in financial market data.Nevertheless, the authors focus on the case with fixed population fractions.In order to obtain a more appealing framework, Chiarella and He 9 allow agents to switch between different trading strategies and show the profitability of momentum trading strategies over short-time intervals and of contrarian trading strategies over long-time intervals.Chiarella and He 20 develop a model able to characterise asset price dynamics, the evolution of population proportions and wealth dynamics.In order to describe the evolution of wealth, the authors investigate the framework of heterogeneous agents using a selection of numerical simulations.
Chiarella et al. 10 consider a market-maker model of asset price and wealth dynamics and introduce a growing dividend process and a trend in the fundamental price of the risky asset.The authors consider explicitly the interdependence between price dynamics and the evolution of wealth distribution among agents and show that fundamentalists do not accumulate more wealth than chartists.
Other examples of the analytical exploration of the CRRA framework with heterogeneous agents are Anufriev et al.Our paper follows on this wide stream of research by introducing a switching mechanism and studying its effects on wealth distribution.We observe that many contributions to the development and analysis of financial models with heterogeneous agents and CRRA utility consider fixed proportions of agents.Moreover, models which allow agents to switch between different trading strategies such as Chiarella and He 9 make the following assumption: when agents switch from an old strategy to a new strategy, they agree to accept the average wealth level of agents using the new strategy.More precisely, the switching agent leaves his wealth to the group of origin.
Motivated by such considerations, we develop a model based upon a new switching mechanism.We assume that all agents belonging to the same group agree to share their wealth whenever an agent joins the group or leaves it .When agents switch between different prediction strategies, the wealth of the new group takes into account the wealth coming from the group of origin.In other words, agents who change group bring their wealth to the new group.As a consequence, the wealth of each group is updated from period t to t 1 not only as a consequence of portfolio growth of agents adopting the relative strategy, but also due to the flow of agents coming from the other group.
In line with the evolutionary finance literature see, e.g., 21-25 we analyze the survival of agents in a financial market.In contrast with the evolutionary finance approach, we incorporate the feedback on past prices with the investment strategies, as in the recent contribution of Anufriev and Dindo 13 .
As in many interacting agent models, we focus on the case where there are two groups of agents: fundamentalists and chartists.Among others, Chiarella et al. 10 , Chiarella and He 8 , Brock and Hommes 5 distinguish between fundamentalists and chartists in order to explain excess of volatility and to analyze the agent survival.Fundamentalists believe that the price of an asset is determined by its fundamental value.The fundamental price is completely determined by economic fundamentals.Fundamental traders sell buy assets when their prices are above below the market fundamental value.In contrast, chartists, or technical analysts, do not take the fundamental value into account, rather they look for trends in past prices and prediction is based upon simple trading rules.For a long-time, chartists have been viewed as irrational and, according to the Friedman hypothesis, they would be driven out of the market by rational traders.We will see that both types of agents can survive in the market in the long-run.
The new switching mechanism we have introduced leads the final system to a particular form in which the wealth of agents is defined by a continuous piecewise function and the phase space is divided into two regions.Nevertheless, our final dynamical system is three dimensional and all the equilibria are present.We will prove that it admits two kinds of steady state, fundamental steady states with the price being at the fundamental value and nonfundamental steady states.In performing the stability analysis, we are limited by the atypical form of our system, but we prove the existence of a trapping set which allows us to study the stability of the fundamental steady state.Several numerical simulations supplement the analysis and show complexity, which is mainly due to wealth dynamics.
In Section 2, we present our general framework describing an asset-pricing model where agents use different beliefs about future price.We obtain a three-dimensional dynamical system where wealth distribution can be explicitly considered.In Section 3, we focus on the case in which the market is populated by fundamentalists and chartists.The resulting map has a particular structure, being piecewise smooth, although we analytically find the steady states and we prove the existence of a trapping set in which all the wealth is owned by fundamentalists.In order to consider the possibility of complex dynamics to be exhibited.In Section 4 we perform a series of numerical simulations showing the great variety of qualitative behaviors which our model can present and their relation to a number of parameter values.As in the related literaure, our heterogeneous agent model leads the market to periodic or even chaotic fluctuations in prices.In addition, the new switching mechanism involves complexity in the long-run wealth distribution.Section 5 concludes.

The Model
Consider an economy composed of one risky asset paying a random dividend y t at time t and one risk free asset with constant risk free rate r R − 1 > 0. We denote by p t the price exdividend per share of the risky asset at time t.In order to describe the wealth dynamics, we assume that all agents belonging to the same group agree to share their wealth whenever an agent joins the group or leaves it .This assumption was introduced by Chiarella and He 9 , the main motivation is that the model would not otherwise be tractable.According to such an assumption, the wealth of agent type h at time t, denoted by w h,t , is given by the total wealth of group h in the fraction of agents belonging to this group.Generally speaking, we are assuming homogeneity between agents within the same group, while heterogeneity is introduced between agents belonging to different groups.As a consequence, the wealth dynamics of investor h is described by where z h,t is the fraction of wealth that agent-type h invests in the risky asset and ρ t p t y t − p t−1 /p t−1 is the return on the risky asset at period t.Observe that W h,t 1 represents the wealth earned by agent h at time t 1 later on the investment made at time t.
The individual demand function z h,t is derived from the maximization problem of the expected utility of W h,t 1 , that is, z h,t max z h,t E h,t u h W h,t 1 , where E h,t is the belief of investor-type h about the conditional expectation, based on the available information set of past prices and dividends.Since each agent is assumed to have a CRRA utility function, investors' optimal decisions depend on their wealth.In line with Chiarella and He 8 , the optimal approximated solution is given by where λ h is the relative risk aversion coefficient and σ 2 h Var h,t ρ t 1 −r is the belief of investor h about the conditional variance of excess returns.
In our model, different types of agents have different beliefs about future variables and prediction selection is based upon a performance measure φ h,t .Let n h,t be the fraction of agents using strategy h at time t.Hence, as in Brock and Hommes 5 , the adaptation of beliefs, that is, the dynamics of the fractions n h,t of different trader types, is given by where the parameter β is the intensity of choice measuring how fast agents choose between different predictors and C h ≥ 0 are the costs for strategy h.When β increases, more and more agents use the predictor with the highest fitness.In the extreme case β ∞, all agents choose the strategy with the highest fitness, while in the other extreme case β 0, no switching at all takes place and both fractions are equal to 1/2.
Let us define the performance measure φ h,t .To this end we observe that at time t 1 agent h measures the performance he has achieved and then chooses whether to stay in group h or to switch to another one.With this consideration, we measure past performance as the personal wealth coming from the investment in the risky asset with respect to w h,t : In this framework, at any time the wealth w h,t represents the initial endowment of agent h φ h,t z h,t ρ t 1 − r .

2.4
Agents revise their beliefs in a boundedly rational way in the sense that, at any time, most agents choose the predictor which generates the best past performance.In other words, the fraction n h,t 1 of traders using strategy h at time t 1 will be updated according to φ h,t .
In this work, we focus on the case of a market populated by two groups of agents, that is, h 1, 2. In order to ensure that the model remains tractable, we assume that agents can move from group i to group j at any time, with i, j 1, 2 and i / j, while both movements are not simultaneously possible.The simplified assumption that switching is unilateral is in line with our framework, in which agents can only switch to the group which generates the best past performance.
We define Δn h,t 1 n h,t 1 − n h,t as the difference in the fraction of agents of type h from time t to time t 1.Note that, in a market with two groups of agents, it follows that Δn 1,t 1 −Δn 2,t 1 .As a consequence, we can have two different cases: 1 Δn 1,t 1 ≥ 0, if Δn 1,t 1 fraction of agents moves from group 2 to group 1 at time t 1, 2 Δn 1,t 1 < 0, if Δn 1,t 1 fraction of agents moves from group 1 to group 2 at time t 1.
Following Brock and Hommes 5 , we define the difference in fractions at time t, that is, m t n 1,t − n 2,t , so that n 1,t 1 m t /2 and n 2,t 1 − m t /2.As a consequence
In order to describe the wealth dynamics of each group, we define W h,t as the share of the wealth produced by group h to the total wealth: which represents the wealth of group h.Hence, we have to distinguish two different cases to define the wealth of group 1 at time t 1: 1 if Δn 1,t 1 fraction of agents moves from group 2 to group 1, the wealth W 1,t 1 is given by the wealth coming from group 2 and the wealth generated by traders of type 1, otherwise, 2 if Δn 1,t 1 fraction of agents moves from group 1 to group 2, the wealth W 1,t 1 is simply given by the wealth of agents which do not leave the group.
Summarizing, the wealth of group 1 is defined as

2.7
In a similar way we can derive the wealth of group 2:

2.8
Note that, in this way, we ensure that the wealth of both groups is updated at all times.More precisely, when Δn 1,t 1 ≥ 0 i.e., strategy 1 performs better then some agents switch to the first group.In such a case, at time t 1 new agents joining the group bring the wealth made in group 2 to group 1. Differently, the wealth of the second class is simply given by the wealth generated by type-2 agents who do not leave the group.A similar reasoning applies when Δn 1,t 1 < 0.
In order to summarize how the wealth distribution changes as a consequence of the switching mechanism, let us focus on the timing of the model.
i At time t: the market is made up of n 1,t n 2,t fraction of traders belonging to the first second group.Agents have different expectations about the returns on the risky asset and, hence, different demand functions.
ii At time t 1: type-h agent generates his personal wealth W h,t 1 .At the same time, the new fractions of agents n 1,t 1 and n 2,t 1 are determined according to the performance measures generated by the investment in the risky asset.Hence, from time t to t 1 switching occurs and some traders move from one group to the other.Agents leaving group i bring the wealth they have generated W i,t 1 to class j and the wealth W j,t 1 of group j is determined.Finally, as all agents agree to share their wealth whenever an agent joins the group, w h,t 1 W h,t 1 /n h,t 1 is the wealth of agent h at time t 1.Then, the story repeates.

Finally, we define w h,t as the wealth of group h in the total wealth, that is, w h,t W h,t / h W h,t where W h,t n h,t w h,t and h 1, 2 , then w h,t represents the relative wealth of group h.
In the following, we will consider the dynamics of the state variable w t : w 1,t − w 2,t , that is, the difference in the relative wealths.To this end, we recall 2.7 and 2.8 and analyze both the cases m t 1 ≥ m t and m t 1 < m t .
Case 1 m t 1 ≥ m t .From 2.7 and 2.8 and after some algebra we obtain where we have made use of relation n 1,t n 2,t 1.
Considering 2.1 , it follows

2.11
Finally, recalling that w

2.12
Case 2 m t 1 < m t .Following the same steps as in the previous case, we arrive at and by using 2.1 ,

2.14
Dividing both numerator and denominator for W 1t W 2t and recalling that w h,t W 1,t W 2,t w h,t /n h,t , we obtain

2.15
Finally, we have

2.16
As a consequence, the dynamics of the state variable w t can be described by 2.17 where

2.18
Notice that the function defining w t 1 is continuous.

Price-Setting Rule
In this work, we assume that price adjustments are operated by a market-maker who knows the fundamental price.The price-setting rule of the market-maker is given by see 10

2.24
Observe that prices today influence prices tomorrow through agent demand.
The final dynamical system is obtained by using 2.5 , 2.17 , and 2.24 as stated in the following proposition.Proposition 2.1.Under the assumption of an i.i.d.dividend process {y t } such that E t y t k y for all k 1, 2, . .., the dynamics of the deterministic skeleton of the model is described by the following three-dimensional system:

2.27
where Proof.From 2.24 , we immediately obtain 2.25 and where we have assumed that dividends evolve in a deterministic way according to their expected value y.
Putting 2.29 in equations of F 1 and F 2 and G, we rewrite such functions as in

2.30
Consider now the dynamics of the difference in fractions of agents, that is, 2.5 .Equation 2.26 is trivially derived putting C C 1 − C 2 and recalling 2.4 and 2.29 .Moreover:

2.31
where we have made use of relations 1−tanh x 2e −x / e x e −x 2/ e 2x 1 and 1 tanh x 2e x / e x e −x 2/ e −2x 1 .Finally, introducing 2.31 into the expressions of F 1 , F 2 we arrive at 2.27 .
Notice that in the previous proposition we have introduced the difference between costs, that is, In order to study the system defined by Proposition 2.1, we have to specify the individual demand functions where we have assumed that beliefs about variance and risk aversion coefficients are constant and equal for all traders, that is, Var h,t ρ t 1 − r σ 2 and λ h λ, for all h 1, 2. In making this assumption we follow Brock and Hommes 5 .Notice that p is the fundamental solution, that is, the long-run market clearing price path when homogeneous beliefs about expected excess return are considered.Under the assumption of an i.i.d.dividend process {y t } with E t y t 1 y, the fundamental solution is constant and given by p t p y/r. Brock and Hommes 5 derive endogenously the fundamental solution satisfying the no-bubbles condition, in the particular case of zero net supply of shares.
As in many interacting agent models see, e.g., 5, 8, 10 , in order to explain why prices deviate from their fundamental values for a long-time and to analyze agent survival, in the following section, we assume that agents of type 1 are fundamentalists while agents of type 2 are chartists.

The Map
Let us move on to analyze the case in which agents of type 1 are fundamentalists, believing that prices return to their fundamental value, while traders of type 2 are chartists, who do not take into account the fundamental value but base their prediction selection upon a simple linear trading rule.In other words, we assume that E 1,t p t 1 p and E 2,t p t 1 ap t with a > 0. Trivially, for a > 1 a < 1 agents of group 2 believe that the price will increase decrease in the next period, while they expect the same price in the next period when a 1 in this last case naive expectations are considered .
Therefore, the demand functions are given by: The final nonlinear dynamical system T is written in terms of the state variables x t , m t and w t : where Y denotes α/2λσ 2 x t − 2 a 2r x t − 1 x t − a w t r x t − 1 and we have made use of

3.6
Notice that the function defined by 3.4 is continuous and piecewise smooth.In particular, m t 1 being defined by 3.3 , the phase space is divided into two regions by the surface of equation f 2 x, w − m 0. Observe that all the equlibria must belong to the border surface for any range of the parameter values.
Finally, we wish to underline that our model is characterized by two different success indicators: the difference in the fractions of agents, m, and the difference in the relative wealths, w.More precisely, a strategy h can be successful both in terms of the number of agents using it or in terms of the wealth of group h.

Steady States
In order to find the steady states owned by the system, we put x t , m t , w t x, m, w for all t.Recalling that x t p /p t and under the assumption of i.i.d.dividend process, we already know that any equilibrium fundamental price ratio x is different from zero.Afterwards, we have: x − 2 a 2r x − 1 x − a w 0 see 3.2 and it trivially follows that G 2R. Consequently, 3.4 shows that w must solve: where 1 − m has been rewritten as 1 − m 2/ e M 1 with

3.10
It follows that the steady state values w and x must satisfy

3.11
and we can identify two types of steady states: i fundamental steady states characterized by x 1, that is, by the price being at the fundamental value, ii nonfundamental steady states for which x / 1.More precisely, for a / 1 the fundamental steady state E f of the system is such that w f 1 and there exists a nonfundamental steady state E nf such that w nf −1, x nf 1 − a /r 1.Notice that the equilibrium E nf exists for a < 1 r i.e., x nf > 0 .In fact, though such a steady state has been derived analytically for any a, for a ≥ 1 r it is outside the economic meaning of x and numerical evidence confirms that it is nonattracting.Observe that the equilibria E f and E nf are characterized by w 1 and w −1 respectively.In other words, at the fundamental nonfundamental equilibrium the total wealth is owned by fundamentalists chartists .
Otherwise, when a 1 the fixed point E nf becomes a fundamental steady state.Moreover, every point E 1, tanh{−Cβ/2}, w is a fundamental equilibrium, that is, the long-run wealth distribution at a fundamental steady state is given by any constant w ∈ −1, 1 .In other words, a continuum of steady states exists: they are located in a one-dimensional subset a straight line of the phase space.Notice that this is a natural result, as for a 1, the expectations schemes are equivalent at the fundamental price.
Summarizing, the following lemma deals with the existence of the steady states.
Lemma 3.1.The number of the steady states of the system T depends on the parameter a.
1 Let a / 1, then a for a < 1 r there exist two steady states: the fundamental equilibrium: and the nonfundamental equilibrium: b for a ≥ 1 r the fundamental steady state E f is unique.
2 Let a 1, then: The basin of attraction in Figure 1 shows that for a 1 the steady state wealth distribution which is reached in the long-run by the system depends on the initial condition.More precisely, for different initial conditions m 0 , w 0 in the gray region, the system converges to different equilibria E with w ∈ −1, 1 , providing that relative wealths converge to some mixture.

Trapping Set and Stability Analysis
Given the atypical form of our three-dimensional system, in which the function defining w t 1 is piecewise smooth, so that the phase space is divided into two regions, we look for appropriate restrictions of our map.We recall that a set X is trapping for a map T if T X ⊆ X.The following proposition proves the existence of a trapping set characterized by w t 1, for all t.Proposition 3.2.For all α, r, λ, σ 2 with α 1 r /λσ 2 ≤ 1, there exists a 2λσ 2 /α r 1 − 1 such that for all a ≥ a the set X { x t , m t , w t : x t ≥ 1, w t 1} is trapping for any initial condition x 0 , m 0 , w 0 with 1 ≤ x 0 ≤ a 1 /2 and m 0 −1 ( ≥ 0 small enough).
Proof.Looking at 3.4 for m t 1 ≥ m t , we find that w t 1 implies w t 1 1 for all x t , m t .Therefore we require m t 1 ≥ m t for all t.From 3.2 and 3.3 it is easy to obtain x t 1 f 1 x t and m t 1 f 2 x t for w t 1, so that condition m t 1 ≥ m t becomes f 2 x t ≥ f 2 x t−1 and it must be verified if f 2 is a decreasing function and x t ≤ x t−1 .Function f 2 is decreasing if and only if Our second requirement, that is, x t ≤ x t−1 , can be rewritten as f 1 x t−1 ≤ x t−1 or equivalently: Finally, looking at 3.2 for w t 1 and α 1 r /λσ 2 ≤ 1, it follows that x t ≥ 1 implies x t 1 ≥ 1 for all t.
Notice that functions f 1 and f 2 do not depend on m t , thus both conditions "f 2 decreasing" and "x t ≤ x t−1 " satisfy m t 1 ≥ m t for all t ≥ 1, as a consequence it is necessary to consider an i.c.m 0 small enough to obtain m t 1 ≥ m t for all t ≥ 0. Similarly, we require x 0 such that 1 ≤ x 0 ≤ a 1 /2.
Observe that the previous proposition defines parameter values and initial conditions such that m t 1 ≥ m t for all t, that is, at any time the system uses the first equation defining f 3 x, m, t see 3.4 which leads to: w t 1 ⇒ w t 1 1.Following the same steps of Proposition 3.2, it is possible to see that there are no parameter values such that m t 1 < m t for all t.In other words, for any parameter values and initial conditions the system sooner or later will use the first equation defining f 3 x, m, t .This means that a movement from class 2 chartists to class 1 fundamentalists always occurs.
The trapping set X defined by Proposition 3.2 allows us to study the local asymptotic stability of the fundamental steady state in the case in which the dynamical system is restricted to the subspace X.Then, the map T X : x t , m t → x t 1 , m t 1 is defined by:

3.15
The Jacobian matrix evaluated at the fundamental steady state E f is: which implies that one eigenvalue is 0 and thus smaller than one in modulus , while the other eigenvalue is ∂f 1 /∂x t 1, tanh{−Cβ/2}, 1 1 − α/λσ 2 1 r .Under the hypothesis of Proposition 3.2, this eigenvalue is smaller than one in modulus as well.In other words, if α 1 r /λσ 2 ≤ 1, the fundamental equilibrium w f 1, x f 1, m f tanh{−Cβ/2} is locally asymptotically stable for high values of a and for any initial condition x 0 , m 0 , w 0 such that 1 ≤ x 0 ≤ a 1 /2, m 0 −1 ≥ 0 small enough and w 0 1.Summarizing, in the case in which, at the initial time, the price is below the fundamental value and the market is dominated by chartists while fundamentalists own the total wealth, the system converges to the fundamental steady state E f .

Numerical Simulations
In this section we move to the study of the asymptotic dynamics by using numerical simulations.
Firstly, we consider the case in which Proposition 3.2 holds.In Figure 2 a we present a diagram of the state variable w t with respect to a.We choose parameter values such that the condition α 1 r /λσ 2 ≤ 1 of Proposition 3.2 holds, hence, if a is great enough, our system admits the trapping set X. Furthermore, we consider an initial condition belonging to X, that is, at the initial time, the market is dominated by chartists while all the wealth is owned by fundamentalists and also, being x 0 ≥ 1, the price is below the fundamental value.The diagram confirms the convergence to the fundamental value w f 1.Notice that if a is low enough, the figure is dominated by the black region in which the trajectory does not converge to a cycle of period k k > 1 nor to a complex attractor, but we observe a long transient LT where with LT we indicate the case in which the trajectory converges to a fixed point after a very high number of iterations .In fact, if a is low enough, the state variable w t tends to the fundamental steady state very slowly and, after a large number of iterations, the attractor has not yet been reached.
In Figure 2 b we observe the trajectory with a 0.3, starting from the same initial condition.After 20000 iterations, the fundamental steady state has not yet been reached w t is still far from w f , however numerical computations show that it will be approached very, very slowly as t → ∞ .
Let us go on to consider parameter values such that the set X is nontrapping and, at the initial time, the market is dominated by one class of agents owning the greater fraction of the total wealth.We first consider the case in which, at the initial time, the market is dominated by fundamentalists, while the initial price is above its fundamental value.In Figure 3, we present some bifurcation diagrams of the state variable w t with respect to β the intensity of choice for different values of a.We found an a-typical bifurcation sequence due to the particular form of our system piecewise smooth which admits high period cycles or complex dynamics.Notice that, as a increases, the final dynamics becomes simpler.In fact, in panel d the state variable converges to the value w −1, such that the total wealth is owned by chartists.
A similar feature is also observed by considering the state variable x.The graphs presented in Figure 4 show the evolution of x t p /p t versus time.Being p constant, if x t fluctuates then also p t fluctuates i.e., the qualitative dynamics of x t completely describes that of prices .As for the relative wealth, prices show fluctuations for low values of a.In panel a , a 10-period cycle is observed while in panel b the period of the attracting cycle is 23.However, if a is great enough, the final dynamics becomes simpler in panel c prices convrge to the fundamental value .Numerical simulations show a similar feature also in the opposite case, that is, m 0 and w 0 are close to −1.Such evidence confirms the main results of the relevant literature.In fact, models with heterogeneous agents and a switching mechanism are able to reproduce the stylized facts observable in real markets, that is, periodic or even chaotic fluctuations in prices, excess of volatility, bubbles and crashes.
In order to better investigate the previous feature, we move towards the extreme case in which, at the initial time, all agents are fundamentalists and they own the total wealth.Moreover, in the following, we focus on the more interesting a range of values, that is, a < 1 r.
In Figure 5 a , we present the trajectory of the state variable w t while assuming that, at the initial time, m 0 w 0 1 and the price is above its fundamental value.We choose two different values of a and observe that if a is low enough the system fluctuates a 12-period cycle is observed while, as a increases, the long-run dynamics becomes simpler w t → 1 after a LT .Numerical simulations show the existence of a value a such that for all a ∈ a, 1 r the state variables converge to E f , while more complex dynamics are exhibited if a < a, that is, for a low enough see Figure 6 .Notice that the system preserves similar features, that is, the stabilizing effect of a in the long-run, also in the extreme case w 0 −1 m 0 , that is, at the initial time, the market is dominated by chartists who own all the wealth.
In Figure 6 we observe a succession of periodic windows which occur at border collision bifurcations.These noncanonical bifurcations have mainly been studied in the context of piecewise linear maps.Hommes and Nusse 26 showed, for instance, that a "period three to period two" bifurcation occurs for a class of piecewise linear maps.iii for a > a, the periodic windows terminate in convergence.
Notice how complexity is mainly due to border collision bifurcations which are involved by wealth dynamics.This means that the new mechanism which explains the evolution of wealth plays an important role in the qualitative dynamics observed in the longrun.
In order to consider also the role of the parameter β, in Figure 7 we present a twodimensional bifurcation diagram in the parameter plane a, β in the extreme case m 0 w 0 1 at the initial time, all agents are fundamentalists and they own all the wealth and the price x 0 is above the fundamental value.Rich dynamics is exhibited and the final behavior increases in complexity as β increases according to what happens in asset-pricing models with heterogeneous agents and adaptiveness .
A similar behavior is observed in Figures 8 and 9.In such cases, we consider two different i.c., that is, m 0 −1 and w 0 1 all agents are chartists but all the wealth is owned by fundamentalists and m 0 1 and w 0 −1 all agents are fundamentalists but all the wealth is owned by chartists .Observe that, also in these cases our system may exhibit fluctuations or aperiodic patterns and the final dynamics strictly depends on the parameter value.This study confirms the evidence that the system is more complicated for high values of β and low values of a.
By comparing Figures 7, 8 and 9, we also observe that the final dynamics is affected by the choice of the initial conditions.In order to focus on the role of the initial condition, we fix a low enough.In Figure 10, we present the basins of attraction in the plane m 0 , w 0 , where the initial price is below the fundamental.Observe that, if we move parameter β, the structure of the basin also undergoes a change.More precisely, it seems to become more complex as β increases, confirming the evidence previously obtained.In fact, the structure of the basin becomes fractal providing the strong dependence of the final dynamics w.r.t. the initial conditions in panel b outside the stability region the system may converge to a 10-period cycle or to a more complex attractor .Finally, the basins of attraction in the plane m 0 , x 0 are presented for an initial condition w 0 0, that is, at the initial time, the wealth is equally shared between the two groups.Again, the structure seems to increase in complexity as β increases.Observe that the stability region the blue one reduces as β increases and that outside this region different attractors coexist i.e., a 10-cycle or a 11-cycle and a more complex attractor .The other parameter values as in Figure 5.In contrast with the existing models in the CRRA framework, which suggest that wealth dynamics will lead to a monomorphic behavior in the long-run, our simulations show complexity in long-run wealth evolution.A possible explanation is based on the key new concept of this paper, that is, our assumption about wealth redistribution.In fact, a great number of simulations with constant proportions of agents i.e., the model without switching shows that the relative wealths converge to 0 and 1, in other terms some classes  survive, some classes do not.We obtain the same result by simulating the model for high values of the intensity of choice β: the relative wealths still converge to 0 and 1.In other terms, wealth-driven selection works for the simulation without switching or for high β, differently from the previous simulations of the general model with switching .This suggests that the outcome wealth dynamics, able to exhibit complexity, strictly depends on the new switching mechanism introduced, hence it is responsible for the discrepancy with the literature concerning heterogeneous agent models.

Conclusions and Further Developments
Motivated by recent developments in the class of heterogeneous agent models of asset price and wealth dynamics, we developed an analytical adaptive model with two types of heterogeneous agents.The model is developed in the discrete time setting of standard portfolio theory, in that agents are allowed to revise their portfolios over any time interval.
Both expectation feedback and adaptiveness are common features of recent heterogeneous asset-pricing models.In addition, our model is able to characterize the evolution of the distribution of wealth when agents switch from an old strategy to a new strategy, according to their past performances.
The new contribution of our model comes from the assumption that all agents belonging to the same group agree to share their wealth whenever an agent joins the group or leaves it .This assumption allows us to characterize equilibrium price and wealth evolution among heterogeneous agents.Moreover, it leads to different success indicators of each strategy, the difference in the fraction of agents and the difference in the relative wealths of the groups.In other words, a certain strategy can be successful in terms of the number of agents using it or in terms of the wealth of the respective group.
In performing the analysis, we focus on the case with fundamentalist and chartist agents.The final system is defined by a three-dimensional piecewise map which is not easily tractable.Nevertheless, we are able to derive all the steady states analytically, proving the existence of two kinds of equilibria: fundamental steady states and nonfundamental steady states.Moreover, we prove the existence of a continuum of fundamental steady states for some parameter values.We also show that the system admits a trapping region.The map restricted to this subset of the phase space is tractable and allows us to perform the stability analysis of the fundamental equilibrium.
The asymptotic dynamics is studied by using numerical simulations which show the great variety of qualitative behavior presented by our model and their relation to a number of parameter values.Several border collision phenomena are observed, which are due to the new mechanism introduced into wealth dynamics.To examine this in greater detail, numerical simulations suggest that wealth-driven selection some classes survive, some classes do not works for the model without switching or for high β, in contrast with our general framework with switching .In this last case, the wealth dynamics shows complexity in the long-run, mainly due to the key new concept of this paper, namely the assumption about wealth redistribution.
In line with existing heterogeneous agent models, our framework is able to explain some economic issues such as: the survival of irrational agents, the role of market forces wealth-driven selection and some stylized facts fluctuations, excess of volatility, bubbles and crashes .
An interesting further contribution would be to consider the possibility of a mutual switch between strategies.
11 and Anufriev 12 .More recently, Anufriev and Dindo 13 provides an analytical derivation of the results of the Levy et al. model.This work incorporates the feedback of past prices with investment strategies.

Figure 1 :
Figure 1: Basin of attraction in the plane m, w for the initial condition x 0 1 and parameter values a 1, α 4, λ 1, σ 2 1, r 0.02, C 0.5 and β 1.The white point corresponds to E f while the black point corresponds to E nf .

Figure 2 :
Figure2: a Diagram of the state variable w t with respect to a for the initial condition x 0 ≥ 1, m 0 −1 and w 0 1 and parameter values α 0.5, λ 1, σ 2 1, r 0.02, C 0.5.We ignore the first 1000 iterations and we plot the following 5000 values of w t for each value of a. b Trajectory of the state variable w t versus time.We consider a 0.3 and we plot the first 20000 iterations.

Figure 3 :
Figure 3: One-dimensional bifurcation diagram of the state variable w t with respect to β for the initial condition x 0 0.9, m 0 0.8 and w 0 0.8 and parameter values α 1, λ 1, σ 2 1, r 0.02, C 0.5.In panel a a 0.5, in panel b a 0.9, in panel c a 1.2 and in panel d a 2.

Figure 6 :
Figure 6: Bifurcation diagrams of the state variables w.r.t.a.Initial condition and parameter values as in Figure 5.

Figure 8 :
Figure 8: Two-dimensional bifurcation diagram in the parameter plane a, β for and i.c.x 0 1.3, m 0 −1w 0 1.The other parameter values as in Figure 5.

Figure 9 :
Figure 9: Two-dimensional bifurcation diagram in the parameter plane a, β for and i.c.x 0 1.3, m 0 1w 0 −1.The other parameter values as in Figure 5.

Figure 10 :
Figure 10: Basins of attraction in the plane m 0 , w 0 for x 0 1.3, a 0.1 and the other parameter values as in Figure 5. a β 1.8, b β 2.

Figure 11 :
Figure 11: Basins of attraction in the plane m 0 , x 0 for w 0 0, a 0.1 and the other parameter values are as in Figure 5. a β 1.25, b β 2.
that w h,t W h,t /n h,t and w h,t W h,t / W 1,t W 2,t , hence w h,t W 1,t W 2,t w h,t /n h,t , we divide both numerator and denominator for W 1t W 2t to obtain Under the assumption of an i.i.d.dividend process the fundamental value is constant and given by E y t 1 /r y/r so that we obtain p t 1 − p t /p t H t N D t − N S t , where N D t is the total number of shares demanded at time t and N S t denotes the supply of shares at time t.
t 1 − p t E t,f p t 1 − p n 1,t z 1,t w 1,t n 2,t z 2,t w 2,t W 1,t W 2,t 2.21 and that the market-maker rule is not affected by the level of W 1,t W 2,t /p t .Consequently, we obtain H t N D t H t n 1,t z 1,t w 1,t n 2,t z 2,t w 2,t / W 1,t W 2,t .After introducing the form H t • α • with α > 0, we can rewrite 2.19 as p t 1 − p t p t α n 1,t z 1,t W 1,t /n 1,t n 2,t z 2,t W 2,t /n 2,t