1 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; Karakatsani and 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.Footnote 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 patternFootnote 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,Footnote 3 so the methodological approach we pursue relies on the cobweb framework.Footnote 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 single-phase 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.Footnote 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.

2 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 \(\tau \in \mathbb {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 \rightarrow \mathbb {R}^+,\,i=1,2,\) where I is a suitable interval, are smooth and decreasing functions. Similarly, we assume that supply functions \(S_i : J \rightarrow \mathbb {R}^+,\,i=1,2,\) where J is a suitable interval, are smooth increasing functions.Footnote 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)\subset 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 \(\tau \) 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.

Fig. 1
figure 1

Time levels of the double-phase cobweb model. Black color: phase-time level \(\tau .\) At \(\tau \), the market is characterized by different demand (\(D_i\)) and supply (\(S_i\)) functions. Red color: period-time t. Each period-time t collects a whole cycle of 2 consecutive phase-times (color figure online)

Without loss of generality, we can assume that when \(\tau \) 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 \(\tau _a>\tau _b\) are in-phase (i.e., share the same demand/supply functions couple) when \(\tau _a=\tau _b+2n\) (i.e., when a and b are both even or odd) for some \(n\in \mathbb {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\in \mathbb {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.Footnote 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:I\times \mathbb {N}\rightarrow \mathbb {R}^+\) and \(S:J\times \mathbb {N}\rightarrow \mathbb {R}^+\) defined by

$$\begin{aligned} D(p_{\tau },\tau )={\left\{ \begin{array}{ll} D_1(p_{\tau }) &{} \text{ if } \tau \text{ is } \text{ odd },\\ D_2(p_{\tau }) &{} \text{ if } \tau \text{ is } \text{ even }, \end{array}\right. }\quad S(p_{\tau },\tau )={\left\{ \begin{array}{ll} S_1(p_{\tau }) &{} \text{ if } \tau \text{ is } \text{ odd },\\ S_2(p_{\tau }) &{} \text{ if } \tau \text{ is } \text{ even }, \end{array}\right. }\qquad \end{aligned}$$
(1)

where \(p_{\tau }\) is the market price at \(\tau .\) At each phase-time \(\tau ,\) the demanded and supplied quantities are, respectively, \(q_{\tau }^D=D(p_{\tau },\tau )\) and \(q_{\tau }^S=S(\pi _{\tau },\tau ),\) where \(\pi _{\tau }\) is the price that agents expect for phase-time \(\tau .\)

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 \(\tau +1\) will be in phase with phase-time \(\tau -1\) (and not with \(\tau \)).

The boundedly rational mechanism we propose is grounded on the adaptive expectations (Nerlove 1958; Chiarella 1988; Hommes 1994, 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 \(\tau +1\) will be the same as those at phase \(\tau -1,\) and not as those at time \(\tau \)), 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 \(\tau \).Footnote 8 We then assume that expected price \(\pi _{\tau +1}\) is formed anchoring to the previous in-phase expected price \(\pi _{\tau -1}\) and adapting it on the basis of the past expectation errors. In particular, agents can take into account both in-phase, \(p_{\tau -1}-\pi _{\tau -1},\) and out-of-phase \(p_{\tau }-\pi _{\tau }\) expectation errors. The resulting double-phase adaptive expectation formation mechanism is then

$$\begin{aligned} \pi _{\tau +1}=\pi _{\tau -1}+\omega \left[ \nu (p_{\tau -1}-\pi _{\tau -1})+(1-\nu )(p_{\tau }-\pi _{\tau }) \right] , \end{aligned}$$
(2)

where \(\omega \in (0, 1]\) is the expectation weight and \(0\le \nu \le 1\) is the phase-weight, which specifies the relevance given by the agents to phase errors. We stress that as \(\omega \) 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_{\tau -1}-\pi _{\tau -1}\) is the most significant for the determination of \(\pi _{\tau +1},\) we assume that \(\nu >1-\nu ,\) i.e., \(\nu >1/2.\) We underline that phase-weight \(\nu \) is (inversely) related to the degree of coupling of different market phases, which is null when \(\nu =1\) (since no relevance is given to out-of-phase errors) and maximum when \(\nu \approx 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 \(\nu <1\) but still close to 1 (\(\nu \lesssim 1\)), we have that out-of-phase errors have a small influence on \(\pi _{t+1},\) and so in this case we can speak of a weak coupling of phases. As \(\nu \) decreases, out-of-phase errors become more and more relevant, and the coupling degree increases. Finally, we note that for \(\omega =0,\) as in classic adaptive expectations, we would have no dynamical adjustment, as \(\pi _{\tau + 1} = \pi _{\tau - 1}.\)

Imposing temporary equilibrium condition \(D(p_{\tau },\tau )=S(\pi _{\tau },\tau ),\) we obtain \(p_{\tau }=D^{-1}(S(\pi _{\tau },\tau ),\tau ),\) where \(D^{-1}(q_{\tau },\tau )\) is

$$\begin{aligned} D^{-1}(q_{\tau },\tau )={\left\{ \begin{array}{ll} D_1^{-1}(q_{\tau }) &{} \tau \text{ is } \text{ odd },\\ D_2^{-1}(q_{\tau }) &{} \tau \text{ is } \text{ even }.\\ \end{array}\right. } \end{aligned}$$

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

$$\begin{aligned} \pi _{\tau + 1} = \pi _{\tau - 1} + \nu \omega \Big (D^{-1}(S(\pi _{\tau - 1},\tau -1),\tau -1) - \pi _{\tau - 1}\Big ) + (1 - \nu ) \omega \Big (D^{-1}(S(\pi _{\tau },\tau ),\tau ) - \pi _{\tau }\Big ), \end{aligned}$$
(3)

for given initial expected prices \(\pi _{0}\) and \(\pi _{-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 \(\tau \) corresponds to the ith phase of the market, we can only require that \(p_{\tau }\) is a market clearing price for phase i (i.e., \(D_i(p_{\tau })=S_i(p_{\tau })\)) and that \(p_{\tau +2n}=p_{\tau }\) for any \(n\in \mathbb {N}.\) From a dynamical viewpoint, this corresponds to a steady cycleFootnote 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 \(\varvec{\pi }_t\in \mathbb {R}^2,\) consisting of a whole cycle of 2 expected prices. From \(\varvec{\pi }_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 \(\mathbf {p}^{*}=(p^{1,*},p^{2,*})\) that realizes

$$\begin{aligned} D(p^{i,*},i)=S(p^{i,*},i),\, i=1,2. \end{aligned}$$
(4)

This allows introducing the following definition.

Definition 1

We say that \(\mathbf {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 \(\tau ;\) to rewrite it at the period-time level t,  we consider functions \(\varepsilon _i:J\rightarrow \mathbb {R}\) for \(i=1,2\) defined by \(\varepsilon _{i} (x) = \left( D^{- 1}_i (S_i(x)) - x\right) ,\; i=1,2,\) which allows introducing the autonomous dynamical system

$$\begin{aligned} {\left\{ \begin{array}{ll} \pi ^1_{t + 1} = &{}F^1(\pi _t^1,\pi _t^2)=\pi ^1_t + \nu \omega \varepsilon _1(\pi _t^1)+\omega (1-\nu )\varepsilon _2(\pi _t^2), \\ \pi ^2_{t + 1} = &{}F^2(\pi _t^1,\pi _t^2)=\pi ^2_t +\nu \omega \varepsilon _2(\pi _t^2)+\omega (1-\nu )\varepsilon _1(F^1(\pi _t^1,\pi _t^2)), \end{array}\right. } \end{aligned}$$
(5)

where functions \(F^i:J^2\rightarrow \mathbb {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 \(\varvec{\pi }_{t+1}=\mathbf {F}(\varvec{\pi }_{t})\) where, setting \(\varvec{\pi }_{t}=(\pi _t^1,\pi _t^2)\) for \(t\ge 0,\) function \(\mathbf {F}:J^2\rightarrow \mathbb {R}^2\) is defined by \(\mathbf {F}(\varvec{\pi }_{t})=(F_1(\pi ^1_{t},\pi ^2_{t}),F_2(\pi ^1_{t},\pi ^2_{t})).\) The way the autonomous system (5) is linked to the non-autonomous equation (3) is clarified by the following proposition.

Proposition 1

If \(\pi _{-1},\pi _{0}\) are initial data of the non-autonomous equation (3) and we take \((\pi _0^1,\pi _0^2)=(\pi _{-1},\pi _{0})\) as the initial datum of the autonomous system (5), then \(\pi _t^i=\pi _{2(t-1)+i}\) for any \(t\ge 0.\)

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 \(\pi ^i_t\) of vector \(\varvec{\pi }_{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 \(\pi ^i\) of vector \(\varvec{\pi }.\) However, in the extreme case of \(\nu =1,\) expectation mechanism (2) simplifies into

$$\begin{aligned} \pi _{\tau +1}=\pi _{\tau -1}+\omega (p_{\tau -1}-\pi _{\tau -1}), \end{aligned}$$
(6)

and model (5) reduces to the diagonal system

$$\begin{aligned} \pi _{t+1}^i=\pi _{t}^i+\omega \left( D_i^{-1}(S_i(\pi _{t}^i))-\pi _{t}^i\right) ,\qquad i=1,2. \end{aligned}$$
(7)

In this case, (6) is close to the classic adaptive expectation formation mechanism and each \(\pi _{\tau +1}^i\) 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 \(\nu =1\) as modeled by 2 independent equations (and not by a single diagonal system), while we consider all the remaining cases of \(\nu \ne 1\) as represented by a single two-dimensional system. We will, respectively, refer to (5) for \(\nu <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.

3 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.

Proposition 2

The onlyFootnote 10 steady state of system (5) is the period steady-state equilibrium \(\mathbf {p}^{*} = (p^{1,*}, p^{2,*}).\)

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 expectationsFootnote 11 we have that a steady-state equilibrium \(p^{*}\) is locally asymptotically stable provided that

$$\begin{aligned} 1 - \frac{2}{\omega }< \dfrac{S^{\prime } (p^{*})}{D^{\prime } (p^{*})}=s\left( < 1\right) \;\Leftrightarrow \; \omega >\bar{\omega }=\dfrac{2}{1-s}, \end{aligned}$$
(8)

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^{\prime }/D^{\prime }\) is negative]. We recall that |s| corresponds to the ratio between the elasticities of supply and of demand, while \(\bar{\omega },\) when belonging to (0, 1),  is the stability threshold on \(\omega \) 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 \(s_i=S_i^{\prime }(p^{i,*})/D_i^{\prime }(p^{i, *}),\; i=1,2,\) and thresholds \(\bar{\omega }_i=2/(1-s_i)\; i=1,2.\) 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 \(\xi \) (which will be either \(\omega ,\nu \) or \(s_i\)) inside an interval \(I=(\xi _a,\xi _b)\)Footnote 12 we introduce the following scenarios, which are sketched in Fig. 2:

  • flip (FD) and Neimark–Sacker (NSD) destabilizing scenarios, if there exists \(\xi _1\in (\xi _a,\xi _b)\) such that \(\mathbf {p}^{*}\) is stable on \((\xi _a,\xi _1)\) and unstable for \(\xi \in (\xi _1,\xi _b)\) and for \(\xi =\xi _1\) stability is, respectively, lost through a flip and a Neimark–Sacker bifurcation;

  • mixed scenario (M), if there exist \(\xi _{1}<\xi _{2},\) with \(\xi _{i}\in (\xi _a,\xi _b)\) such that \(\mathbf {p}^{*}\) is stable on \((\xi _a,\xi _{1})\cup (\xi _{2},\xi _b)\) and unstable on \((\xi _{1},\xi _{2});\)

  • mixed-destabilizing scenario (MD), if there exist \(\xi _{1}<\xi _{2}<\xi _3,\) with \(\xi _{i}\in (\xi _a,\xi _b),i=1,2,3,\) such that \(\mathbf {p}^{*}\) is stable on \((\xi _a,\xi _{1})\cup (\xi _{2},\xi _3)\) and unstable on \((\xi _{1},\xi _{2})\cup (\xi _3,\xi _b);\)

  • unconditionally stable scenario (US), if \(\mathbf {p}^{*}\) is stable on \((\xi _a,\xi _b).\)

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.

Fig. 2
figure 2

Possible stability scenarios with respect to a parameter \(\xi .\) A solid (respectively, dotted) line is used for stability (respectively, instability) intervals

The role of \(\omega \) and \(\nu \) on the local asymptotic stability of \(\mathbf {p}^{*}\) is studied in the following proposition.

Proposition 3

Period steady-state equilibrium \(\mathbf {p}^{*}\) is locally asymptotically stable provided that

$$\begin{aligned}&2\omega \nu -(\bar{\omega }_1+\bar{\omega }_2)<0, \end{aligned}$$
(9a)
$$\begin{aligned}&(2\nu ^2 - 2\nu + 1)\omega ^2 -2\nu \dfrac{\bar{\omega }_1+\bar{\omega }_2}{2}\omega + \bar{\omega }_1\bar{\omega }_2>0. \end{aligned}$$
(9b)

If the steady state loses its stability through a Neimark–Sacker (resp. period doubling) bifurcation (see Wiggins 1990), then condition (9a) [respectively, (9b)] is violated.

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 \(\omega \) and on the relative slopes at the steady state. We note that stability conditions (9) are symmetric with respect to \(\bar{\omega }_i,\) i.e., with respect to the relative slopes \(s_i,\) so we can assume \(|s_1|\ge |s_2|.\)

Due to the linear (9a) and quadratic (9b) conditions in both \(\omega \) and \(\nu ,\) we can have up to three stability thresholds. To obtain a relevant characterization of local stability on varying \(\omega \) and \(\nu \), 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 \(\nu \) from \(\nu =1\) to \(\nu \rightarrow 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 (\(\nu =1\)). As we are going to show, the dynamical behavior of the coupled 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).

Proposition 4

Let \(\nu =1.\) Then,

  1. (I)

    if \(\max _{i=1,2}|s_i|<1,\) both phase steady-state equilibria \(p^{i,*}\) are stable for any \(\omega \in (0,1]\);

  2. (II)

    if \(|s_1|=|s_2|>1,\) both phase steady state equilibria \(p^{i,*}\) are stable for \(\omega <\bar{\omega }_1=\bar{\omega }_2\) and unstable for \(\omega >\bar{\omega }_1=\bar{\omega }_2\).

  3. (III)

    if \(|s_1|>1>|s_2|,\) both phase steady-state equilibria \(p^{i,*}\) are stable for \(\omega <\bar{\omega }_1,\) while for \(\omega >\bar{\omega }_1\) we have that \(p^{1,*}\) is unstable and \(p^{2,*}\) is stable;

  4. (IV)

    if \(|s_1|>|s_2|>1,\) both phase steady state equilibria \(p^{i,*}\) are stable for \(\omega <\bar{\omega }_1,\) while for \(\bar{\omega }_1<\omega <\bar{\omega }_2\) we have that \(p^{1,*}\) is unstable and \(p^{2,*}\) is stable and for \(\omega >\bar{\omega }_2\) both \(p^{i,*}\) are unstable.

Stability is always lost through a flip bifurcation.

The four situations described in Propositions 4 are depicted in Fig. 3.

Fig. 3
figure 3

Stability scenarios of the uncoupled model (\(\nu =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 \(\omega ,\) \(p^{i,*}\) are both stable (\(\omega \in I_{ss}\)), \(p^{1,*}\) is unstable and \(p^{2,*}\) is stable (\(\omega \in I_{su}\)) and \(p^{i,*}\) are both unstable (\(\omega \in I_{uu}\))

Only when both \(|s_i|<1\) (case I) or \(|s_1|=|s_2|>1\) (case II) phase steady-state 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 \(\omega \) 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 (\(\nu \lesssim 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 \{\bar{\omega }_1,1\}),\) in which \(p^{i,*}\) are both stable;

  • \(I_{su}=(\min \{\bar{\omega }_1,1\},\min \{\bar{\omega }_2,1\}),\) in which \(p^{2,*}\) is stable while \(p^{1,*}\) is unstable;

  • \(I_{uu}=(\min \{\bar{\omega }_2,1\},1),\) in which \(p^{i,*}\) are both unstable.

In the next propositions, we study the possible scenarios as \(\omega \) increases on either \(\omega \in I_{ss},\omega \in I_{su}\) or \(\omega \in I_{uu}.\) We start considering the simplest situation, in which both phase steady-stable equilibria are stable for \(\nu =1.\)

Proposition 5

Let \(\omega \in I_{ss},\) then \(\mathbf {p}^{*}\) is stable for any \(\nu \in (1/2,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 \(\nu =1,\) results become more articulated.

Proposition 6

Let \(\bar{\omega }_1<1\) and \(\omega \in I_{su},\) then there exist \(\nu _2\le \nu _1,\) with \(\nu _i\in [1/2,1)\) depending on \(s_i,\) such that

  • if \(\nu \in (\nu _1,1),\) we have a flip destabilizing scenario for \(\omega \in I_{su};\)

  • if \(\nu \in (\nu _2,\nu _1),\) we have mixed scenario for \(\omega \in I_{su};\)

  • if \(\nu \in (1/2,\nu _2),\) we have an unconditionally stable scenario for \(\omega \in I_{su}.\)

Moreover, the set of values of \(\omega \) for which the period steady state is locally asymptotically stable becomes increasingly large as \(\nu \) decreases.

Before commenting Proposition 6, we investigate what happens when both uncoupled phase steady-state equilibria are unstable.

Proposition 7

Let \(\bar{\omega }_2<1\) and \(\omega \in I_{uu},\) then there exist \(\nu _2<\nu _1,\) with \(\nu _1\in (1/2,1]\) and \(\nu _2\in [1/2,1)\) depending on \(s_i,\) such that

  • if \(\nu \in (\nu _1,1),\) we have an unconditionally unstable scenario for \(\omega \in I_{uu};\)

  • if \(\nu \in (\nu _2,\nu _1),\) a Neimark–Sacker destabilizing scenario occurs for \(\omega \in I_{uu};\)

  • if \(\nu \in (1/2,\nu _2),\) we have an unconditionally stable scenario for \(\omega \in I_{uu}.\)

In particular, we have that \(\nu _1=1\) if and only if \(|s_1|=|s_2|.\) Moreover, the set of values of \(\omega \) 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 \(\bar{\omega }\) through a period doubling bifurcation only if, for that \(\bar{\omega }\), \(p^{i,*}\) are one stable and the other unstable for \(\nu =1,\) while Neimark–Sacker bifurcation can occur at some \(\bar{\omega }\) only if both \(p^{i,*}\) are simultaneously unstable for that \(\bar{\omega }\) in the uncoupled model. The other remarkable result is that the expectation weight can have a stabilizing effect, in the sense that increasing \(\omega \) may lead dynamics from instability to stability. This is possible only when \(\mathbf {p}^{*}\) loses stability through a period doubling bifurcation. Conversely, when stability is lost at some \(\bar{\omega }\) through a Neimark–Sacker bifurcation, Proposition 7 shows that \(\mathbf {p}^{*}\) cannot be locally asymptotically stable for any \(\omega >\bar{\omega }\). 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 \(\omega \) varies in \(I_{su}.\) According to Proposition 6, as \(\nu \) decreases, the flip destabilizing scenario can evolve in different ways, depending on the relative slopes \(|s_i|.\) Increasing the coupling degree, we may have that \(\mathbf {p}^{*}\) becomes unconditionally stable for any \(\omega \in I_{su}\) or a mixed scenario can occur, with the consequent return to stability as \(\omega \) increases. In this last case, suitably decreasing \(\nu \) we may also have an unconditionally stable scenario as \(\omega \) varies in \(I_{su}.\)

Concerning Proposition 7, the remarkable aspect is that when neither \(p^{1,*}\) nor \(p^{2,*}\) are locally asymptotically stable for \(\nu =1\), on varying \(\omega \in 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 \(\omega \) varies in \(I_{uu}.\)

Juxtaposing the cases studied in Propositions 57, we are able to obtain stability regions in \((\omega ,\nu )\) 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 \((\omega ,\nu )\)-plane different stability regions corresponding to cases (II)–(IV), and we avoid depicting the unconditionally stable case (I).Footnote 13.

In Fig. 4A, we consider case (II), namely the very special situation of \(|s_1|=|s_2|>1.\) In this case, for each \(\omega \in (0,1],\) \(p^{i,*}\) are either both stable or both unstable for \(\nu =1.\) Destabilization can only occur though a Neimark–Sacker bifurcation, and, for a suitably strong phase coupling, dynamics become unconditionally stable.

Fig. 4
figure 4

Possible stability regions in the \((\omega ,\nu )\)-plane when \(\bar{\omega }_1=\bar{\omega }_2<1\) (A), when \(\bar{\omega }_1<1<\bar{\omega }_2\) (B) and when \(\bar{\omega }_1<\bar{\omega }_2<1\) (C). Red color is used for instability regions. Blue line \(\mathcal {N}\) is the stability threshold curve, crossing which \(\mathbf {p}^{*}\) loses stability through a Neimark–Sacker bifurcation. As a comparison, we plot a vertical dashed line representing the stability thresholds of the uncoupled (\(\nu =1\)) model. Horizontal dotted lines show the possible scenarios on varying \(\omega \) for fixed \(\nu \) (color figure online)

In Fig. 4B, we consider case (III), in which \(|s_1|>1>|s_2|.\) When \(s_1\ne 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 eventually coincide with (0, 1]. Finally, in Fig. 4C we consider case (IV), in which both \(p^{i,*}\) become unstable but for different expectation weights (\(\bar{\omega }_1<\bar{\omega }_2\)). For a sufficiently weak coupling, instability always occurs through a flip bifurcation, with the stability threshold that is increasingly close to \(\bar{\omega }_{1}\) as \(\nu \rightarrow 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 \(\omega \in I_{su}\) and the Neimark–Sacker destabilizing scenario for \(\omega \in 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 \(\omega \) 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 (\(\nu _{F,i}, i=1,2\)) coming from the solution of (9b) and the last one (\(\nu _{NS}\)) from (9a). Depending on \(\omega \) and \(s_i,\) by investigating the reciprocal positions of \(\nu _{F,i}\) and \(\nu _{NS}\) as well as their belonging to (1/2, 1),  it is possible to show the scenarios arising on varying \(\nu ,\) 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 \(\nu .\) We just briefly summarize the possible stability scenarios in the following proposition, omitting the proof.

Proposition 8

For suitable values of expectation weight \(\omega \in (0,1]\) and relative slopes at the phase steady-state equilibria, on varying \(\nu \) we can have an unconditionally stable, flip destabilizing, Neimark–Sacker destabilizing, unconditionally unstable scenarios.

Proposition 8 says that, keeping the remaining parameters fixed, increasing \(\nu \) 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 \(\omega \) becomes increasingly large as \(\nu \) decreases.

Apart from unconditional scenarios, increasing \(\nu \) 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 \(\omega \) 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 \(\nu \) 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 \(\nu \) can exhibit a quite ambiguous behavior. To this end, we can focus on the stability regions reported in Fig. 4C, considering a phase-weight \(\nu \) which is slightly smaller than that at the intersection between stability curves \(\mathcal {N}\) and \(\mathcal {F}\) (e.g., in the first plot, for \(\nu \approx 0.72\)). If the expectation weight is close to \(\bar{\omega }_2,\) a slight perturbation on it can lead instability to either occur through either a flip (for \(\omega \lesssim \bar{\omega }_2)\) or a Neimark–Sacker \((\omega \gtrsim \bar{\omega }_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/\omega < 1/2\left( S^{\prime } (p^{*})/D^{\prime } (p^{*})-1\right) .\) 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

$$\begin{aligned} {\left\{ \begin{array}{ll} (k_1 + k_2) + 2 \nu \omega k_1 k_2 < 0,\\ \omega k_1 k_2 (2 \nu ^2 - 2 \nu + 1) + \nu (k_1 + k_2) + 1 > 0, \end{array}\right. } \end{aligned}$$
(10)

whose graphical solution in \((k_1,k_2)\)-plane for \(\omega =1\) is reported in Fig. 5 for some values of \(\nu \).Footnote 14 As we can see, the stability region becomes increasingly large as \(\nu \) decreases, in agreement with the previous results about \(\nu .\)

Fig. 5
figure 5

Stability regions (yellow) with respect to \(k_i\) for different values of \(\nu \) (color figure online)

4 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:

  1. (a)

    stabilization can be possible if the agents form their expectations suitably taking into account out-of-phase price dynamics;

  2. (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;

  3. (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 \(\omega \) and phase-weight \(\nu \)). 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.Footnote 15

Concerning the role of the market constituents, we stress that the market outcome \(p_{\tau }\), 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 \(\tau \) is below (resp. above) \(p^{i,*}.\) If the relative elasticity of demand with respect to supply function is small, \(p_{\tau }\) is closer to \(p^{i,*}\) than the expected price for phase-time \(\tau ,\) while, conversely, in the presence of a large relative elasticity, imposing temporary equilibrium condition, price \(p_{\tau }\) would be farther to \(p^{i,*}\) than expected price for phase-time \(\tau .\) In a single-phase cobweb model, if the agents adopt static expectations, \(p_{\tau }\) is assumed as the next period expected price, while under adaptive expectations, the previous expected price is just partially adjusted toward \(p_{\tau },\) 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(\pi )=S_2(\pi )=S(\pi )=b+\tanh (\lambda (\pi -c)),\) where \(b\ge 1,\lambda >0\) and \(c\ge 0,\) and \(D_i(p)=a_i-d p,\,i=1,2,\) where both \(a_i\) and d are strictly positive. Moreover, in all simulations we set \(b=1,c=6\) and \(\lambda =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 \(\tau .\) To help in this, we report the expected price adjustment equations for a couple of consecutive phase-times, assuming, without loss of generality, that \(\tau +1\) is odd. Setting \(g_i(x)=D^{-1}_i(S(x))\) we have

$$\begin{aligned} \pi _{\tau + 1}= & {} \pi _{t}^1= \pi _{\tau - 1} + \nu \omega \Big (g_1(\pi _{\tau - 1}) - \pi _{\tau - 1}\Big ) + (1 - \nu ) \omega \Big (g_2(\pi _{\tau }) - \pi _{\tau }\Big )\nonumber \\ \pi _{\tau + 2}= & {} \pi _{t}^2=\pi _{\tau } + \nu \omega \Big (g_2(\pi _{\tau }) - \pi _{\tau }\Big ) + (1 - \nu ) \omega \Big (g_1(\pi _{\tau +1}) - \pi _{\tau +1}\Big ). \end{aligned}$$
(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 \((\pi ^{1,*},\pi ^{2,*})\approx (6.1920,6.0544),\) with equilibrium relative elasticities given by \(|s_1|\approx 7.5\) and \(|s_2|\approx 0.82.\) The two-dimensional bifurcation diagramFootnote 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 (\(\nu =1\)). The black diagram shows the unconditional stability of \(\pi ^{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 \(\omega ,\) when adaptive expectations become close to those static (\(\omega =1\)).

Fig. 6
figure 6

A Two-dimensional bifurcation diagram in \((\omega ,\nu )\) plane. B Bifurcation diagrams as \(\omega \) increases for the uncoupled. C Bifurcation diagrams as \(\nu \) increases. DI Time series for \(\pi _t^1\) (blue) and \(\pi _t^2\) (black) for different values of \(\nu \) and \(\omega =0.5\) (color figure online)

We note that when the agents form their expectation on the basis of information coming from both market phases, the period-2 cycle for \(\omega \approx 1\) can be replaced by more complex dynamical behaviors.Footnote 17 As \(\nu \) decreases, we have a firstly partial and then complete stabilization of dynamics, with, respectively, a mixed and unconditionally stable scenarios on varying \(\omega .\)

To address the element of novelty we reported at point (a) at the beginning of this section, we focus on the role of \(\nu ,\) so we set \(\omega =0.5\) and we look at the bifurcation diagrams reported in Fig. 6C, studying them as \(\nu \) 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 \(\nu \) decreases. We can observe a progressive stabilization of price dynamics at odd phase-times (blue diagram), while prices \(\pi _t^2\) (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 \(\nu .\) We recall that, at odd phase-times, the relative elasticity \(s_1\) is large, and this is the source of chaotic behavior of price \(\pi _t^1\) 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 situation erratic price trajectories last, sustained by market outcomes that are far from \(\pi ^{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 phase- times \(\tau +1\) [see also the former equation in (11)] they will give a great relevance to turbulent price dynamics characterizing the previous odd phase-times \(\tau -1.\) Out-of-phase information is marginally used to form expected price at \(\tau +1,\) so the overall effect is narrow and the turbulent trajectories of \(\pi _t^1\) are essentially the same both for \(\nu =1\) and for \(\nu =0.99\) (blue lines in Fig. 6D, E).

At an even phase-time \(\tau +2\) [see also the latter equation in (11)], agents mostly rely on price information related to previous even phase-time \(\tau .\) 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 \(\pi _t^1\) to \(\pi _t^2.\) The consequence of this is evident in the time series related to \(\nu =0.99,\) in which \(\pi _t^2\) exhibits small, endogenous and non-periodic oscillations around \(\pi ^{2,*}\) (black line in Fig. 6E).

When the agents start giving more relevance to out-of-phase information (\(\nu =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 \(\pi _{\tau +1}\) is mainly affected by the expectation error at \(\tau -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 \(\pi _t^2\) (black line) now exhibit evident chaotic oscillations around \(\pi ^{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 \(\pi _t^1\) 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.

Fig. 7
figure 7

A Two-dimensional bifurcation diagram in \((\omega ,\nu )\) plane. Bifurcation diagrams as \(\omega \) increases when \(\nu =0.52\) (B) and \(\nu =0.68\) (C). Bifurcation diagrams as \(\nu \) increases when \(\omega =0.64\) (D). EG Time series for \(\pi _t^1\) (blue) and \(\pi _t^2\) (black) for different values of \(\omega \) and \(\nu =0.52,\) related to bifurcation diagrams in B (color figure online)

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 \((\pi ^{1,*},\pi ^{2,*})\approx (6.06,6.13).\) and we have \(1<2.22\approx |s_2|<|s_1|\approx 7.08,\) so both phases are unstable when uncoupled and \(\omega =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 \(\omega =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 relevanceFootnote 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 \(\pi _1^1\) decreases below the steady-state value (second blue circle in Fig. 7E). For \(\tau =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 \(\tau =0\) (\(\nu (p_{0}-\pi _{0})\approx -0.004\)) and \(\tau =1\) (\(\nu (p_{1}-\pi _{1})\approx 0.006\)), respectively, rescaled by the related phase-weight, we find that in this case the largest contribution comes from that at time \(\tau =1,\) and \(\pi _1^2\) 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 \(\pi _1^1\) and \(\pi _1^2\) 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 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 \(\pi ^{i,*}\) is strong when the expected price is close to \(\pi ^{i,*}\) , while it becomes weaker and weaker as the expected price significantly departs from it. Assume for example that at phase-times \(\tau -1\) and \(\tau \) 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 \(\omega \), 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

$$\begin{aligned} \pi _{\tau + 1}= & {} \nu \left[ \pi _{\tau - 1}+\omega \Big (g_1(\pi _{\tau - 1}) - \pi _{\tau - 1}\Big ) \right] +(1-\nu )\left[ \pi _{\tau - 1}+\omega \Big (g_2(\pi _{\tau }) - \pi _{\tau }\Big )\right] \nonumber \\= & {} \nu \tilde{\pi }_{\tau +1}^1+(1-\nu )\tilde{\pi }_{\tau +1}^2,\nonumber \\ \pi _{\tau + 2}= & {} \nu \left[ \pi _{\tau }+\omega \Big (g_2(\pi _{\tau }) - \pi _{\tau }\Big ) \right] +(1-\nu )\left[ \pi _{\tau }+\omega \Big (g_1(\pi _{\tau +1 }) - \pi _{\tau +1 }\Big )\right] \nonumber \\= & {} \nu \tilde{\pi }_{\tau +2}^2+(1-\nu )\tilde{\pi }_{\tau +2}^1, \end{aligned}$$
(12)

from which the double-phase mechanism can be seen as the average of two single-phase adaptive expectation mechanismsFootnote 19\(\tilde{\pi }_{\tau }^i\) and \(\tilde{\pi }_{\tau }^j\). For instance, to form expectations about price at \(\tau + 1,\) the agents obtain two guesses \(\tilde{\pi }_{\tau +1}^1\) and \(\tilde{\pi }_{\tau +1}^2,\) both based on a correction of the previous in-phase expected price \(\pi _{\tau - 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 \(\nu \) 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), \(\omega \) can have a counterintuitive role on stability, as evident looking at the bifurcation diagrams reported in Fig. 7C, in which, as \(\omega \) decreases, a stable equilibrium can become unstable.Footnote 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.Footnote 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 \(\omega \) is too large, both single-phase adaptive mechanisms provide too erratic prices, and this prevents error correction. If \(\omega \) 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 \(\omega \) decreases, one of the two single-phase adaptive mechanisms will start stabilizing, while the other will again exhibit persistent oscillations. If \(\omega \) further decreases, the agents will average out \(\tilde{\pi _{t}}^i,\) which is still characterized by erratic dynamics, and \(\tilde{\pi _{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 \(\tilde{\pi _{t}}^i,\) and oscillations are now persistent.Footnote 22 If then \(\omega \) is again reduced, also the nonconvergent phase will enter a stabilization process and once again trajectories start to converge.

Fig. 8
figure 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)

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 given expectation weight \(\omega \), 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.Footnote 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 out-of-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 \(\omega \in [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 \(\mathbf{p} ^{*}\) becomes again stable (\(\omega \approx 0.58\)), we have that the existing 4-points attractor has a basin (yellow color) whose extent is much more significant than that of \(\mathbf{p} ^{*}\) (blue color). As \(\omega \) increases, we have that the basins becomes more scrambled (Fig. 8B), and \(\mathbf{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 \(\mathbf{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.

5 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 quasi-periodic) 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 in-phase 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.