1 Backgrounds

Global demand for gasoline is affected by technological change, global population growth, motor vehicle ownership and heating oil consumption. Since the last decade, we can clearly observe that gasoline prices are highly volatile and this makes price modelling and forecasting, and risk management very challenging. Global warming and greenhouse gas emissions interact with the demand for gasoline. However, political instability in the oil-producing countries caused a remarkable disruption in energy supply, market equilibrium and prices since the 1990s.

In the gasoline market the equilibrium price is set at the intersection point of market aggregated demand and supply. Gasoline demand modelling, following Ramsey et al. (1975), Dahl (1979, 1995), and Yang and Hu (1984), considers supply and demand to emphasize supply along with demand in the gasoline market, and also the level of supply-side intervention and policy in the gasoline market. Relatedly, Dahl and Dugga (1996) studied price elasticity of demand and supply in US oil market and indicated that US oil reserves to be elastic. Furthermore, Hunter and Tabaghdehi (2013a) examined gasoline price behaviour across different regions in the long-run and the short-run, specifying that the market structures and price dynamics may differ across regions.

For a product such as gasoline, there is little quality uncertainty as the quality of the product is regulated for reasons of safety and the manufacturer needs to meet a standard for the product to avoid litigation from the public, corporate employees and the motor vehicle manufacturers who might engage in a class action where such failure to impact their reputation and affect sales.

Price uncertainty is an important issue, and it might reflect the potential for disequilibrium in the energy market (Arrow 1962). Hence in this analysis, using different regime switching models we investigate the market disequilibrium caused by imperfect competition or price leadership in gasoline market. Yang and Hu (1984) formulate an endogenous switching model to examine a gasoline market but their analysis paid no attention to non-stationarity. Hence, in this article we formulate two different switching models more adequately and examine their behaviour and the nature of the different regimes in the US gasoline market.

2 Methods

The study of demand and the notion of an economy or a market is not in full equilibrium which was investigated in early literature by Hicks (1936), Arrow (1962), Maddala and Nelson (1974), Rosen and Quandt (1978), Maddala (1983), Muellbauer (1983), Andrews and Nickell (1985) and Robinson (1994). Under disequilibrium hypothesis only one regime can be observed at the time.Footnote 1 However, the disequilibrium approach derived initially to estimate demand and supply equation in a static context was not developed to handle non-stationary series. Here a static switching structure is devised to identify demand via the min condition and to measure the long-run market failure.

At disequilibrium, the market follows min condition shown in Eq. 1:

$$Q_{t} = \hbox{min} \left( {D_{t} ,S_{t} } \right)$$
(1)

where

  • Q t  = S t if D t  > S t this implies there is excess demand and quantity transacted in the market is equal to quantity supplied

  • Q t  = D t if D t  < S t this implies there is excess supply in the market and quantity transacted in the market is equal to quantity demanded.

Yang and Hu (1984) formulated a gasoline market model testing disequilibrium that may have been caused by either imperfect price adjustment by buyers and sellers or institutional price restrictions. In Yang and Hu (1984) they take no account of non-stationarity or the potential that the estimations may need to handle an autoregressive unit root. In their estimation using the errors is serially correlated and the test statistics are non-standard.

To address this, we applied the Phillips–Hansen fully modified regression to estimate the parameter of the long-run relation. Phillips and Hansen (1990) developed a semi-parametric method of estimation to take account of moving average or autoregressive errors. The Phillips–Hansen method estimates the parameters of a single cointegration relation by fully modified regression. Consider the OLS regression below:

$$y_{t} = \alpha_{0} + \alpha_{1} x_{t} + \varepsilon_{t}$$
(2)

where y t is an I(1) variable, x t is a k × 1 vector of I(1) regressors, and the first-difference of x t is stationary: Δx t  = μ + υ t .

The distribution of the OLS estimator in Eq. (2) with non-stationary series is non-standard, and the parameters are super-consistent when there is cointegration, although the t tests are not well defined. Hence, the Phillips and Hansen fully modified OLS estimator computes an estimate of the long-run variance that corrects the regression to take account of the serial correlation associated with the potential unit root in the error. With the exception of the conventional least squares regression result that applies with truly exogenous variables such as indicators, dummies and time, the estimations and inference are valid as long as the dependent variable and any potentially endogenous regressors are I(1), Kitamura and Phillips (1995).

Here we analysed disequilibrium switching model using the monthly data of regular gasoline sales level (Q), regular retail gasoline real price (RP), WTI crude oil price (PW), consumer price index (CPI), producer price index (PPI), gasoline unleaded regular cost of insurance and freight (Cost), total energy consumption (EXP), city-gate gas real price (PGAS), disposable income (Y), automobile sales (Auto), price of the residual fuel oil (PRes), price of the distillate fuel oil (Pdst), and refineries net input of crude oil (RI) from 1992:1 to 2012:9 in the USA.Footnote 2 The data in log levels and their differences are graphed in Figs. 1 and 3, and the frequency distributions of both datasets are plotted in Figs. 2 and 4.

Fig. 1
figure 1

Plot of LExpn, LRP, LRPGas, LPRes, LPdst, LPW, LY, LRI, LPPI, LCPI, LCost, LAUT and LQ in the US

Fig. 2
figure 2

Frequency distributions of LExpn, LRP, LRPGas, LPRes, LPdst, LPW, LY, LRI, LPPI, LCPI, LCost, LAUT and LQ in the US

From Figs. 1 and 3, the price level has drift, whereas the differenced series appear to move randomly around the fixed mean. Furthermore, Fig. 1 suggests LEXPN, LRI, LCPI, LAUT, and LQ are seasonal. Considering Figs. 2 and 4, the frequency distributions of all the log data (Fig. 2) suggests the series do not revert to mean and overall might suggest two regimes, while the frequency distribution of data in their log differences (Fig. 4) seems to be closer to normality.

Fig. 3
figure 3

Plot of DLEXP, DLRP, DLRPGAS, DLPRES, DLPDST, DLPW, DLY, DLRI, DLPPI, DLCPI, DLCOST, DLAUT and DLQ in the USA

Fig. 4
figure 4

Frequency distributions of DLEXP, DLRP, DLRPGAS, DLPRES, DLPDST, DLPW, DLY, DLRI, DLPPI, DLCPI, DLCOST, DLAUT and DLQ in the USA

Hence using same variables as Yang and Hu (1984) and furthermore using Phillips–Hansen modified method, we identified following switching disequilibrium equation:

$${\mathbf{Q}}_{{\mathbf{t}}} =\varvec{\gamma}_{{\mathbf{0}}} +\varvec{\gamma}_{{\mathbf{1}}} {\mathbf{D}}_{{\mathbf{t}}} +\varvec{\gamma}_{{\mathbf{2}}} \varvec{d}^{\varvec{d}} \varvec{P}_{\varvec{t}} +\varvec{\gamma}_{{\mathbf{3}}} \varvec{d}^{\varvec{d}} \varvec{Y}_{\varvec{t}} +\varvec{\gamma}_{{\mathbf{4}}} \varvec{d}^{\varvec{d}} \varvec{Aut}_{\varvec{t}} +\varvec{\omega}_{{\varvec{dt}}} +\varvec{\gamma}_{{{\mathbf{5}} }} \varvec{d}^{\varvec{s}} \varvec{P}_{\varvec{t}} +\varvec{\gamma}_{{\mathbf{6}}} \varvec{d}^{\varvec{s}} P_{{\varvec{res}\,\varvec{t}}} +\varvec{\gamma}_{{\mathbf{7}}} \varvec{d}^{\varvec{s}} P_{{\varvec{dst}\,\varvec{t}}} +\varvec{\gamma}_{{\mathbf{8}}} \varvec{d}^{\varvec{s}} P_{{\varvec{w}\,\varvec{t}}} + \,\varvec{\gamma}_{{\mathbf{9}}} \varvec{d}^{\varvec{s}} \varvec{RI}_{t} +\varvec{\omega}_{{\varvec{st}}}$$
(3)

In Eq. 3 D t is aggregated gasoline demand, P t is the regular retail gasoline real price, Y t is disposal income, and Aut t is automobile sales, and ω dt include explanatory variables not clarified in the demand function. Similarly in the supply-side equation, the P w is the WTI crude oil price,Footnote 3 Pres is price of residual fuel oil, and P dst is price of distillate fuel oil to analyse the substitution effect in the production process,Footnote 4 RI is refineries net input of crude oil, dd is dummy demand, and ds is dummy supply, and ω st comprise unexplained explanatory variables.

To identify the dummy for demand (dd) and supply (ds), we evaluated relative price from the following equations, where if ΔlpRetail Price − ΔlpConsumer Price Index > 0 indicates that the relative price is increasing and D > S which classifies ds, otherwise (ΔlpRetail Price − ΔlpConsumer Price Index < 0) there is a decrease in the relative price identifying that D < S and that indicates dd.

3 Results and discussions

All the above are in logarithms and regime dependent. The results for the above disequilibrium switching estimations are presented as demand and supply equations in Table 1. In the demand-side equation all estimated parameters are statistically significant with their expected sign. A 1% increase in the retail gasoline price will reduce the demand for gasoline by 3.43%, and this implies that consumers are sensitive to gasoline price changes in changing their gasoline consumption level. A significant positive income coefficient indicates that an increase in consumer income and automobile sales level may increase gasoline demand in the market. This result indicates that a 1% increase in the consumer income will increase the gasoline demand by 2.87% and it shows consumers are responsive to their income changes in changing gasoline demand.

Table 1 Static disequilibrium switching estimation 1

The positive sign of γ5 indicates that the price of gasoline affects a gasoline supply positively that is consistent with economic theory. Its significance value of 3.07 identifies that refiners are sensitive to gasoline price changes in changing output level. However, the negative sign of γ 6 and γ 7 indicates that residual fuel oil and distillate fuel oil price rises will reduce the supply of gasoline so the refiner produces for these markets where possible and substitute away from gasoline. While insignificant coefficients γ 6 and γ 7 identify that changes in gasoline production cannot be attributed to fluctuations in price of residuals and distillate fuel oil. The crude oil price, which explains the effect of the input price on gasoline supply, has an expected negative sign but statistically insignificant identifying that change in gasoline production cannot be impacted by input price fluctuations. Finally, the refineries net input of crude oil explains the scale effect in the supply equation, has a negative sign and is statistically insignificant indicating that it appears not to affect gasoline supply.

As we see in Table 1, the supply equation mostly contains insignificant coefficients and to further investigate this relation we estimate the new model below. However, from economics theory gasoline consumption might be highly dependent on other factors such as consumer price index, total energy expenditure, and the city-gate real gas price as a substitute good that affects consumer’s gasoline consumption behaviour. Similarly the firm supply may be affected by other factors such as the cost and producer price index. Following disequilibrium switching equation estimated using Phillips and Hansen modified method:

$$\begin{aligned} {\mathbf{Q}}_{{\mathbf{t}}} & = {\varvec{\upvarphi }}_{{\mathbf{0}}} + {\varvec{\upvarphi }}_{{\mathbf{1}}} {\mathbf{D}}_{{\mathbf{t}}} + {\varvec{\upvarphi }}_{{\mathbf{2}}} \varvec{d}^{\varvec{d}} \varvec{P}_{t} + {\varvec{\upvarphi }}_{3} \varvec{d}^{\varvec{d}} \varvec{CPI}_{\varvec{t}} + {\varvec{\upvarphi }}_{4 } \varvec{d}^{\varvec{d}} \varvec{EXP}_{\varvec{t}} + {\varvec{\upvarphi }}_{5} \varvec{d}^{\varvec{d}} \varvec{P}_{{\varvec{Gas}}} + {\varvec{\upvarphi }}_{6} \varvec{d}^{\varvec{d}} \varvec{Y}_{\varvec{t}} +\varvec{\nu}_{{{\mathbf{dt}}}} \\ & \quad + {\varvec{\upvarphi }}_{{\mathbf{7}}} \varvec{d}^{\varvec{s}} \varvec{P}_{\varvec{t}} + {\varvec{\upvarphi }}_{{\mathbf{8}}} \varvec{d}^{\varvec{s}} \varvec{C}_{\varvec{t}} + {\varvec{\upvarphi }}_{{\mathbf{9}}} \varvec{d}^{\varvec{s}} \varvec{PPI} + {\varvec{\upvarphi }}_{{{\mathbf{10}}}} \varvec{d}^{\varvec{s}} \varvec{P}_{{\varvec{W}\,\varvec{t}}} +\varvec{\nu}_{{{\mathbf{st}}}} \\ \end{aligned}$$
(4)

where P t is the price of the gasoline, CPI is consumer price index, EXP is total energy expenditure, PGas is city-gate gas real price, Y t is disposal income, and νdi includes explanatory variables not clarified in the demand function. Also in the supply-side equation P W is the WTI crude oil price,Footnote 5 PPI is the producer price index, and C t is unleaded regular gasoline costs (insurance and freight), and νst comprise unexplained explanatory variables in the supply equation.

The results for the estimation of Eq. (4) are presented in Table 2. For the demand-side equation all estimated parameters are significant with expected sign except φ3 that could be due to the high usage of the other energy sources in comparison with gasoline. The φ2 indicates that a 1% increase in the retail gasoline price will reduce the demand for gasoline by 11.19%; this implies that consumers are highly sensitive to gasoline price in changing their gasoline consumption level. The income coefficient (φ6) suggests that a 1% increase in consumer income will increase the gasoline demand by 6.26% and it shows consumers are responsive to income in changing their gasoline demand level. In the supply side of the equation only φ10 has the expected sign that is also statistically insignificant. This implies that gasoline supply is not be strongly affected by other factors.

Table 2 Static disequilibrium switching estimation 2

Comparing above estimations 3 and 4 via the regression that imposes the switch, the variables used in Eq. 4 seem to explain the model more appropriately as most of the variables are statistically significant. The significant coefficient subject to all series being I(1) implies that this is a long-run relation. This suggests that models based on the supply and demand regimes give rise to meaningful long-run equations.

Here, the intention is to use Markov switching method as a mechanism to identify supply and demand regimes in the long-run. Each regime is characterized by a different parameterization. We focus on modelling the gasoline market as a single market and to observe both sides of the market. The primary method to estimate disequilibrium models was investigated in a static context by Fair and Jaffee (1972), Fair and Kelejian (1974) and Maddala and Nelson (1974). Maddala (1983) provides a useful summary of this early literature and compares this with the same latent effects captured by error correction models.

Considering an static model would usually be poorly specified especially in relation to serial correlation. In Robinson (1994) a number of corrections were applied to take account of this and in Davidson et al. (1978) the notion of disequilibrium in dynamic equations was embedded in error correction models. Furthermore, Muellbauer (1983) developed at the macro-level continuous switching when markets are aggregated. Maddala (1983) discussed disequilibrium where the latent variable equilibrium term is determined by switching, and this is embedded in an error correction term.

The regime switching ECM can be explained as an expanded linear error correction model by allowing the short-run parameters to switch in different regimes. Hence a Markov switching error correction model (MSECM) can be used to describe the short-run variation in gasoline sales. MSECM signifies that when the system is in a stable state the error correction takes place and in the unstable state there are deviations from the long-run equilibrium that cannot be corrected through the ECM. In terms of the disequilibrium model, these would be the same when there is correction to another equilibrium state.

Here the error correction model is also embedded in a Markov switching equation and the Markov regime switching error-correction model (MRSECM) is used to determine regimes that are latent in the data.

Let us assume that the linear regression model is:

$$y_{t} = \beta X_{ti } + u_{t} .$$

where y t denotes the dependent variable, X ti denotes the matrix of independent variables. The above regression model is separated into two relations for:

$${\text{Regime}}\,\left( 1 \right) {:} \quad y_{i = } \beta_{1} 'X_{1i} + \, u_{1i} \quad {\text{if}}\quad\gamma 'Z_{i} \ge \, u_{i}$$
(5)
$${\text{Regime}}\,\left( 2 \right) {:}\quad y_{i = } \beta_{2} 'X_{2i} + \, u_{2i} \quad {\text{if}}\quad\gamma 'Z_{i} < u_{i}$$
(6)

where Z i determines the ith observation that is generated for each regime, based on the unknown coefficient vector γ′ that defines the switch and u1i and u2i are assumed normally distributed with mean zero and variance–covariance matrix:

$$\varvec{\sigma}= \left[ {\begin{array}{*{20}c} {\sigma_{1}^{2} } & {\sigma_{12} } & {\sigma_{1u} } \\ {\sigma_{21} } & {\sigma_{2}^{2} } & {\sigma_{2u} } \\ {\sigma_{1u} } & {\sigma_{2u} } & { 1} \\ \end{array} } \right]$$

where \(\sigma_{1}\) shows the variance of the first regime and \(\sigma_{2}\) indicates the variance of the second regime. If \(\sigma_{1}\) ≠ \(\sigma_{2}\) and β1 ≠ β2, then the regression relation switches between two regimes.Footnote 6 The Markov regime switching error correction model that might be a single equation from the VECM with two regimes is defined on the first-differenced monthly relative gasoline price:

$$\begin{aligned} \left( {\Delta {\text{LP}}_{g} - \Delta {\text{LCPI}}} \right)_{t} & = \beta_{r,i} \left( {{\text{LP}}_{g} {-} {\text{LCPI}}} \right)_{t - 1} + \mathop \sum \limits_{i = 1}^{p - 1} \gamma_{s,i} \left( {\Delta {\text{LP}}_{g} {-} \Delta {\text{LCPI}}} \right)_{t - i} + \delta_{s,i} \left( {{\text{LCPI}}{-}{\text{LPPI}}} \right)_{t - 1} \\ & \quad + \mathop \sum \limits_{i = 1}^{p - 1} \zeta_{s,i} \left( {\Delta {\text{LCPI}}{-}\Delta {\text{LPPI}}} \right)_{t - i} + \mathop \sum \limits_{i = 1}^{p - 1} \eta_{s,i} \left( {\Delta {\text{LCost}}} \right)_{t - i} + \mathop \sum \limits_{i = 1}^{p - 1} \theta_{s,i} \left( {\Delta {\text{LP}}_{\text{WTI}} } \right)_{t - i } \\ & \quad + \mathop \sum \limits_{i = 1}^{p - 1} \lambda_{s,i} \left( {\Delta {\text{LP}}_{\text{GAS}} } \right)_{t - i} + \mathop \sum \limits_{i = 1}^{p - 1} \kappa_{s,i} \left( {\Delta {\text{LP}}_{dst} } \right)_{t - i} + \mathop \sum \limits_{i = 1}^{p - 1} \nu_{s,i} \left( {\Delta {\text{LP}}_{res} } \right)_{t - i} + \varepsilon_{t} \\ \end{aligned}$$
(7)

whereFootnote 7 \({\varvec{\upgamma}}_{{{\mathbf{r}},{\mathbf{i}} }}\), \({\varvec{\upzeta}}_{{{\mathbf{r}},{\mathbf{i}}}}\), \({\varvec{\upeta}}_{{{\mathbf{r}},{\mathbf{i}} }}\), \({\varvec{\uptheta}}_{{{\mathbf{r}},{\mathbf{i}}}}\), \({\varvec{\uplambda}}_{{{\mathbf{r}},{\mathbf{i}}}}\), \({\varvec{\upkappa}}_{{{\mathbf{r}},{\mathbf{i}}}}\), and \({\varvec{\upnu}}_{{{\mathbf{r}},{\mathbf{i}}}}\) are the short-run dynamics of price data which is allowed to change within the regimes, s identifies the regime at time t, and ε t is the vector of error terms. Using the Markov regime-switching model, we describe the equilibrium correction via a non-linear algorithm that computes and maximizes the empirical likelihood in a two-regime model. With a Markov process at each period (t), the probability of the switch from regime i to j can be calculated using the equation below:

$$p_{ij} = \Pr \left( {s_{t + 1} = j|s_{t} = i} \right)$$

where the probability of remaining in a given regime i is signified as p ii , consequently p ij  = 1 − p ii signifies the probability of switching from regime i to the other regime, j. Similarly p jj is the probability of remaining in the regime j and p ji  = 1 − p jj is probability of switching to regime i.

Correspondingly Table 3 shows that parameters used in switching Eq. 7 are affected by the regimes and we identified that regimes are persistent and the probability of staying in regime 0 is 0.502 and the probability of staying in regime 1 is 0.465. By comparing the demand and supply dummies (dd and ds used in Eqs. 3 and 4) with the regimes, we identified that regime 0 is demand and regime 1 is supply regime. This implies that regular gasoline costs (insurance and freight), gas retail real price, residual fuel oil price, and distillate fuel oil price significantly affect the relative real gasoline price. It is of interest to note that this would seem to lend support to the notion of switching and that equilibrium may not just be captured by the disequilibrium term related to error correction behaviour.

Table 3 Dynamic disequilibrium switching

Assuming stationarity of price proportion based on conventional inference, the two correction terms in Table 3 are significant and this implies negative reaction of gasoline market prices to CPI as indicative of demand responds, and positive reaction of gasoline market price to PPI as indicative of supply responds.

4 Conclusions

In this paper, we applied regime switching model on market data to identify any potential disequilibrium in the long-run. Long-run disequilibrium in energy markets indicates the need to consider the demand and supply management to improve energy market efficiency and stability. The results on the disequilibrium study imply that the long-run gasoline price dynamics may not always correct the system. Furthermore, the Markov regime switching model with two different regimes identifies there is a significant effect of regular gasoline costs, gas retail real price, residual fuel oil price, and distillate fuel oil price on retail gasoline prices in the USA and consequently on the stability of correction to these regimes.

Here it has been shown that the switch model can be estimated by a single regression with the series being scaled by dummy variables of DS and DD. The dummy DS is 1 when the change in the relative price exceeds zero, while DD is 1 when the change in the relative price is less than zero. With sufficient data it should be possible to utilize the two-step regression method of Engle and Granger (1987) to test whether the regression residuals are stationary. Unfortunately, the switch increases the number of parameters as the demand and supply equations are being computed simultaneously so with more than two hundred observations the available software cannot compute the critical value of Dickey Fuller test. To determine the importance of the parameters in the cointegrating regression, they are computed using the fully modified estimation procedure of Phillips and Hansen (1990). The semi-parametric method corrects the estimator for both autoregressive and moving average errors, and this implies that it is possible to determine the significance of these parameters via conventional inference as long as the regressors are I(1) except for series that are truly exogenous.

The data are then separated using the relative as compared with absolute price changes. This separation is applied to the static model of Yang and Hu (1984) on a more recent data set. However, the static model only has a long-run interpretation. Based on the estimation results, the demand curve seems well defined, while it is less easy to interpret the second relation as a supply equation. A more recent approach to demand has also been used to define this equation and compared with a new supply equation, but this worked less well than the model of Yang and Hu (1984). Another interpretation of the supply equations is that the long-run supply function is flat implying firms set price as a mark-up of their cost.

The final analysis relates to a dynamic model for real gasoline prices in the USA from 1993 to 2012. This approach is based on an error correction model where the adjustment coefficients switch between regimes. Disequilibrium is captured by the correction, but this may be unstable or relate to a further equilibrium. Estimation of the Markov Switching ECM indicates that deviations from long-run equilibrium have an effect on gasoline price dynamics. Also the result signifies that regular gasoline costs (insurance and freight), gas retail real price, residual fuel oil price, and distillate fuel oil price significantly affect the relative real gasoline price in the market. More specifically it demonstrates that there are two different regimes of Supply and Demand in the US gasoline market indicating that the market collusion may be less concern of this market in the USA.