Learning in a double-phase cobweb model

In this paper, we study a class of markets, among which we can mention agricultural and energy markets, characterized by seasonality, i.e., in which demand and/or supply conditions cyclically alternate with a precise and known periodicity. We propose a new theoretical framework based on a cobweb model with adaptive expectations, accordingly modified to be consistent with market’s seasonality. The model, consisting in a second-order non-autonomous difference equation, is investigated with the aim of understanding how the periodical nature of the market together with the agents’ expectation formation mechanism affects the resulting dynamics. We analytically prove the emergence of dynamical scenarios that are missing in the classic cobweb model for non-seasonal markets, such as quasi-periodic dynamics and an ambiguous role on stability of the expectation weight. Finally, we discuss their economic rationale with the help of numerical simulations. In such a peculiar economic framework, agents’ learning plays a key role to explain the dynamical properties of economic observables.


Introduction
The supply and/or consumption patterns characterizing some classes of goods are affected by the particular time at which they are produced and/or used, with the outcome of recurrent price fluctuations that follows a broadly predictable sequence. This peculiarity is referred to as seasonality. The provision of agricultural goods is a clear example of such a situation. Crop production has to be planned in advance and its harvest usually takes place in a single, specific season, giving rise to the well-known "harvest lows" and "post-harvest rally" price behavior (see, e.g., Rahn 1968;Welch et al. 2011). Another example consists of energy goods, in particular electricity, whose consumption changes depending on the year period, day of the week or even the hour of the day, and whose production can be in part affected by time as well (e.g., solar energy). Being able to understand the seasonal effects in energy markets is fundamental to forecast price behavior (Parisio and Bosco 2008;Bunn 2010, 2008a). Finally, among other relevant examples of goods whose supply and/or consumption is affected by seasonality, we can mention clothing, toys and food (Wray 1958;Grant et al. 2010;Soysal and Krishnamurthi 2012). It's worth mentioning that such markets are often characterized by peculiar distributions in economic observables. 1 In seasonal markets, demand and/or supply curves change over time with underlying deterministic patterns, according to the daily, weekly, monthly recurrence of consumption and production. Therefore, qualitatively identical couples of demand/supply curves arise with cyclical regularity, giving rise to a characteristic and to a large extent predictable seasonal pattern 2 in the resulting price series. Indeed, suppliers are aware of the market seasonality, and they take their production decision accordingly.
Given the relevance of the previous class of markets, the aim of the present research is to develop a theoretical model for the study of the evolution of economic observables, like prices, quantities, in a prototypical market in which demand and supply functions are affected by seasonality. To this end, we focus on the simplest kind of cyclicity characterized by period 2. The general market under consideration is unique (as well as the exchanged good), but it is structured as a sequence of cyclically alternating phases, each one characterized by a couple of demand/supply functions. For such reason, the considered class of seasonal markets can be addressed as double-phase markets, in opposition to the classic framework to which we refer as single-phase market. The most suitable setting to describe the previous class of markets is the competitive one, 3 so the methodological approach we pursue relies on the cobweb framework. 4 A key problem in the theoretical description of markets lies in modeling the way agents make production decisions on the basis of their information endowment about the economic environment, i.e., the way they form expectations about prices. Classic expectation formation mechanisms proposed in the literature for single-phase markets, like static (Ricci 1930;Leontief 1934;Ezekiel 1938) and adaptive expectations (Nerlove 1958) (see (Hommes 2013) for further discussion on expectation mechanisms in cobweb model), are not suitable for a double-phase market, as they are not shaped to take into account seasonality, so the first problem we have to address is that of agents' learning in a double-phase framework. Perfect rationality assumption is not appropriate for such frameworks, due to the intrinsic complexity of the economic environment and the inability of such hypothesis to give explanation of the phenomena characterizing economic variables' dynamics.
The expectation formation mechanism we propose is grounded on the classic adaptive expectations for single-phase markets. The agents form their expectations learning from the last two periods, i.e., in a double-phase framework, from a whole sequence of market phases, giving more relevance to the last market realization that exhibited the same couple of demand/supply functions that characterize the next market phase. The relevance that the agents give to each of the two last observed expectation errors is encompassed in a phase-weight, and the weighted average of such expectation errors determines the extent of the adjustment of the previous expected price, as in a singlephase cobweb model, by an expectation weight. We stress that such a mechanism is the unique element in the model that allows for a link between two otherwise independent market phases. Hence, the agents, in forming their expectations about prices, can learn from both market phases and, in so doing, transfer information from one phase to the other. From the mathematical point of view, the resulting model is essentially different from a cobweb model for a single-phase market and consists of a non-autonomous difference equation. 5 Even if the modeling based on non-autonomous equations is slightly less common in the economic context with respect to those biological and natural, we can mention some contributions in which autonomous equations proved not to be suitable to describe or study economic phenomena. For example, in Clarck and Munro (1975) a model in capital-theoretic terms for fisheries economics is proposed and studied, with the aim of identifying an optimal consumption strategy through time. In this setting, non-autonomous components are used to model price and harvesting cost shifts. Moser et al. (2016) studied the optimal control problem of renewable energy production, in which supply is intrinsically time-fluctuating with seasonality. Finally, Cheban et al. (2013) studied a growth model with endogenous population growth on the basis of the analysis of quasi-linear non-autonomous difference equations.
Due to the novelty, a relevant part of this contribution is devoted to the study of analytical properties of the model, to compare it with the classic single-phase cobweb model. The resulting framework exhibits much more elements of complexity and ambiguity than that classic, in which instability can just arise by means of a period doubling bifurcation and the expectation weight has a destabilizing effect. Conversely, in a double-phase cobweb model, both periodic, chaotic and quasi-periodic dynamics can arise, even for a given market configuration, and the expectation weight can also have a stabilizing role. Moreover, we show that when agents form their expectations on the basis of errors related to both market phases, they can be able to learn how to correct erratic price dynamics characterizing each phase. The main drivers of the emergence of new phenomena are discussed, both from the dynamical and economic points of view, with the help of numerical simulations.
The remainder of the paper is organized as follows. In Sect. 2, we introduce the double-phase cobweb model, which is then studied from the analytical point of view in Sect. 3. The dynamical and economic rationale of the results is discussed in Sect. 4. Conclusions and future perspectives are collected in Sect. 5. Proofs of propositions are found in Appendix.

Double-phase cobweb model
We consider a family of markets in which the unique traded good is characterized by consumption and/or production that varies depending on the particular time at which the good is exchanged, with a deterministic cyclical recurrence (seasonality) with period 2. We assume that exchanges occur at discrete times τ ∈ N. We then have a sequence of market phases, which, thanks to the assumption of deterministic cyclicity of period 2, can be represented through a sequence of couples of demand/supply functions (D 1 , S 1 ) and (D 2 , S 2 ), each related to a particular market phase. We assume that demand functions D i : I → R + , i = 1, 2, where I is a suitable interval, are smooth and decreasing functions. Similarly, we assume that supply functions S i : J → R + , i = 1, 2, where J is a suitable interval, are smooth increasing functions. 6 We remark that the shapes of both demand and supply functions, as well as their domains I and J , may depend on the institutional characteristics of the particular market under consideration. We only assume that S i (J ) ⊂ D i (I ) and that each function D i always has one intersection with the corresponding function S i , for i = 1, 2. We refer to the time level identified by τ as the phase-time level, as it consists of a sequence of market phases. The phase-time level is graphically sketched in Fig. 1 using black color.
Without loss of generality, we can assume that when τ is odd (respectively, even), the market is characterized by demand/supply functions D 1 and S 1 , (resp. D 2 and S 2 ). We then have that two phase-times τ a > τ b are in-phase (i.e., share the same demand/supply functions couple) when τ a = τ b + 2n (i.e., when a and b are both even or odd) for some n ∈ N, while, otherwise, they are out-of-phase (i.e., they are characterized by different demand/supply functions couples).
In addition to the phase-time level, it is possible to introduce another time perspective at which study a double-phase market, in which at each time t ∈ N a sequence of two consecutive couples of demand/supply functions, is simultaneously considered. We refer to this time level t as period-time level, in which each period-time t collects a whole period of phase-times. 7 . The period-time level, superimposed to the phase-time level, is sketched in Fig. 1 in red color. To give a concrete example, if phase-time represents the sequence of daytimes and nights (each daytime is followed by a night, which is in turn followed by a daytime and cyclically so on), each period-time represents a whole day (which is followed by another whole day), which is characterized in terms of a daytime-night couple.
The market demand and supply functions for a double-phase market can be, respectively, described by introducing a unique couple of time periodic functions D : where p τ is the market price at τ. At each phase-time τ, the demanded and supplied quantities are, respectively, q D τ = D( p τ , τ ) and q S τ = S(π τ , τ ), where π τ is the price that agents expect for phase-time τ.
To complete the cobweb model, we need to detail the expectation formation mechanism. The further complexity of double-phase markets with respect to those single-phase makes clear that it is almost impossible for the agents to know each aspect of the market and to perfectly foresee its future evolution, so it is more appropriate to consider a boundedly rational expectation formation mechanism for the agents. However, the agents are indeed aware of the demand and supply seasonality, and so they know that phase-time τ + 1 will be in phase with phase-time τ − 1 (and not with τ ).
The boundedly rational mechanism we propose is grounded on the adaptive expectations (Nerlove 1958;Chiarella 1988;Hommes 1994Hommes , 2013 of the classic single-phase cobweb framework, for which the next period expected price is adapted from the last period one on the basis of the last expectation error, i.e., the difference between the last expected and realized price. In a double-phase setting, information comes from both in-phase and out-of-phase past market realizations. Even if last in-phase information is indeed, the most significant (as demand/supply functions at time τ +1 will be the same as those at phase τ − 1, and not as those at time τ ), last out-of-phase prices provide the latest price information, which might signal particular demand/supply conditions that are expected to last for some times τ . 8 We then assume that expected price π τ +1 is formed anchoring to the previous in-phase expected price π τ −1 and adapting it on the basis of the past expectation errors. In particular, agents can take into account both in-phase, p τ −1 − π τ −1 , and out-of-phase p τ − π τ expectation errors. The resulting double-phase adaptive expectation formation mechanism is then where ω ∈ (0, 1] is the expectation weight and 0 ≤ ν ≤ 1 is the phase-weight, which specifies the relevance given by the agents to phase errors. We stress that as ω increases, more relevance is given to expectation errors, while, as it decreases, the anchoring bias to the previous in-phase expected price becomes more significant. Since in-phase error p τ −1 − π τ −1 is the most significant for the determination of π τ +1 , we assume that ν > 1 − ν, i.e., ν > 1/2. We underline that phase-weight ν is (inversely) related to the degree of coupling of different market phases, which is null when ν = 1 (since no relevance is given to out-of-phase errors) and maximum when ν ≈ 1/2 (since in-phase and out-of-phase error approximatively have the same relevance). In the former case, phases are independent, in the sense that the expectation errors at odd phase-times have no influence on expected prices for even times, and vice-versa. If ν < 1 but still close to 1 (ν 1), we have that out-of-phase errors have a small influence on π t+1 , and so in this case we can speak of a weak coupling of phases. As ν decreases, out-of-phase errors become more and more relevant, and the coupling degree increases. Finally, we note that for ω = 0, as in classic adaptive expectations, we would have no dynamical adjustment, as π τ +1 = π τ −1 .
Imposing temporary equilibrium condition D( p τ , τ ) = S(π τ , τ ), we obtain p τ = D −1 (S(π τ , τ ), τ ), where D −1 (q τ , τ ) is Combining (2) and temporary equilibrium condition, we obtain the double-phase cobweb model for the phase-time level, represented by the second-order non-autonomous difference equation (3) for given initial expected prices π 0 and π −1 . We stress that the non-autonomous nature of the present model is intrinsically connected with the seasonality of demand/supply functions characterizing the market itself, which in turn induces the peculiar form of adaptive expectations.
In general, the non-autonomous equation (3) does not possess a steady state, because of the cyclic nature of the demand and supply functions. In single-phase markets, a temporary equilibrium is a steady state when it clears the market and it is constant in time. In this sense, we can speak of a steady-state equilibrium. For a double-phase market, assuming that phase-time τ corresponds to the ith phase of the market, we can only require that p τ is a market clearing price for phase i (i.e., D i ( p τ ) = S i ( p τ )) and that p τ +2n = p τ for any n ∈ N. From a dynamical viewpoint, this corresponds to a steady cycle 9 of period 2.
To be able to introduce a definition of steady-state equilibrium for double-phase markets, we need to consider model (3) at the period-time level t (see the upper part of Fig. 1), at which we study the evolution of vectors π t ∈ R 2 , consisting of a whole cycle of 2 expected prices. From π t , we can then obtain the corresponding vectors of realized prices and of traded quantities. From the previous considerations and assumptions on functions D i and S i , we have that there exists a unique vector p * = ( p 1, * , p 2, * ) that realizes This allows introducing the following definition.
Definition 1 We say that p * is a period steady-state equilibrium if it fulfills (4). We define each p i, * as the ith phase steady-state equilibrium.
The dual time representation of double-phase markets in terms of phase-time and period-time is intimately related to the representation of the proposed model in terms of a non-autonomous and autonomous dynamical system. Non-autonomous dynamical equation (3) was obtained at the phase-time level τ ; to rewrite it at the period-time level t, we consider functions ε i : J → R for i = 1, 2 defined by ) − x , i = 1, 2, which allows introducing the autonomous dynamical system where functions F i : J 2 → R, i = 1, 2 are defined by the right-hand sides of the previous equations. The autonomous system (5) can be rewritten in the compact vector form as π t+1 = F(π t ) where, setting π t = (π 1 t , π 2 t ) for t ≥ 0, function F : J 2 → R 2 is defined by F(π t ) = (F 1 (π 1 t , π 2 t ), F 2 (π 1 t , π 2 t )). The way the autonomous system (5) is linked to the non-autonomous equation (3) is clarified by the following proposition.
We recall that the existence of two different time levels is a consequence of the double-phase framework. However, it is also significantly connected to the mathematical characterization of the model. In fact, the model is introduced in a more straightforward way at the phase-time level, but it can be more easily studied at the period-time level (e.g., its stability can be suitably investigated by means of the wide literature concerning autonomous systems). Expectation formation mechanism (2), which is grounded on the sequence of market phases, is more naturally introduced at the phase-time level. In (5), each element π i t of vector π t+1 represents the expected price of a distinct phase, and consequently, each equation of system (5) describes the evolution of single phase's prices. We note that system (5) consists of 2 coupled equations, in general depending on some or all the components π i of vector π. However, in the extreme case of ν = 1, expectation mechanism (2) simplifies into and model (5) reduces to the diagonal system In this case, (6) is close to the classic adaptive expectation formation mechanism and each π i τ +1 in (7) only depends on the in-phase previous expected price, so we actually have 2 distinct, independent equations (which provide independent dynamics). In this case, the model can then be assimilated to 2 independent classic single-phase cobweb models with adaptive expectations. For this reason, in what follows we consider the case of ν = 1 as modeled by 2 independent equations (and not by a single diagonal system), while we consider all the remaining cases of ν = 1 as represented by a single two-dimensional system. We will, respectively, refer to (5) for ν < 1 and to (7) as coupled and uncoupled model, and by saying uncoupled (respectively, coupled) phases we will refer to each phase of the coupled (respectively, uncoupled) model. We will be mainly interested in studying the behavior of the coupled model, while the uncoupled model will be treated as an intermediate situation between the classic single-phase and the coupled double-phase cobweb models.

Analysis of the model
We start studying the possible steady states of system (5) in the following proposition, which guarantees that the expectation formation mechanism preserves the steady-state equilibrium.
Since the expectation mechanism (2) is a generalization of classic adaptive expectations, we can compare the resulting dynamics with those of the single-phase setting and understand what effects are introduced when agents act in a double-phase setting. From the stability results of the single-phase cobweb model with adaptive expectations 11 we have that a steady-state equilibrium p * is locally asymptotically stable provided that namely if, at p * , the slope of the supply function is sufficiently small with respect to the absolute value of the slope of the demand function [the rightmost inequality in (8) is automatically fulfilled since S /D is negative]. We recall that |s| corresponds to the ratio between the elasticities of supply and of demand, whileω, when belonging to (0, 1), is the stability threshold on ω above which the equilibrium becomes unstable. Along the lines of (8), we can introduce the relative slopes of functions S i with respect to D i at p i, * , defined by In what follows, we will simply refer to each s i as to relative slope or relative elasticity. The remainder of this section is devoted to the study of the local stability of equilibrium with respect to expectation weight, phase-weight and relative slopes. To describe the possible dynamical behaviors on varying a parameter ξ (which will be either ω, ν or s i ) inside an interval I = (ξ a , ξ b ) 12 we introduce the following scenarios, which are sketched in Fig. 2 • flip (FD) and Neimark-Sacker (NSD) destabilizing scenarios, if there exists ξ 1 ∈ (ξ a , ξ b ) such that p * is stable on (ξ a , ξ 1 ) and unstable for ξ ∈ (ξ 1 , ξ b ) and for ξ = ξ 1 stability is, respectively, lost through a flip and a Neimark-Sacker bifurcation; Finally, we remark that, in the following propositions, we avoid to detail situations in which stability or instability occur only at the boundary of parameter sets, as they can be qualitatively encompassed into the other scenarios.
The role of ω and ν on the local asymptotic stability of p * is studied in the following proposition.
The previous proposition is actually the generalization of the stability condition (8) to double-phase markets. In agreement with the classic cobweb model, local stability depends on the expectation weight ω and on the relative slopes at the steady state. We note that stability conditions (9) are symmetric with respect toω i , i.e., with respect to the relative slopes s i , so we can assume |s 1 | ≥ |s 2 |.
Due to the linear (9a) and quadratic (9b) conditions in both ω and ν, we can have up to three stability thresholds. To obtain a relevant characterization of local stability on varying ω and ν, we proceed as follows. Assuming a fixed economic setting at the equilibrium (described by s 1 , s 2 ), we investigate how increasing the degree of coupling between phases (namely, decreasing ν from ν = 1 to ν → 1/2) affects the possible scenarios on varying the expectation weight. To foster understanding of the results, it's worth focusing on the very simple situation in which the two phases are uncoupled (ν = 1). As we are going to show, the dynamical behavior of the coupled Fig. 3 Stability scenarios of the uncoupled model (ν = 1). A solid (respectively, dotted) horizontal line is used for stability (respectively, instability) intervals. Vertical dotted lines subdivide (0, 1) into intervals in which, for any ω, p i, * are both stable (ω ∈ I ss ), p 1, * is unstable and p 2, * is stable (ω ∈ I su ) and p i, * are both unstable (ω ∈ I uu ) model is strongly influenced by that of the uncoupled one, so in the next proposition we summarize the possible stability scenarios for the uncoupled model. The proof is omitted, since it can be easily inferred by (8).
Stability is always lost through a flip bifurcation.
The four situations described in Propositions 4 are depicted in Fig. 3. Only when both |s i | < 1 (case I) or |s 1 | = |s 2 | > 1 (case II) phase steadystate equilibria p 1, * and p 2, * are either both locally stable or both unstable for each expectation weight. Conversely, if we have different relative slopes at each p i, * and |s 1 | > 1, for some values of ω only one phase steady-state equilibrium is stable.
What happens when agents, through their expectation mechanism, introduce a coupling between the dynamics of different phases? Firstly, due to the strongly coupled nature of the dynamical system (5), a whatever weak coupling (ν 1) causes p i, * to be necessarily either both locally asymptotically stable or both unstable. However, the phase coupling does not completely cancel out the dynamics of the uncoupled phases, from which, as we are going to show, it is still possible to infer and understand the behavior of the coupled model. Observing Fig. 3, we can always subdivide interval (0, 1] into three (possibly empty) subintervals: -I ss = (0, min{ω 1 , 1}), in which p i, * are both stable; -I su = (min{ω 1 , 1}, min{ω 2 , 1}), in which p 2, * is stable while p 1, * is unstable; -I uu = (min{ω 2 , 1}, 1), in which p i, * are both unstable.
In the next propositions, we study the possible scenarios as ω increases on either ω ∈ I ss , ω ∈ I su or ω ∈ I uu . We start considering the simplest situation, in which both phase steady-stable equilibria are stable for ν = 1.
The previous proposition predictably says that coupling stable uncoupled dynamics we always obtain stable dynamics. When instead only one-phase steady-stable equilibrium is stable for ν = 1, results become more articulated.
Moreover, the set of values of ω for which the period steady state is locally asymptotically stable becomes increasingly large as ν decreases.
Before commenting Proposition 6, we investigate what happens when both uncoupled phase steady-state equilibria are unstable.
Proposition 7 Letω 2 < 1 and ω ∈ I uu , then there exist ν 2 < ν 1 , with ν 1 ∈ (1/2, 1] and In particular, we have that ν 1 = 1 if and only if |s 1 | = |s 2 |. Moreover, the set of values of ω for which the period steady state is locally asymptotically stable grows as the coupling become increasingly stronger.
Propositions 6 and 7 deserve several comments. The possible stability loss through either a flip or a Neimark-Sacker bifurcation is uniquely determined by the dynamical behavior of the uncoupled model. Period steady-state equilibrium loses stability at someω through a period doubling bifurcation only if, for thatω, p i, * are one stable and the other unstable for ν = 1, while Neimark-Sacker bifurcation can occur at someω only if both p i, * are simultaneously unstable for thatω in the uncoupled model. The other remarkable result is that the expectation weight can have a stabilizing effect, in the sense that increasing ω may lead dynamics from instability to stability. This is possible only when p * loses stability through a period doubling bifurcation. Conversely, when stability is lost at someω through a Neimark-Sacker bifurcation, Proposition 7 shows that p * cannot be locally asymptotically stable for any ω >ω. The emergence of different kinds of unstable dynamics and the possibly ambiguous role of the expectation weight are two of the most significant dynamical novelties introduced by the double-phase framework. We will come back on the interpretation of such important results in Sect. 4.
Focusing on Proposition 6, we have that if the coupling degree is sufficiently small and p 1, * and p 2, * are, respectively, locally asymptotically unstable and stable in the uncoupled model, a flip bifurcation always occurs as ω varies in I su . According to Proposition 6, as ν decreases, the flip destabilizing scenario can evolve in different Possible stability regions in the (ω, ν)-plane whenω 1 =ω 2 < 1 (A), whenω 1 < 1 <ω 2 (B) and whenω 1 <ω 2 < 1 (C). Red color is used for instability regions. Blue line N is the stability threshold curve, crossing which p * loses stability through a Neimark-Sacker bifurcation. As a comparison, we plot a vertical dashed line representing the stability thresholds of the uncoupled (ν = 1) model. Horizontal dotted lines show the possible scenarios on varying ω for fixed ν (color figure online) ways, depending on the relative slopes |s i |. Increasing the coupling degree, we may have that p * becomes unconditionally stable for any ω ∈ I su or a mixed scenario can occur, with the consequent return to stability as ω increases. In this last case, suitably decreasing ν we may also have an unconditionally stable scenario as ω varies in I su .
Concerning Proposition 7, the remarkable aspect is that when neither p 1, * nor p 2, * are locally asymptotically stable for ν = 1, on varying ω ∈ I uu a Neimark-Sacker bifurcation always occurs for a suitable coupling degree. In general, we also have that instability is preserved under too weak couplings, while, depending on |s i | and if the coupling is sufficiently strong, we may have an unconditionally stable scenario as ω varies in I uu .
Juxtaposing the cases studied in Propositions 5-7, we are able to obtain stability regions in (ω, ν) planes, for given slopes s 1 and s 2 . We stress that as s 1 and s 2 change, stability regions change as well and some of the scenarios depicted in the next figures can disappear. In Fig. 4, we always focus on slopes configurations that provide the maximum possible number of scenarios simultaneously occurring. For synthetic exposition of the results, we limit to a graphical representation, plotting in the (ω, ν)-plane different stability regions corresponding to cases (II)-(IV), and we avoid depicting the unconditionally stable case (I). 13 .
In Fig. 4A, we consider case (II), namely the very special situation of |s 1 | = |s 2 | > 1. In this case, for each ω ∈ (0, 1], p i, * are either both stable or both unstable for ν = 1. Destabilization can only occur though a Neimark-Sacker bifurcation, and, for a suitably strong phase coupling, dynamics become unconditionally stable. In Fig. 4B, we consider case (III), in which |s 1 | > 1 > |s 2 |. When s 1 = s 2 , for a weak coupling the dynamics inherit instability of p * 1 in the uncoupled model. As the coupling strength increases, the stability interval becomes larger, and can even- 13 We stress that for case (II) the possible scenarios are obtained juxtaposing the results of Propositions 5 and 7 (this last restricted to the particular case |s 1 | = |s 2 |), for case (III) possible scenarios come from Propositions 5 and 6, while those of case (IV) can be obtained juxtaposing "matching" scenarios resulting from Propositions 6 and 7 (for example it is not possible to have a flip destabilizing scenario for ω ∈ I su followed by an unconditionally stable for ω ∈ I uu ). tually coincide with (0, 1]. Finally, in Fig. 4C we consider case (IV), in which both p i, * become unstable but for different expectation weights (ω 1 <ω 2 ). For a sufficiently weak coupling, instability always occurs through a flip bifurcation, with the stability threshold that is increasingly close toω 1 as ν → 1. Increasing the coupling strength, the flip destabilizing scenario is replaced by that mixed destabilizing, which is obtained putting side by side the mixed scenario for ω ∈ I su and the Neimark-Sacker destabilizing scenario for ω ∈ I uu . In this case, both stability and instability regions are unconnected. Further increasing the coupling degree, the mixed destabilizing scenario reduces to a Neimark-Sacker destabilizing one. Finally, we have a complete stabilization with respect to ω for sufficiently strong coupling degrees.
Before focusing on the role of the phase-weight and the relative elasticity, we simply stress how the range of possible scenarios obtained on varying the expectation weight in a double-phase cobweb model (i.e., unconditionally stable, flip destabilizing, Neimark-Sacker destabilizing, mixed and mixed-destabilizing scenarios) is by far wider than those obtained in a single-phase cobweb model (i.e., unconditionally stable and flip destabilizing).
From the previous analysis, it is possible to infer the local stability behavior with respect to the phase-weight. We can have up to three thresholds which can affect stability, two of them (ν F,i , i = 1, 2) coming from the solution of (9b) and the last one (ν N S ) from (9a). Depending on ω and s i , by investigating the reciprocal positions of ν F,i and ν N S as well as their belonging to (1/2, 1), it is possible to show the scenarios arising on varying ν, which can be inferred considering vertical sections of the stability regions reported in Fig. 4. We stress that it is possible to prove that the portrayed situations cover all the possible behaviors with respect to ν. We just briefly summarize the possible stability scenarios in the following proposition, omitting the proof.

Proposition 8
For suitable values of expectation weight ω ∈ (0, 1] and relative slopes at the phase steady-state equilibria, on varying ν we can have an unconditionally stable, flip destabilizing, Neimark-Sacker destabilizing, unconditionally unstable scenarios.
Proposition 8 says that, keeping the remaining parameters fixed, increasing ν has in general a destabilizing effect. This is in agreement with what suggested by the previous comments from which, recalling the results of Propositions 6 and 7, the stability regions with respect to ω becomes increasingly large as ν decreases.
Apart from unconditional scenarios, increasing ν has the sole effect of introducing instability in the dynamics, which can occur by either flip or Neimark-Sacker bifurcations. In particular, on varying the phase-weight, no mixed scenario is possible. The dual possible route toward instability is determined by the joint effect of ω and s i . Firstly, as noticeable looking at vertical sections of Fig. 4B, when we are in case (III) of Proposition 4, only unconditionally stable/unstable and flip destabilizing scenarios with respect to ν can occur. Conversely, when we are in case (IV), all the scenarios predicted by Proposition 8 can arise (see Fig. 4C). However, in both cases, keeping s i fixed but considering different the expectation weights, stability with respect to ν can exhibit a quite ambiguous behavior. To this end, we can focus on the stability regions reported in Fig. 4C, considering a phase-weight ν which is slightly smaller than that at the intersection between stability curves N and F (e.g., in the first plot, for ν ≈ 0.72). If the expectation weight is close toω 2 , a slight perturbation on it can lead instability to either occur through either a flip (for ω ω 2 ) or a Neimark-Sacker (ω ω 2 ) bifurcation.
In the remainder of this section, we briefly turn our attention to the role of the relative slopes. Firstly, we note that, for a single-phase cobweb with adaptive expectations, we may rewrite the stability condition as −1/ω < 1/2 S ( p * )/D ( p * ) − 1 . Mimicking the right-hand side of the previous inequality, we can introduce k i = 1/(2(s i −1)), i = 1, 2 and rewrite stability conditions (9a) and (9b) as whose graphical solution in (k 1 , k 2 )-plane for ω = 1 is reported in Fig. 5 for some values of ν. 14 As we can see, the stability region becomes increasingly large as ν decreases, in agreement with the previous results about ν.

Discussion of the results
In this section, we investigate the conclusions of the analytical investigations of Sect. 3 from dynamical and economic perspectives, focusing on the most relevant deviations from the results obtained in the classical cobweb framework. In particular, with the help of numerical experiments, we aim at providing an explanation of the following new facts: (a) stabilization can be possible if the agents form their expectations suitably taking into account out-of-phase price dynamics; (b) dynamics arising when phases are uncoupled can significantly change when the agents form their expectations learning from both phases; both periodic, chaotic and quasi-periodic dynamics can emerge, even for the same given market configuration; (c) a more cautious updating of expected prices by the agents can be the source of instability in the dynamics.
According to the theoretical analysis of Sect. 3, all the previous evidences occur for different market's configuration and agents' behavior settings. In what follows, we focus on just a few scenarios, in order to put in evidence the economic driving forces that are responsible for the new dynamical phenomena. All the remaining situations can be explained adopting similar arguments. We recall that the emergence of instability in the double-phase setting can be ascribed to two sources, being related either to the market configuration (encompassed in relative slopes s i ) or to the agents' behavior (encompassed in expectation weight ω and phase-weight ν). The former one is the unique possible source of instability in a classic cobweb model with static expectations, as adaptive expectations can just lead unstable dynamics to become eventually stable as the expectation weight decreases. 15 Concerning the role of the market constituents, we stress that the market outcome p τ , i.e., the price determined by temporary equilibrium condition, lies above (resp. below) the equilibrium price p i, * of the corresponding phase if the expected price for phase-time τ is below (resp. above) p i, * . If the relative elasticity of demand with respect to supply function is small, p τ is closer to p i, * than the expected price for phase-time τ, while, conversely, in the presence of a large relative elasticity, imposing temporary equilibrium condition, price p τ would be farther to p i, * than expected price for phase-time τ. In a single-phase cobweb model, if the agents adopt static expectations, p τ is assumed as the next period expected price, while under adaptive expectations, the previous expected price is just partially adjusted toward p τ , and its relevance is softened as the expectation weight decreases. In a double-phase framework, such two mechanisms act exactly in the same way in each phase, but the agents, making use of information coming from different phases, foster the emergence of scenarios that are completely different from those obtained in uncoupled phases.
In what follows, we focus on a specific example in which we introduce seasonality in the same demand and supply function shapes used in Hommes (1994) and Hommes (2013). We assume that cyclicity is described by a linear shifting, so, without loss of generality, we can encompass it in the demand function only. We then set S 1 (π ) = S 2 (π ) = S(π ) = b + tanh(λ(π − c)), where b ≥ 1, λ > 0 and c ≥ 0, and D i ( p) = a i −dp, i = 1, 2, where both a i and d are strictly positive. Moreover, in all simulations we set b = 1, c = 6 and λ = 10.
Even if the results are more effectively represented at period-time level t, their explanation is more evident when investigated at the corresponding phase-time level τ. To help in this, we report the expected price adjustment equations for a couple of consecutive phase-times, assuming, without loss of generality, that τ + 1 is odd. Setting g i (x) = D −1 i (S(x)) we have π τ +1 = π 1 t = π τ −1 + νω g 1 (π τ −1 ) − π τ −1 + (1 − ν)ω g 2 (π τ ) − π τ π τ +2 = π 2 t = π τ + νω g 2 (π τ ) − π τ + (1 − ν)ω g 1 (π τ +1 ) − π τ +1 . (11) In Fig. 6, we report a first family of simulations that are closely related to the stability scenario of Fig. 4B. We obtained them setting a 1 = 8.15, a 2 = 7.55 and d = 1, from which, by numerical estimation, the period steady state equilibrium results (π 1, * , π 2, * ) ≈ (6.1920, 6.0544), with equilibrium relative elasticities given by |s 1 | ≈ 7.5 and |s 2 | ≈ 0.82. The two-dimensional bifurcation diagram 16 casts a first glance on the dynamical behavior as the expectation weight and the coupling among phases increase. Since in the present setting we have |s 2 | < 1 < |s 1 |, just the elements characterizing the market at odd phase-times are possible sources of instability. This is evident looking at the couple of bifurcation diagrams in Fig. 6B, obtained on increasing the expectation weight and in which phases are uncoupled (ν = 1). The black diagram shows the unconditional stability of π 2, * , while the blue bifurcation diagram resembles that in Hommes (1994), with a stability loss occurring through a flip bifurcation, leading to chaotic dynamics that qualitatively simplify into a period-2 cycle for sufficiently large values of ω, when adaptive expectations become close to those static (ω = 1). We note that when the agents form their expectation on the basis of information coming from both market phases, the period-2 cycle for ω ≈ 1 can be replaced by more complex dynamical behaviors. 17 As ν decreases, we have a firstly partial and then complete stabilization of dynamics, with, respectively, a mixed and unconditionally stable scenarios on varying ω.
To address the element of novelty we reported at point (a) at the beginning of this section, we focus on the role of ν, so we set ω = 0.5 and we look at the bifurcation diagrams reported in Fig. 6C, studying them as ν decreases. In this scenario, the relevance given by the agents to expectation errors is kept fixed, while they form expectations taking into account more and more out-of-phase price information as ν decreases. We can observe a progressive stabilization of price dynamics at odd phasetimes (blue diagram), while prices π 2 t (black diagram) undergo an initial increase in oscillations amplitude, which is then replaced by a decrease in them and finally by a gradual stabilization. This can be understood with the help of the sequence of time series reported in Fig. 6D-I, obtained for decreasing values of ν. We recall that, at odd phase-times, the relative elasticity s 1 is large, and this is the source of chaotic behavior of price π 1 t when the two phases are uncoupled (blue line in Fig. 6D). Conversely, the small relative elasticity s 2 allows for quickly convergent price dynamics (black line). In the latter case, taking into account the information encompassed in the expectation error, the agents are able to gradually correct wrong price forecasts, while in the former Fig. 6 A Two-dimensional bifurcation diagram in (ω, ν) plane. B Bifurcation diagrams as ω increases for the uncoupled. C Bifurcation diagrams as ν increases. D-I Time series for π 1 t (blue) and π 2 t (black) for different values of ν and ω = 0.5 (color figure online) situation erratic price trajectories last, sustained by market outcomes that are far from π 1, * when the expected price is close to it. Now we focus on what happens when agents try to learn from both in-phase and out-of-phase price information (Fig. 6E-I). If the agents base their learning process mostly on in-phase information (i.e., when the phase-weight is close to 1), at odd phasetimes τ + 1 [see also the former equation in (11)] they will give a great relevance to turbulent price dynamics characterizing the previous odd phase-times τ − 1. Out-ofphase information is marginally used to form expected price at τ + 1, so the overall effect is narrow and the turbulent trajectories of π 1 t are essentially the same both for ν = 1 and for ν = 0.99 (blue lines in Fig. 6D, E).

(G) (H) (I)
At an even phase-time τ + 2 [see also the latter equation in (11)], agents mostly rely on price information related to previous even phase-time τ. In this case, the market outcome would be closer to the corresponding phase equilibrium price than the previous expected price, allowing the agents to learn the correct equilibrium price. However, this does not occur as the effect of learning from out-of-phase expectation error leads to a spread of the turbulence from π 1 t to π 2 t . The consequence of this is evident in the time series related to ν = 0.99, in which π 2 t exhibits small, endogenous and non-periodic oscillations around π 2, * (black line in Fig. 6E).
When the agents start giving more relevance to out-of-phase information (ν = 0.8, Fig. 6F), the role of in-phase and out-of-phase expectation errors is more balanced being the former still the dominant ones. Expected price π τ +1 is mainly affected by the expectation error at τ − 1, but the agents give to it a reduced relevance with respect to the previous cases. The consequence is a decrease in the price oscillations (blue line in Fig. 6F). Conversely, dynamics of π 2 t (black line) now exhibit evident chaotic oscillations around π 2, * , since, as the coupling degree increases, the agents form expected prices more and more relying on turbulent out-of-phase expectation errors.
Up to now, the most evident effect is the instability transmission. The agents at even phase-times try to learn from odd phase-times, and their capability to correct odd phases expectation errors is impeded by the transmission of the errors they make at even phase-times. However, price volatility at odd phase-times reduces as well, so we could say that the agents "transfer" also the stability characterizing a market phase to the order. Such effects are even more evident if we observe the "parallel" price dynamics in time series of Fig. 6, namely price growths, peaks and falls simultaneously occur in both phases, so that phase synchronization does not just consist in the occurrence of the same (stable/unstable) dynamics. More precisely, the intuition of this is that when agents form their expectations on the basis of both out-of-phase and in-phase information, they actually alter price dynamics of a phase introducing elements related to the dynamics of the other phase. In this sense, as the coupling degree increases, the dynamics of a given phase more and more bear information about what is going on in the whole market, and not only inside that phase. It could seem paradoxical that to correct the forecasting errors in a phase, the agents should give more relevance to the information related to the "wrong" phase, but actually the expectation errors related to such out-of-phase-times bear information about both market phases. For this reason, if the coupling degree further increases, oscillations amplitude and/or complexity in the dynamics of π 1 t declines, while the opposite occurs at even phase-times. It is easy to understand that we come to a situation in which the price volatility is approximatively comparable in both phases (Fig. 6G). From here on, oscillations at odd phase-times decrease (Fig. 6I) and time series at both phases start exhibiting smaller oscillations with a consequent dynamical simplification leading to convergence (Fig. 6I).
On the basis of the previous considerations, since, as the coupling degree increases, each phase dynamics feels the effect of both in-phase and out-of-phase price corrections of the agents, expectation errors cannot be just related to a unique, either odd or even, time phase. Being influenced by them both and bearing information consistent with them both, they convey knowledge related to the whole market knowledge, and not just to a market phase knowledge. It is then evident that the agents, when this happens, giving relevance to both expectations errors, have more chances to correct a wrong expectation about price grounding on two reliable information than on just one. The relevant economic result is that, by mixing information from both phases, agents can be able to learn how to correct a turbulent market outcome taking into account information coming from the other market phase. In this sense, since the expectation formation mechanism at even phase-times allows for a correction of expectation errors, the more such errors bears "memory" of what happened at the other phase (as remarked also by qualitative synchronization of price dynamics), the more the agents will be able to learn how to adjust expectation errors in such other phase, and this will lead to an overall and gradual reduction in errors.
The previous rationale explains the stabilization phenomenon occurring when a "stable" phase is coupled to an "unstable" one. However, according to Fig. 4C, stabilization is possible even when two unstable phases are coupled. The phenomenon can be explained again with similar arguments, even if some of the underlying mechanisms basically change, leading to the emergence of quasi-periodic trajectories. To this end, we consider in Fig. 7 a second family of simulations related to the stability scenario of Fig. 4C, in which we set a 1 = 7.6, a 2 = 7.2 and d = 1. In this case, by numerical estimation, the period steady-state equilibrium results (π 1, * , π 2, * ) ≈ (6.06, 6.13). and we have 1 < 2.22 ≈ |s 2 | < |s 1 | ≈ 7.08, so both phases are unstable when uncoupled and ω = 1. The two-dimensional bifurcation diagram reports a scenario characterized by the highest level of ambiguity, among those analytically proved in Sect. 3, and instability can occur by means of either a flip bifurcation (when entering a red region from a white one) or a Neimark-Sacker bifurcation (when entering a cyan region from a white one, see also Fig. 7B). Increasing the expectation weight can give rise to a mixed-destabilizing scenario (see also Fig. 7C), and, when the equilibrium loses stability, quasi-periodic dynamics can occur. Moreover, we stress that also when both uncoupled phases are unstable and exhibit complex dynamics, increasing the coupling degree can lead to stabilization, as evident from the bifurcation diagram in Fig. 7D.
In the present setting, when ω = 1, both the uncoupled phases exhibit dynamics that do not converge toward the equilibrium and, hence, temporary equilibrium condition has an effect that is partially different from that occurring in the scenario reported in Fig. 6. In the present scenario both relative elasticities s 1 and s 2 are large, so also at even phase-times the temporary equilibrium condition drives an expected price that is close to the equilibrium away from it. As soon as a phase coupling is introduced, we indeed have that prices dynamics are both convergent, periodic, quasi-periodic in both phases. This is in line with what happens in the latter example. What is different now is that when at a phase-time agents overestimate the equilibrium price, in the subsequent phase-time they underestimate it. For example, we do not have any more than a price peak in a phase corresponds to a price peak in the subsequent one. Conversely, if in a phase a price reaches a peak, in the subsequent one it reaches a fall. According to the literature about oscillators, in what follows we refer to this phenomenon as anti-phase synchronization. To explain this, let us assume for example that agents, in forming their expectations, give a nearly uniform relevance 18 to both in-phase and out-of-phase expectation errors and consider, for both phases, an initial datum that is slightly above the corresponding phase equilibrium (first couple of black and blue circles in Fig. 7E). Since agents overestimate both in-phase and out-of-phase equilibrium prices, the corresponding expectation errors are both negative and price π 1 1 decreases below the steady-state value (second blue circle in Fig. 7E). For τ = 2, agents form their expectation also on the basis of this new price information, so they get opposing information from in-phase and out-of-phase expectation errors. If we compare the expectation errors corresponding to phase-times τ = 0 (ν( p 0 − π 0 ) ≈ −0.004) and τ = 1 (ν( p 1 − π 1 ) ≈ 0.006), respectively, rescaled by the related phase-weight, we find that in this case the largest contribution comes from that at time τ = 1, and π 2 1 is further pushed above the steady-state value (second black circle in Fig. 7E). The consequence is that at period-time t = 1, expected prices π 1 1 and π 2 1 are, respectively, an underestimation and an overestimation of the correspondent component of the period steady-state equilibrium. The anti-phase synchronization of expected price immediately occurred after just one period, even starting from a qualitatively synchronized initial datum. At this point, two subsequent temporary equilibrium conditions produce 18 We assume this just for the sake of simplicity of the subsequent explanation. Using similar arguments it is possible to explain the occurrence of the same phenomenon also for non-uniform phase-weight distributions. opposite price mechanisms: if two subsequent expected prices are, respectively, below and above the corresponding phase equilibrium, the market outcomes are, respectively, above and below the corresponding phase equilibrium. Due to the effect of the nonlinearity in demand and supply functions, the deviation from the equilibrium price π i, * is strong when the expected price is close to π i, * , while it becomes weaker and weaker as the expected price significantly departs from it. Assume for example that at phase-times τ − 1 and τ the expectation error are, respectively, negative and positive, as a consequence of a slight overestimation and underestimation of the equilibrium price, respectively. In this case, the most recent expectation error is then that largest in absolute value and this means that the agents' will be mostly influenced by the last out-of-phase market outcome, so they correct the previous in phase expected price pushing it further up. The opposite occurs at the next phase-time, so expected prices increasingly deviate from the corresponding equilibria, until it becomes no more sustainable. In this case, the agents' will be mostly influenced by the last in-phase market outcome, and this slows down or reverses the expected price movement. The above described interaction provides the explanation of the emergence of a Neimark-Sacker bifurcation in double-phase cobweb model, as shown in Fig. 7E. In such scenario, the expectation weight acts as in a single-phase market. Decreasing ω, the possible overreactive price variations due to extreme deviation between expected and realized price can be reduced (Fig. 7F) and even canceled (Fig. 7G) by a suitably cautious agents' behavior.
We stress that also in the present market configuration, the agents can be able to progressively correct their expectations errors by taking into account both in-phase and out-of-phase information. To explain this, we note that the expectation formation mechanism described by (11) can be rewritten as π τ +1 = ν π τ −1 + ω g 1 (π τ −1 ) − π τ −1 + (1 − ν) π τ −1 + ω g 2 (π τ ) − π τ = νπ 1 τ +1 + (1 − ν)π 2 τ +1 , π τ +2 = ν π τ + ω g 2 (π τ ) − π τ + (1 − ν) π τ + ω g 1 (π τ +1 ) − π τ +1 from which the double-phase mechanism can be seen as the average of two single-phase adaptive expectation mechanisms 19π i τ andπ j τ . For instance, to form expectations about price at τ + 1, the agents obtain two guessesπ 1 τ +1 andπ 2 τ +1 , both based on a correction of the previous in-phase expected price π τ −1 , but with the former that is based on the last in-phase expectation error and the latter that is based on the last out-of-phase expectation error. Then, they consider a weighted average of them. If the expectation weight is suitably large, on the basis of the previous explanation of the mechanism leading to the anti-phase synchronization of prices, it is easy to show that such two guesses are an overestimation and an underestimation of the corresponding phase equilibrium prices. We already noted that, as ν decreases, the expectation error at a given phase encompasses an increasingly large amount of information related to both odd and even phases, spread by the agents' expectation formation mechanisms, so that they become reliable for learning about the whole market behavior, and not just about a single phase of it. When this occurs, the agents, looking at two wrong opposite guesses, are able to progressively correct the expected price by averaging out to a middling estimate which is increasingly precise. In this situation, we can again say that as the phases are more and more coupled, the errors of a phase increasingly bears "memory" of what happened at the other phase (in this case, in the form of a anti-phase synchronized error), and this again allows for an overall correction of errors.
Up to now, we gave evidence of the new facts reported at points (a) and (b) at the beginning of this section. Concerning point (c), ω can have a counterintuitive role on stability, as evident looking at the bifurcation diagrams reported in Fig. 7C, in which, as ω decreases, a stable equilibrium can become unstable. 20 . This is the most ambiguous result arising in a double-phase cobweb model, and it is the effect of a quite complicated superimposition of market outcomes and agents' behavior. Reasoning as before, it would be easy to see that the two single-phase adaptive mechanisms produce expected prices that are oscillating around the equilibrium price and that stay anti-phase synchronized. 21 We have explained how such anti-phase synchronization allows the agents to learn how to correct the in-phase expected price from two consecutive wrong (respectively, underestimated and overestimated) expected prices. If ω is too large, both single-phase adaptive mechanisms provide too erratic prices, and this prevents error correction. If ω is reduced, the agents average out two opposite estimations of equilibrium price, and errors cancel out. But for such an outcome, it is necessary that the two single-phase adaptive mechanisms are "strong enough" to provide conflicting estimations. Since the two markets are characterized by different relative elasticities, as ω decreases, one of the two single-phase adaptive mechanisms will start stabilizing, while the other will again exhibit persistent oscillations. If ω further decreases, the agents will average outπ t i , which is still characterized by erratic dynamics, andπ t j , which is now slowly converging and no more counter balancing the over/underestimation of previous phase price, so that the dominating behavior is that ofπ t i , and oscillations are now persistent. 22 If then ω is again reduced, also the nonconvergent phase will enter a stabilization process and once again trajectories start to converge.
The previous discussion also helps in understanding the role of an increase in the relative slopes on stability, in particular its possible stabilizing effect, as depicted in Fig. 5. We recall that in the classic single-phase setting, the absolute relative slope |s| of supply with respect to demand not only affects the stability of the steady state, but it also influences the convergence speed of the expected price correction. Assume a Fig. 8 A Coexistence of the period steady-state equilibrium (cyan and red) with periodic and quasi-periodic attractors, with the same parameter setting for the simulation in Fig. 7. B, C Basins of attraction for the (red) period steady-state equilibrium (blue region) and the (black) periodic and quasi-periodic attractors (yellow region) (color figure online) given expectation weight ω, and let us increase |s|. If |s| is very small, we indeed have a convergent adjustment of prices toward the steady state, but the relatively too cautious evaluation of expectation errors give rise to a very slow monotonic convergence. As |s| increases, we have that the convergence speed increases, as the expectation error is more and more effectively taken into account and the expected price correction is increasingly worthwhile. We come to a situation in which the joint effect of expectation weight and market outcome is "the best possible", in the sense that it provides the fastest possible expected price correction toward the steady-state equilibrium. 23 If |s| is further increased, the market outcome starts providing a too reactive signal for the given expectation weight, and price correction becomes less and less effective. We initially observe a non-monotonic but convergent approach of expected price toward the steady state, which, however, becomes increasingly slower and finally stop converging.
When we move to the double-phase setting, we have shown that if the agents use both phase errors, it is possible for them to correct the error in one phase using information coming from the other phase. The capability to correct an error in a given phase is then strongly related to the effectiveness of the estimation obtained in the previous outof-phase market realization. If a relative slope is small, this (connected to a suitably small expectation weight) allows for a reduced price adjustment in the "stable" phase, which then provides a price information that is not sufficiently accurate to be used in the "unstable" phase to allow for error correction. Conversely, in the presence of larger relative slopes, we have a more effective price correction that, used in the other phase, allows the agents to learn how to correct errors also in the more turbulent phase. Indeed, if relative slopes further increase, the speedup of convergence turns into an overreaction to previous error and this in turns slower convergence, and hence, correction in the other phase is no more possible, with instability again occurring.
We remark that such a stabilizing effect for |s i | is possible only if one phase, in the uncoupled model, is stable. If both uncoupled phases are unstable, it is possible to show that increasing relative slopes cannot have a stabilizing effect. The economic intuition is evident, since in this situation larger relative slopes do not speed up convergence, but on the contrary they simply more steadily sustain the endogenous price oscillations.
In addition to the previous element of complexity arising from a double-phase setting, we mention the possibility of multistability. Coexistence and path dependency phenomena are quite common in periodically perturbed dynamical systems (see, e.g., Cavalli and Naimzada 2018 and references therein), a family which the present dynamical system belongs to. Without the aim of being exhaustive in the description of global dynamical phenomena, we focus on the last scenario considered in Fig. 7. In Fig. 8A, we report an enlargement of the bifurcation diagram in Fig. 7C, in which we superimpose the bifurcation diagram (obtained for ω ∈ [0.58, 0.614]) that converges to the stable period steady state equilibrium (cyan and red lines), obtained for an initial datum very close to it. As evident from Fig. 8B, as soon as p * becomes again stable (ω ≈ 0.58), we have that the existing 4-points attractor has a basin (yellow color) whose extent is much more significant than that of p * (blue color). As ω increases, we have that the basins becomes more scrambled (Fig. 8B), and p * more likely attracts trajectories. This means that, in some cases, the previous economic discussion on the results can just hold locally, introducing an additional element of complexity. If on the one hand the introduction of phase coupling can allow for a local stabilization of the period steady-state equilibrium, from the other hand we can have the emergence or persistence of coexisting attractors, which still prevent the convergence toward p * . The economic rationale is that the correction of phase errors can indeed benefit from information coming from both phases, but if the out-of-phase error is too large, it can provide misleading information and this can give rise to persistent oscillations away from the period steady state equilibrium.

Conclusions and future perspectives
In this paper, we have introduced and studied a cobweb model for double-phase markets. The resulting model exhibits a high degree of complexity in price dynamics, which grounds on the intrinsic peculiarity of the exchanged good, whose market curves are time-varying, and on the consequent possibility for the agents to use and mix information coming from different past market phases in order to form their expectations. This aspect introduces mutual interdependence between dynamics of different market phases, fostering the emergence of a vast variety of dynamical scenarios. In contrast with the classic single-phase framework, we can have multiple stability/instability thresholds, and dynamics can substantially change (begin periodic, chaotic or quasiperiodic) depending on both the relevance the agents give to the expectation errors and to each phase prices. The key element to understand the new phenomena is the learning mechanism of the agents, which is strictly related to the double-phase nature of the market. If agents form their expectations about future prices observing both inphase and out-of-phase price dynamics, they inherently convey dynamical elements from one phase to the other, so that, as the coupling degree increases, the observed price trajectories of each single phase are more and more explanatory of what happens in both phases, characterizing the market as a whole. Against this background, it is possible to understand the mechanisms leading to the emergence of quasi-periodic dynamics, or the possible ambiguous role of the expectation weight. In particular, it allows explaining why the agents are more able to correct expected prices if they take into account both in-phase and out-of-phase price dynamics. The double-phase approach has very interesting policy implications for markets characterized by known periodicities. We refer in particular to power exchanges, where demand and supply are collected by market operators on hourly basis. Electricity prices are formed independently for each hour, but the whole series of prices is influenced by firms' bidding strategies that are based on expectations formed on the whole price realizations, not only on a single hour. The multiphase expectation mechanism introduced in this paper may explain this phenomenon and can become a tool for regulators and market operators, especially when reasoning on a market reform suitable for accommodating a high share of renewable energy sources, which are known to increase variability of equilibrium prices.
The extent of the foundational elements of the double-phase cobweb model required comprehensive analytical and interpretative investigations, which left no space for dealing with other facets of multiphase markets modeling. In future researches, we aim to extend the investigations in several directions. Firstly, we want to deepen the mathematical analysis of the global dynamical properties of the model, which, due to the length of the local stability analysis and to the need of economic explanation of the many phenomena arising, we decided to postpone to a future work. A second improvement can be the endogenization of the phase-weight choice, in order to understand how the agents can refine their learning strategy by choosing to what extent take into account the observed price dynamics of each phase. Moreover, we want to generalize the proposed modeling approach to multiphase markets, taking into account high period cyclicity. Finally, the main goal is to apply the modeling approach to the description of real markets affected by seasonality, in particular to wholesale energy markets. To this end, we have to take into account the main characteristics of the market, in particular in terms of demand/supply functions, and to introduce a proper stochastically perturbed version of the model. The aim is to check if the elements of complexity and ambiguity arising in a double-phase framework are able to explain the occurrence of stylized facts characterizing economic observables of such markets. Preliminary results show that the double-phase framework allows reproducing qualitative and quantitative stylized facts of real time series, with an agreement in the results that improve as the coupling between phases increases. and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. ω 2 , it is easy to see that the first condition in (13) is unconditionally fulfilled, while the second and the third one provide (9).
The (possible) solutions of ϕ 3 (ω, ν) = 0 with respect to ω are given by for i = 1, 2, as well as the (possible) solution of ϕ 2 (ω, ν) = 0, defined by To prove Propositions 6 and 7, we start considering conditions (9) on larger sets than I su and I uu . Firstly we prove some preliminary Lemmas, in which we assumeω 1 <ω 2 .
Proof Firstly we note that since ϕ 3 (ω, ν) is a second degree polynomial with respect to both ω and ν, we have that intersecting Γ with either ω = k or ν = k we find at most two solutions. Now we prove each point.
Proof of Proposition 7 Sinceω 2 < 1, interval I uu is not empty. As in the Proof of Proposition 6, we need to restrict the results of Lemma 2 to I uu × (1/2, 1) in order to provide explicit expressions for ν 1 and ν 2 . From the second part of Lemma 2, we have that the only significant stability condition is ϕ 2 (ω, ν) < 0. Moreover, since from Lemma 2 stability conditions are not satisfied if and only if ν ≥ (ω 1 +ω 2 )/2ω 2 , we can take ν 1 = (ω 1 +ω 2 )/2ω 2 . We stress that ν 1 = 1 if and only ifω 1 =ω 2 , in which case we do not have unconditional instability.
Finally, the last part of the proposition can be proved using monotonicity considerations, as in the proof of Proposition 6.