Dynamics of a Bertrand Duopoly Game of the Greek Oil Market and Application of the d-Backtest Method

This work presents the complexity that emerges in a Bertrand duopoly between two companies in the Greek oil market, one of which is semi-public and the other is private. The game uses linear demand functions for differentiated products from the existing literature and asymmetric cost functions that arose after approaches using the published financial reports of the two oil companies (Hellenic Petroleum and Motor Oil). The game is based on the assumption of homogeneous players who are characterized by bounded rationality and follow an adjustment mechanism. The players’ decisions for each time period are expressed by two difference equations. A dynamical analysis of the game’s discrete dynamical system is made by finding the equilibrium positions and studying their stability. Numerical simulations include bifurcation diagrams and strange attractors. Lyapunov numbers’ graphs and sensi-tivity analysis in initial conditions prove the algebraic results and reveal the complexity and chaotic behavior of the system focusing on the two parameters k 1 and k 2 (speed of adjustment for each player). The d-Backtest method is applied through which an attempt is made to control the chaos that appears outside the stability space in order to return to the locally asymptotically stable Nash equilibrium for the system.


Introduction
The Cournot's game was modified in 1883 by the French mathematician Joseph Louis Francois Bertrand. He suggested that the players (sellers) actually choose prices rather than the production quantities. The basic premise of the Bertrand model originally is that all players make decisions in a naive way so that in every step, each player assumes the last values were taken by the competitors without an estimation of their future reactions. However, such an assumption is very unlikely under the conditions of the real market, since not all players share naive beliefs. Some of the authors proposed different approaches to firm behavior, considering duopolies under homogeneous expectations and found a variety of complex dynamics in their games, such as the appearance of strange attractors [1]- [11]. Also, models with heterogeneous agents were studied [2] [12]- [23].
The producers in the real market behave without knowing the entire demand function, though it is possible that they have a perfect knowledge of technology, represented by the cost function. Here it is more likely that firms employ some local estimate of the demand. This issue has been previously analyzed [24]- [31]. Bounded rational players (sellers) update their strategies based on discrete-time periods using a local estimate of the marginal profit. With such a local adjustment mechanism, the players are not requested to have a complete knowledge of the demand and cost functions [11] [13] [32] [33].
The present paper is a partial approach to the authors' main ongoing research objective, which is the emergence of complexity in various oligopoly models as well as its control. In this study, the dynamics of a Bertrand-type duopoly game with differentiated goods where both firms behave with homogeneous expectation strategies with asymmetric cost functions that are resulted from the regression analysis using their published financial reports. In addition to the differentiation of the cost functions for the two players, there is another assumption that the composition of two companies is different and more specifically that the first one is a private company and the second is public by a percentage (semi-public). It is shown that the model gives more complex, chaotic and unpredictable trajectories as a consequence of the change in the bounded rational players' speed of adjustment (parameter k). The paper is organized as follows: in Section 2, the dynamics of the duopoly game with homogeneous expectations, differentiated products, linear demand and asymmetric cost functions for two players are analyzed. Both players are set as bounded rationality. The existence and the local stability of the equilibrium positions are studied; in Section 3, numerical simulations are used to verify the algebraic results of Section 2, we show the complex dynamics via graphing strange attractors, computing Lyapunov numbers, and sensitive dependence on initial conditions. Finally, in Section 4, the application of the d-Backtest in this duopoly game is presented as an attempt to control the chaos of the discrete dynamical system that appears.

The Construction of the Game
The game is based on the assumption that two homogeneous players participate in it and more specifically it is considered that they decide their products' prices in a rational way following an adjustment mechanism (bounded rational players). They produce differentiated goods and offer them on a common market at discrete time periods 1, 2, t =  . At each period t, each company must form an expectation of the rival's strategy in the next time period in order to determine the corresponding profit-maximizing prices for period t + 1. With q 1 , q 2 are symbolized the production quantities of two players. It is considered that the preferences of consumers represented by the equation: where α > 0 is a positive parameter which expresses the market size and ( ) Calculating the direct demand functions (as functions of prices p 1 and p 2 ) it gives the equations:  It is supposed that the cost function of the first player (Motor Oil Group) is: and: Then the marginal profits at the point of the strategy space are given by: and: The Consumer Surplus (CS) is calculated, because it is contained in the social welfare that the second player cares about a percentage of it and it is given by the equation: The social welfare (W) is given by: The second player the Hellenic Petroleum Group (semi-public firm) cares about the maximization of a function that contains a percentage combination between the social welfare and his profit function (generalized relative profit function). This utility function V 2 is described by the following equation: where [ ] 0,1 s ∈ and the marginal function of V 2 is given by: The following substitutions are defined to simplify the mathematical calcula- Taking into account these assumptions the partial derivatives of Π 1 and V 2 take the following forms: Both players follow the same strategy to decide their production quantities (homogeneous players) and they are characterized as bounded rational players.
According to the existing literature it means that the first private company decides its price following a mechanism that is described by the equation: and the second player (semi-public company) who is also a bounded rational player following a similar mechanism that is given by the equation: Through this mechanism each player increases his level of adaptation when his marginal utility is positive or decreases his level when his marginal utility is negative, where k is considered as the speed of adjustment for two players. The parameter k i is positive (k i > 0 with i = 1, 2) and gives the extend variation price of each i player is following a given signal. The dynamical system of the players is described by: The dynamical analysis of this system Equation (16) that is contained at the next sub-section is focusing on the parameters k 1 and k 2 .

Dynamical Analysis
The dynamical analysis of the discrete dynamical system of Equation (16) involves the finding of equilibrium positions and the studying their stability. The ultimate goal of this algebraic study is to formulate a proposition that will be the stability condition of the Nash Equilibrium position. These algebraic results are verified and visualized doing some numerical simulations using the program of Mathematica.

The Equilibrium Positions
The equilibrium positions of the dynamical system Equation (16) are the nonnegative solutions of the following algebraic system: which is obtained by setting:  If * * 1 2 0 p p = = , then the equilibrium position is the point: and the equilibrium position is the point:  If then the following system is obtained: and the nonnegative solution of this algebraic gives the Nash Equilibrium position ( ) and: From the three equilibrium positions E 1 , E 2 and * E , whereas A, B, C, D, E, F > 0 and * * 1 2 , 0 p p > , the following conditions arise:

Stability of Equilibrium Positions
To study the stability of the equilibrium positions the Jacobian matrix of the dynamical system Equation (16) is needed, which is the matrix: where: ( ) ( ) and as a result the Jacobian matrix of game's discrete dynamical system Equation (16) is the following matrix: For the E 0 the Jacobian matrix becomes as: As it is clearly seems that 1 2 , 1 r r > , because A, D > 0. It means that the equilibrium position E 0 can be characterized as unstable.
For the position E 1 the Jacobian matrix becomes as: with Tr = I + K and Det = I ⋅ K. From the characteristic equation of J(E 1 ), the nonnegative eigenvalues are found as: Since, A, C > 0, it's clearly seems that 1 1 r > and the E 1 equilibrium position is unstable.
For the position E 2 the Jacobian matrix becomes as:  Since, D, E > 0, it's clearly seems that 2 1 r > and the E 2 equilibrium position is also unstable. For the Nash equilibrium * E the Jacobian matrix becomes as: To study the stability of Nash equilibrium three conditions are used that the equilibrium position is locally asymptotically stable when they are satisfied simultaneously [34] [35]: It's easy to find that the first inequality (i) becomes as: Also, the inequality (ii) gives: ( ) and it's always satisfied because of Equation (22).
Finally, the inequality (iii) becomes as: Proposition: The Nash equilibrium of the discrete dynamical system Equation (16) is locally asymptotically stable if:

Numerical Simulations
In this section the previous algebraic results are verified and the chaotic trajecto-ries that appear when the parameters k 1 and k 2 take values outside the stability space are visualized. At first the stability region between the parameters k 1 and k 2 when all other game's parameters take fixed values is plotted. Numerical simulations are made for the common speed of adjustment of two players (k 1 = k 2 ). Plotting the bifurcation diagrams of p 1 and p 2 with respect to the common parameter k (speed of adjustment), the stability interval is verified and the chaotic evolution through period doubling is highlighted. Strange attractors and Lyapunov numbers' graphs reveal the chaotic behavior of the system when the parameter k takes larger values making the system unpredictable. Also, the sensitivity analysis in initial conditions [36] is made for these large values of the parameter k showing that only a small change on the coordinates of the system's initial conditions can cause large differences in system's behavior giving an evidence for chaos.

Stability Space between k 1 and k 2
The stability space between the two parameters k 1 and k 2 setting fixed values to the other parameters can created using the stability conditions of Proposition. These two inequalities Equation (36) and Equation (38)  State that participates in the Hellenic Petroleum Group is 35.5% it is necessary to set the value of 0.355 to the parameter s, which expresses this percentage. As a result the stability conditions take the following more specific forms:  Figure 3 shows the stability region between the parameters k 1 and k 2 as a result of Equation (39) and Equation (40).

Focusing on the Common Speed of Adjustment k (k 1 = k 2 )
At first, setting the previous specific values of the parameters α = 5, c 1 = 1, c 2 = 0.5, c 4 = 1, d = 0.5 and s = 0.355 the Nash Equilibrium becomes as: and for the stability conditions it means that the parameter k must take values into the interval: This algebraic result is verified by the bifurcation diagrams of p 1 and p 2 with respect to the parameter k (Figure 4 and Figure 5). As it seems there is a locally asymptotically stable orbit until the value of 0.097 for the parameter k and for larger values of the parameter k the system's behavior becomes chaotic and unpredictable. This chaotic trajectory can create strange attractors ( Figure 6) for higher values of the parameter k like k = 0.14 (outside the stability space). Also, computing the Lyapunov numbers (Figure 7) for this value of the parameter k (k = 0.14) and setting the same fixed values for the other parameters, it seems that they are getting over the value of 1 as an evidence for the chaotic trajectory.
As it is known a characteristic property of chaotic trajectory is that the system becomes sensitive in initial conditions, which allows only a small change on the coordinates of initial conditions to change completely the system's behavior. For example, choosing two different initial conditions (0.1, 0.1) and (0.101, 0.1) after a small change at the p 1 -coordinate and plotting the time series of the system ( Figure 8 and Figure 9) it seems that at the beginning the time series are indistinguishable, but after a number of iterations, the difference between them builds up rapidly.

Chaos Control Applying the d-Backtest Method
The d-Backtest is a parameters' optimization method developed initially for financial applications [37] [38] [39], further more it has also been utilized in the research of the chaotic behavior of a duopoly, too [40]. In both cases the method attempts to identify backtesting periods that are optimal for parameter selection for a future period. for this application, the method utilizes various length verification periods and fixed length validation periods for the evaluation of the backtesting periods, using various methods that look into metrics such as profit factors, profits, extended profit margin and more [39]. This research uses the d-Backtest method for selecting values for k, dynamically for each player [40].

The Application of the d-Backtest Method
In this research the d-Backtest method is used for selecting values of the parameter k, dynamically and separately for each player [40]. Each player's goal is to decrease the deviation in prices by choosing appropriate values for k i in each step with the help of the d-Backtest method. In this case the system's difference equations were different as the second player takes into account a percentage of the social welfare that it is containing in his utility function. Apart from the above differentiation, the use of d-Backtest remains the same with the metric being the root mean square deviation of the prices over a period: This metric of variability is used for evaluating groups of backtesting periods by two families of methods, a simple average and an exponential average method. Each method family contains variations were the occurrences of backtesting periods are taken into account or the verification periods are longer than 1 and 2 steps or a combination of these two variations. Applied Mathematics Each player calculates the backtesting prices separately from each other, using the others' past prices in the formulas calculating their prices over past periods.
The prices have to be bound to a lowest value of 0.001 so that no negative prices appear. For each step each player calculates the prices for all 30 backtesting periods and all possible k i values in [0.001, 1.0] with a step of 0.001. Then, they compute the variability metric for each period and k i value and provide the data to the d-Backtesting method that will choose the right method for sorting the baktesting periods, then the right baktesting period and then the right k i value for the next step. Each player starts the game with an initial price of 0.1 and a value of 0.1 for the parameter k for the first 10 steps, until there are enough data for the d-Backtest method to work with after that.

The d-Backtest Method's Results
Games for initial values of k as 0.147 ( Figure 10), 0.3 ( Figure 11) and 0.7 ( Figure 12) and 500 steps for each one were ran. The results are shown in price values, k values and backtesting periods through the following figures: The results resemble to those of Sarafopoulos et al. [40].

Conclusion
In this paper, the dynamics of a differentiated Bertrand duopoly with homogeneous expectations, linear demand and asymmetric cost functions (regression analysis) are analyzed. The different cases, in which one of the players is not a completely private company and care about a percentage of the social welfare due to the participation of the public capital into it, are studied. By assuming that at each time period, each firm maximizes its expected utility function Π 1 (for the first player) or V 2 (for the second player) under bounded rationality expectation, a discrete dynamic system was obtained. The existence and stability of equilibrium of this system are studied. It is numerically shown that the model gives chaotic and unpredictable trajectories. The main result is that higher values of the speed of adjustment may destabilize the Bertrand-Nash equilibrium. Finally, in cases where the players choose these values of the parameter k for which, as algebraically and graphically proved, the discrete dynamical system of the Bertrand-type model behaves chaotically, the d-Backtest method was applied, giving dynamic values for the k parameter to each player for each time period, through which the system returns in locally asymptotically stable Nash Equilibrium.