1 Introduction

Recognized for its strong economic growth over the past three decades, the Chinese economy has been accompanied by a significant increase in the country’s energy consumption. The country's economic development is associated with industrialization, urbanization, and motorization, which are the three processes that consume energy. Currently, China uses 25% of the world’s energy. The Middle Kingdom feeds its needs mainly via two polluting and non-renewable energy sources: coal and oil. Coal is a vital resource of the Chinese economy, as it supports heavy manufacturing industries, power generation, and the construction sector. In 1990, the country consumed 446 million tons of coal, which increased to 2.8 billion tons in 2017.

The growth in oil was met with the expansion of the Chinese car fleet. Its consumption also experienced an explosion; the consumption of barrels per day was multiplied by six between 1980 and 2017 (from 2 to 12 barrels per day). This explains the status of China’s largest importer of oil. This high energy consumption makes China one of the largest polluters in the world. Six years after becoming the world’s leading greenhouse gas (GHG) emitter in the United States, in 2013, it emitted 9.9 billion tons of GHGs. The latter figure is almost double of US emissions and 27% of global emissions. Historically, China desires to be self-sufficient. However, the explosion in Chinese consumption has made the country dependent on imports. In addition to strategies for securing supplies of raw materials, China is seeking to produce its energy through nuclear power plants and by engaging in the renewable energy path.

Nevertheless, the drop in oil prices since the summer of 2014 has been spectacular. Fluctuating around 110 dollars since the beginning of 2011, the price of Brent crude oil fell to 55 dollars per barrel in February 2015, a decrease of 46% from July 2014. In Europe, this decline was also significant, with a drop of 38%. This shock is of comparable magnitude to that recorded between July and December 2008 during the “Great Recession.” This is largely due to the development of unconventional oil production in the United States, the transformation of the OPEC strategy, the decline in global demand, and the estimated growth of Iranian oil sales. All the above-mentioned aggressive oil supply/demand adjustments provide a long-term perspective for a scenario of low oil prices. This scenario may lead to a decrease in renewable energy consumption (REC) versus an increase in oil consumption.

From another perspective, a high oil price can potentially induce an energy transition from dirty and costly energy to clean and renewable energy. An increase in oil and coal prices makes firm investment costly and reduces profits. In this case, renewables can ultimately benefit from the current situation. The recent climate changes are considered an enormous challenge in the world. There is a strong need to preserve environmental quality by reducing pollution and increasing investments in renewable energy. Furthermore, the recent Russia-Ukraine war led to a jump in the price of crude oil, which was approximately 76 USD at the beginning of January 2022 and increased to 110 USD at the beginning of March 2022. An increase in the price of crude oil was also registered before the war. This was explained by the high demand for fuel during the COVID-19 pandemic and low investment in the oil and gas industry. The questions to be answered in this study are as follows: How does China react to the asymmetric effects of oil and coal prices on renewable energy consumption (REC)? Does an increase in fossil fuel prices lead to an energy transition from dirty and costly to clean and renewable energy?

This study aims to investigate the asymmetric short- and long-run impact of oil and coal prices on REC. To this end, we used data from China from 1970 to 2019 and performed the NARDL model initially developed by Shin et al. (2014). China was considered to be an appropriate case study for several reasons. First, China’s economy is based on fossil fuels, which represent more than 87 percent of total energy consumptionFootnote 1 . According to the China National Coal Association, China is the world’s largest consumer of coal, with 2,500 megatons in 2008 and over 4,000 megatons in 2020. Second, China ranks third in the world for natural gas consumption, accounting for approximately 6.4% of the world’s total consumption. It is also considered the world’s largest emitter of greenhouse gases and coal, which threatens the environmental quality and health conditions. Third, coal is a vital resource of the Chinese economy, as it supports heavy manufacturing industries, power generation, and the construction sector. Fourth, oil facilitated the expansion of the Chinese car fleet. The daily consumption of barrels multiplied by 6 between 1980 and 2017 (from 2 to 12 barrels per day).

This study contributes to the existing literature in several ways. First, to the best of our knowledge, the asymmetric relationship between oil and coal prices and REC has not been studied previously. Most prior research has focused only on the relationship between oil prices and REC. Second, the recent climate change that threatens environmental quality, and the conflict between Russia and Ukraine that causes oil and coal supply to be very costly and uncertain (due to supply disruption), promotes the use of NRE and urges the transition to eco-friendly energies. Third, contrary to other empirical studies based on conventional methods, we follow an econometric strategy based simultaneously on conventional and non-conventional methods. We first used the nonlinear autoregressive distributed lag (NARDL) model initially proposed by Shin et al. (2014) for both long-term and short-term potential asymmetries in oil, coal, and REC. Second, we used the support vector machine (SVM) and k-nearest neighbors (KNN) as machine learning methods to assess the predictive impact of negative and positive changes in oil and coal prices on the REC. Fourth, most previous empirical studies have focused only on the impact of changes in oil prices on the REC. In the current study, we used the oil price and added the effect of the coal price.

The remainder of this paper is organized as follows. A literature review is presented in Sect. 2. The data and methodology are presented in Sect. 3. Empirical findings are discussed in Sect. 4. Section 5 provides the robustness check. Finally, the conclusion and policy implication is presented in Sect. 6.

2 Literature review

The literature on the linear association between CO2 emissions, oil prices, and REC is well documented. However, few studies have examined the asymmetric long- and short-term relationships between oil and coal prices and REC consumption..

2.1 Studies based on linear approaches

When reviewing the literature, we note that linear studies on this topic are abundant compared to nonlinear. Recently, Zhao et al. (2021) attempted to build a general equilibrium model to investigate the effects of international oil price fluctuations on renewable energy development and investment in China. The main findings of this study reveal that any increase in the international oil price enhances the output and investment of renewable energy while decreasing exports and real GDP. Karacan et al. (2021) explored the Russian context. They used Russian data over the period 1990–2015 to investigate the link between renewable energy, oil prices, income, and CO2 emissions. Lin and Moubarak (2014) use an ARDL bound test to investigate the link between the REC and economic growth in China during 1977–2011. The findings reveal a significant two-way causality in the long run between REC and economic growth, implying that the growth of the Chinese economy supports the development of the renewable energy industry and this, in turn, contributes to economic growth.

Likewise, to assess the association between renewable energy as a proxy of energy consumption and economic growth, Ntanos et al. (2018) used a sample of 25 European countries from 2007 to 2016. They use the autoregressive distributed lag (ARDL) method as an econometric approach. Their findings supported two main conclusions: In countries with high economic levels, there is a higher correlation between REC and economic growth. However, countries with a lower GDP rely more on non-renewable energy consumption. In the EU context, Marinas et al. (2018) attempted to find an appropriate combination of economic growth and REC use over the period 1990–2014. The authors implemented an ARDL-bound framework. Based on this test, they found significant evidence of reciprocal causality between REC and economic growth from a long-term perspective. This bidirectional causality was confirmed for the entire group of countries under analysis, as well as for the seven Central and Eastern European states that were considered separately. Conversely, Dees and Vidican Auktor(2018) considered the effect of an increased installed capacity of electricity generation from renewable sources and an increase in renewable electricity generation on economic growth in the MENA region. Their results indicate that renewable energy investment does not improve economic growth.

Nevertheless, by applying the DOLS method, Maji et al. (2019) estimated the impact of renewable energy on economic growth in West African countries from 1995 to 2014. The findings reveal that REC is reducing economic growth in these countries due to the nature and source of the REC utilized in West Africa, which is primarily woody biomass. Sadorsky (2009) studied the link between REC, CO2 emissions, and oil prices in G-7 economies. The study shows that increases in oil prices have a smaller, though negative, impact on REC. In contrast, Apergis and Payne (2014) examine the determinants of REC per capita. They use a sample of seven Central American countries dating from 1980 to 2010. The findings indicate a positive and statistically significant estimated coefficient for fossil fuels (coal and oil), suggesting considerable substitution between renewable energy sources and fossil fuels. Furthermore, Apergis and Payne (2015) investigated the long-run causal dynamics between REC per capita, real GDP per capita, carbon dioxide emissions per capita, and actual oil prices, with a panel sample of 11 South American countries from 1980 to 2010. Using panel cointegration procedures, the author shows that an increase in real oil prices leads to an increase in REC per capita in the short run. This finding was interpreted as a reaction to the substitution of fossil fuel prices with a negative feedback effect of the increase in REC per capita to the drop in real oil prices. Brini et al. (2017) applied data from Tunisia during the period 1980–2011 to consider the connection between REC, trade, oil price, and economic growth. The findings of the ARDL bound test approach suggest that an oil price increase may imply an increase in the consumption of renewable energy. In addition, the authors identified a one-way relationship between renewable energy and oil in the short run. Using Granger causality in the quantile analysis approach, Troster et al. (2018) investigate the causal interaction between REC and oil prices for a period spanning from July 1989 to July 2016 in the U.S. The authors provide evidence of a lower tail effect from variations in oil prices to variations in renewable energy consumption. Economically, this result supports policymakers’ results, which support policymakers in implementing sustainable renewable energy policy programs. Padhan et al. (2020) use panel data from 1970 to 2015. During this period, the authors examined the effects of GDP, oil prices, and carbon emissions on REC using a panel quantile regression approach. The authors find evidence that oil prices positively affect renewable energy consumption. This indicates that an increase in oil prices can engender a lower use of oil and higher use of wind and solar power.

2.2 Studies based on non-linear approaches

In addition to the linear association between oil and coal price shocks and renewable energy consumption, nonlinear studies have been conducted. Some recent studies argue that the association between two indicators could be nonlinear and that there is an optimal threshold that affects such relations. Several studies have verified this nonlinear relationship; for example, Ameur et al. (2022) for the financial market sector, Hakimi and Hamdi (2019) for the financial development and human development relationship, and Boussaada et al. (2022) and Hakimi et al. (2020) for the banking sector. Recently, Ameur et al. (2022) studied the relationship between the spot and futures markets using the NARDL model. The findings support a bidirectional relationship between both markets over the short- and long-run with a greater lead for the futures market. Nonlinear studies were conducted by Apergis and Payne (2014). They used a panel smooth transition regression (PSTR) model to investigate the nonlinear relationship between renewable energy, economic growth, Co2 emission, and oil prices in Central America during the period 1980 to 2010. The findings indicate long-run cointegration among variables and a positive and significant relationship. The estimated results of the PSTR model show that post-2002, the effect of renewable energy consumption and oil prices strengthened compared with the pre-2002 period. Recently, Murshed and Tanha (2021) investigated the effects of oil price shocks on renewable energy. They use a sample of net oil-importing South Asian economies from 1990 to 2018. The results of long-run elasticity reveal a nonlinear relationship, suggesting that an increase in oil prices initially impedes renewable energy consumption. However, surpassing a certain threshold, any further increase in oil prices increases renewable energy consumption. Based on a sample of G7 countries from 1980 to 2018, Guo et al. (2021) explored the asymmetric relationship between oil prices and renewable energy consumption using linear and nonlinear autoregressive distributed lag (ARDL) models. The findings show a significant asymmetric effect of oil prices on renewable energy consumption, except for France and Germany. In addition, it was found that there is great heterogeneity among countries. For example, an increase in oil prices has a greater impact on renewable energy consumption in Canada, the USA, and Italy. However, the opposite effect has been observed in England and Japan.

When reviewing the literature, we notice that the jointly asymmetric relationship between oil and coal prices and REC has not been previously studied. Most prior research has focused only on the relationship between oil prices and REC. However, no study has investigated the effect of oil and coal prices on REC. This study fills this gap in the literature by investigating this relationship in the Chinese context. To this end, we used a conventional method based on the NARDL and non-conventional methods based on the SVM and KNN methods.

3 Methodological analysis

In this study, annual data from 51 Chinese observations were used. The study period was from 1970 to 2019. The variables were collected from the National Bureau of Statistics of China (Yearbook et al. 2017), the US Energy Information Administration, the Penn World Table (Feenstra et al., 2015), and the World Bank Development Indicators Database (WDI). In this study, our endogenous variable is REC (net geothermal, solar, wind, and biomass), which is measured in millions of kilowatt-hours (MkWh). The predictor variables include the price of crude oil measured in US dollars per barrel of oil, the price of Australian coal measured in US dollars per million tons, and the Gross Domestic Product per capita. Each variable is expressed in terms of the natural logarithm.

Our econometric process involves four steps. First, we test for the existence of unit roots for each variable using (ADF) and (PP) tests. Then, when the variables are proven to be different in the order of integration I(0) and I(1), we estimate Equation (4) using the ordinary least squares (OLS) method, and the length of the lag is selected according to the SIC or general-specific information criterion. Following this, we test the prevalence of cointegration between the variables using the boundary testing of Pesaran et al. (2001) and Shin et al. (2014). Given the case of cointegration, we estimate the asymmetric long-run impact of oil and coal prices on the REC using the conventional approach based on the NARDL model. For non-conventional analysis, SVM and KNN machine learning techniques were used. Finally, to check whether the results are robust, we use the Brent oil price to check the asymmetric effect of oil price fluctuations on REC.

3.1 Nonlinear ARDL

To capture the asymmetric long- and short-run influences of oil and coal prices on REC, we perform the nonlinear ARDL model suggested by Shin et al. (2014). Initially, we estimate the appropriate long-run asymmetrical equation of renewable energy consumption:

$$ lcre_{t} = \alpha_{0} + \alpha_{1} loilp_{t}^{ + } + \alpha_{2} loilp_{t}^{ - } + \alpha_{3} lcoalp_{t}^{ + } + \alpha_{4} lcoalp_{t}^{ - } + \alpha_{5} ly_{t} + \varepsilon_{t} $$

where \(lcre_{t}\) denotes the natural log of renewable energy consumption, \(\alpha = \left( {\alpha_{0} ,\alpha_{1} ,\alpha_{2} ,\alpha_{3} ,\alpha_{4} } \right)\) is a cointegration vector or a vector of long-term parameters to consider. From Eqs. (1) and (2) \(loilp_{t}^{ + }\), \(loilp_{t}^{ - }\), \(lcoalp_{t}^{ + }\) and \(lcoalp_{t}^{ - }\) are the partial sums of positive and negative changes in \(loilp_{t}\) and \(lcoalp_{t}\) (the natural logarithm of oil and coal prices):

$$ loilp_{t}^{ + } = \mathop \sum \limits_{i = 1}^{t} {\Delta }loilp_{t}^{ + } = \mathop \sum \limits_{i = 1}^{t} max\left( {{\Delta }loilp_{t} ,0} \right) $$


$$ loilp_{t}^{ - } = \mathop \sum \limits_{i = 1}^{t} {\Delta }loilp_{t}^{ - } = \mathop \sum \limits_{i = 1}^{t} min\left( {{\Delta }loilp_{t} ,0} \right) $$
$$ lcoalp_{t}^{ + } = \mathop \sum \limits_{i = 1}^{t} {\Delta }lcoalp_{t}^{ + } = \mathop \sum \limits_{i = 1}^{t} max\left( {{\Delta }lcoalp_{t} ,0} \right) $$


$$ lcoalp_{t}^{ - } = \mathop \sum \limits_{i = 1}^{t} {\Delta }lcoalp_{t}^{ - } = \mathop \sum \limits_{i = 1}^{t} min\left( {{\Delta }lcoalp_{t} ,0} \right) $$

Based on the above formulation, \({\alpha }_{1}\) and \({\alpha }_{3}\) yield the extent of the long-run relationship between positive oil price shocks and renewable energy consumption. On the contrary, \({\alpha }_{2}\) and \({\alpha }_{4}\) capture the long-run relationship between negative shocks in oil prices and renewable energy consumption.

The long-run regression model can be written in an ARDL form as:

$$ \begin{aligned} lcre_{t} & = \beta_{0} + \beta_{1} lcre_{t - 1} + \beta_{2} loilp_{t - 1}^{ + } + \beta_{3} loilp_{t - 1}^{ - } + \beta_{4} lcoalp_{t - 1}^{ + } \\ & \quad + \beta_{5} lcoalp_{t - 1}^{ - } + \beta_{6} ly_{t - 1} + \mathop \sum \limits_{i = 1}^{q} \rho_{1i} \Delta lcre_{t - 1} + \mathop \sum \limits_{i = 0}^{m} \rho_{2i} \Delta loilp_{t}^{ + } + \mathop \sum \limits_{i = 0}^{n} \rho_{3i} \Delta loilp_{t}^{ - } \\ & \quad + \mathop \sum \limits_{i = 0}^{m} \rho_{4i} \Delta lcoalp_{t}^{ + } + \mathop \sum \limits_{i = 0}^{n} \rho_{5i} \Delta lcoalp_{t}^{ - } + \mathop \sum \limits_{i = 0}^{k} \rho_{6i} \Delta ly_{t - 1} + \mu_{t} \\ \end{aligned} $$

where all variables are as defined above, p, q, m and n are lag orders.\(\beta_{0}\) and \(\beta_{1}\), represent the constant term and the lagged dependent variable parameter.\(\beta_{2}\), \(\beta_{3}\),\(\beta_{4}\) and \(\beta_{5}\) are the parameters of the partial sums of positive and negative changes in \(loilp_{t}\) and \(lcoalp_{t}\). \(\alpha_{1} = \frac{{ - \beta_{3} }}{{\beta_{1} }}\), \(\alpha_{2} = \frac{{ - \beta_{2} }}{{\beta_{1} }}\),\(\alpha_{3} = \frac{{ - \beta_{4} }}{{\beta_{1} }}\) and \(\alpha_{4} = \frac{{ - \beta_{5} }}{{\beta_{1} }}\), represent the long-run effects of positive and negative oil and coal price changes on renewable energy consumption. \( \mathop \sum \nolimits_{i = 0}^{m} \rho_{2i}\) and \( \mathop \sum \nolimits_{i = 0}^{m} \rho_{4i}\) measure the short run effect of positive oil and coal price changes on REC and \( \mathop \sum \nolimits_{i = 0}^{n} \rho_{3i}\) and \( \mathop \sum \nolimits_{i = 0}^{n} \rho_{5i}\) measure the short run effect of negative changes in oil,coal prices changes on renewable energy consumption. \( \mathop \sum \nolimits_{i = 0}^{m} \rho_{1i}\), measures the short run effect of the lagged and differenced dependent variable on REC. \(\mu_{t}\), represents the error term. By applying the NARDL approach we can capture asymmetries in the relationship between oil and coal price changes on the REC in both the long and short-run.

3.2 Support vector Machine

The support vector machine (SVM) is a supervised classification method developed by (Vapnik, 1997). It can also be used for regression by using the principle of structural risk minimization (SRM) for classification and regression. In the SVM method, it is assumed that for training data \({\{{x}_{i }, {y}_{i}\}}_{i=1}^{n}\) where \({x}_{i }\in {R}^{L}\) is a vector of L input features, \({y}_{i }\in {R}^{L}\) is the output target, and (n) is the total number of data patterns. The purpose of SVM is to find a function f(x) that forecasts the output value where the deviation is less than the insensitive loss parameter \((\varepsilon )\) from the desired output \({y}_{i}\) for all the training data. At the same time, it is as flat as possible (Smola & Schölkopf, 2004). The linear regression function in low-dimensional space is mathematically described as follows:


where x is the weight vector that is normal to the hyper-plane and b is the hyper-plane bias. The regression problem is transformed into an optimization problem as follows:

$$ \begin{aligned} & {\text{minimize}}\quad \frac{1}{2}\omega^{2} + C\sum_{i = 1}^{n} \xi i \\ & {\text{subjected}} \\ & {\text{to}}\quad \left\{ {\begin{array}{*{20}c} {y_{i} - \omega \left( {x_{i} } \right) - b \le \varepsilon + \xi_{i} } \\ {\omega \left( {x_{i} } \right) + b - y_{i} \le \varepsilon + \xi_{i}^{*} } \\ {\xi_{i} ,\xi_{i}^{*} \ge 0} \\ \end{array} } \right. \\ \end{aligned} $$

where \(\xi_{i} ,\xi_{i}^{*} \in R\) are the slack variables and C is the penalty coefficient. The Lagrange multiplier is introduced to solve the optimization problem and the regression function takes the following form:

$$ f\left( x \right) = \mathop \sum \limits_{i = 1}^{l} \left( {\alpha_{i - } \alpha_{i}^{^{\prime}} } \right)k\left( {x_{i} ,x_{i}^{^{\prime}} } \right) + b $$

where \({\alpha }_{i},{\alpha }_{i}^{\mathrm{^{\prime}}}\) represents the Lagrange multiplier, \(k\left({x}_{i},{x}_{i}^{\mathrm{^{\prime}}}\right)\) is the kernel function and the Karush Kuhn-Tucker (KKT) conditions are used to compute (b) (Kuhn & Tucker, 1951; Smola & Schölkopf, 2004).

3.3 K-nearest neighbors

The K-nearest neighbor (K-NN) algorithm is a supervised learning method. It can be used for both regression and classification purposes. To make a prediction, the K-NN algorithm does not compute a predictive model from a training set, as is the case for logistic regression or linear regression. K-NN does not need to build a predictive model. Thus, for K-NN, there is no learning phase. This is why it is sometimes categorized as lazy learning. To make a prediction, K-NN relies on the dataset to produce a result. For an observation that is not part of the dataset we want to predict, the algorithm searches for the (K) instances of the dataset closest to our observation. Then, for these (K) neighbors, the algorithm uses their output variables (y) to calculate the value of the variable (y) of the observation we want to predict. However, if the K-NN network is used for regression, the mean (or median) of the y-variables of the (K) closest observations will be used for prediction.

For a new observation X whose output variable (y) we want to predict, we compute all the distances of this observation X with the other observations of dataset D. Then, retain the K observations of dataset D closest to X by using the Euclidean distance computation function (d) such that:

$${d}_{e}(x,y)=\sqrt{\sum_{j=1}^{n} {\left({x}_{j}-{y}_{j}\right)}^{2}}$$

Finally, the predicted values are those of the y-values of the K retained observations.

4 Empirical findings

In this section, we present and discuss the results of the conventional approach based on the NARDL model and the findings of the non-conventional approach using machine learning (SVM and KNN).

4.1 Unit root tests

The unit-root test results are presented in Table 1. It can be seen from Table 1 that the null hypothesis of the unit root is not rejected for all series except oil price, which is stationary at the 5% significance level. In the first difference unit root test, all tests of the unit root reject the null hypothesis at the 1% and 5% significance levels..

Table 1 Unit root test

The unit root with structural break results displayed in Table 2 reveals that the null hypothesis of the unit root with breakpoint tests accepted the null hypothesis at the 5% significance level for coal energy consumption (lcaolp) and economic growth (ly).

Table 2 Zivot and Andrews unit root test Z&A test for level

4.2 Cointegration test

The time-series unit root tests ADF and PP confirm that all variables are integrated in mixed order I(0) –I(1), and no I(2) variables are involved. In addition, the Zivot and Andrews unit root test shows the existence of a structural break in both series lcoalp and loilp; we then construct a dummy variable, Dummy, which takes the value one for these observations and zero everywhere else. Alternatively, we conduct a cointegration test for the nonlinear specifications. The boundary test results presented in Table 3 provide robust evidence of the cointegration between the variables.

Table 3 Bounds tests for non-linear cointegration

4.3 Discussion of the ARDL and NARDL results

Because there was evidence of cointegration between the variables, we performed NARDL. The ARDL estimation results are presented in Table 4.The results of the linear model in both the short- and long-run indicate that oil and coal prices do not significantly impact REC. However, only economic growth positively affects REC in the short and long run.

Table 4 Linear model estimation results

The results indicate that the residuals are normally distributed, and the CUSUM and CUSUM of squares tests represented in Figs. 1 and 2 demonstrate the stability of the linear model. In addition, the findings of the linear model estimation in the short run indicate that a 1% increase in economic growth increases REC in China by 0.42%. However, there is no significant effect of coal and oil prices on REC. A strong reverse causality was detected. Several empirical studies report that a higher REC leads to greater economic growth. However, in this study, reverse causality was confirmed. In other words, a higher level of growth promotes the use and consumption of renewable energy. This result can be explained as follows: countries with a high level of economic growth seek the well-being of their citizens and health and nature protection. In this case, it results in switching from the use of dirty energy to clean energy. Consequently, REC increased. This result is consistent with those of Wang et al. (2022) and Chen et al. (2020).

Table 5 lists the results of the nonlinear model estimation, and from the Jarque-Bera test for error normality (J-B), there is evidence of normality in the residuals. Additionally, the LM test for serial correlation shows no autocorrelation in the residuals. Moreover, the ARCH test of autoregressive conditional heteroscedasticity shows that residuals have constant variance over time.

Table 5 Nonlinear WTI model

The short-run nonlinear model results in Table 5 indicate that a 1% increase in coal price increases REC by 19%. However, a 1% decrease in coal price decreases REC by 30%. Moreover, a 1% increase in oil price decreases REC by 6%. Likewise, a 1% decrease in the oil price decreases REC by 10%. This result supports the view that there is a substitution effect from oil to coal before moving to the use of renewable energy in China. The positive association between coal prices and REC can be explained by a substitution effect. When the oil price increases, there is a switch to the use of coal. However, when coal prices increase, firms that use this energy substitute it for other renewable sources that are less costly. Any increase in international coal prices enhances renewable energy output and investment. This result is consistent with those of Zhao et al. (2021), Brini et al. (2017), and Apergis and Payne (2014, 2015).

However, low oil prices have been reported to lead to lower gasoline and fuel prices, which reduce the competitiveness of electric vehicles. This results in an increase in renewable energy investment. For companies that use this energy, decreasing oil prices forces them to focus on other natural and renewable energy sources. Within the economic dimension, oil price crashes have negative impacts, especially in oil-based economies. The long-run estimation findings show that most coefficients are significant at the 1% and 5% significance levels and can be analyzed as elasticity estimates. In addition, the long-run skewness result shows the acceptance of the alternative long-run hypothesis, which states that the REC reacts differently to a decrease or increase in oil and coal prices. Specifically, the Wald test value is equal to 2.6689 and is statistically significant at the 10% level. The results also suggest that a 1% increase in economic growth raises REC by 28%. This implies that the share of renewable energy in the production of goods and services has grown (the share of renewable energy increased from 3% in 2017 to 18% in 2040; Newell et al. (2019)). In 2015, coal produced less than 70% of China’s electricity, 10% less than four years ago (2011). By supporting investments in more efficient and cleaner energy, China has accelerated the roll-out of renewables and set up voluntary goals to lower CO2 emissions by 58% in 2020 Agency (2016).

However, the long-term asymmetric relationship between oil prices and REC with increasing and decreasing oil prices is meaningful. The results reveal that a 1% drop in oil price decreases the REC by 15%. Thus, the positive effect outweighs the negative effect. It is widely known that industries in China are fairly addicted to oil, and their dependence on oil imports continues to expand from 67% in 2017 to 76% in 2040 (Newell et al., 2019). Furthermore, the positive change in the coal price is positive and significant. Therefore, a 1% increase in coal price increases the REC by 27%. This is driven by the steady drop in the price of new solar power installations by 26% over the past few years, according to Bloomberg New Energy Finance (Finance, 2016). This means that building new commercial renewable energy sources is becoming much cheaper than holding on to existing coal. Nevertheless, the positive change in coal prices was positive and non-significant. Faced with the challenges of pollution and energy supply, China has diversified its energy sources by increasing the share of gas and renewable energy in the energy mix. Moreover, China has implemented several incentive policies to boost the installation of solar farms and photovoltaic power generation, and the low cost of solar panels could also boost the development of solar energy. According to the thirteenth five-year plan, China has set the target of reaching 110 GW of solar power generation capacity by 2020 Agency (2016).

The CUSUM and CUSUM of squares tests plotted in Figs. 3 and 4 (see “Appendix 1”) demonstrate the stability of the model's coefficients when the estimated model is within the 5% significance line for the CUSUM test. Figures 5 and 6 (see “Appendix 1”) represent the cumulative dynamic multipliers of 1% coal and oil price increases and decreases, respectively, in REC. From the two figures, we note that an increase in coal price takes four years to impact REC and converges to the long-run coefficient of 0.2735. However, the oil price decrease converges to the long-run estimates of -0.1511 and takes about three to four years.

Graphs 5 and 6 show the impact of the dynamic multiplier of positive and negative changes in oil and coal prices. The black line in Figs. 5 and 6 captures the positive impact, whereas the black dashed line captures the negative impact of any changes in oil and coal prices. A broken red line indicates the difference between the two lines. Figure 5 shows that the coal price takes approximately three months for the multipliers to achieve a stable impact. As shown in Fig. 6, oil price takes approximately two months for the multipliers to achieve a stable impact.

Moreover, positive coal price shocks are higher than negative coal price shocks on renewable energy consumption. In fact, renewable power remains cost competitive amid the current energy crisis. Almost two-thirds of the new renewable energy installed in 2021 has a lower cost than the world’s cheapest coal option in the G20 (Van de Graaf,2021). However, negative oil price shocks have a greater effect than positive oil price shocks on renewable energy consumption. Thus, even if the energy consumed by the Chinese industry remains largely coal-based, the transportation sector remains dependent on oil and diesel (24%), and gasoline (23%) has been the largest share of petroleum products consumed since 2000.Footnote 2

4.4 Empirical findings of non-conventional approaches: the SVM and the KNN methods

This subsection describes non-conventional approaches based on SVM and KNN methods. The results of the non-conventional approaches are listed in Table 6.

Table 6 Prediction assessment of the candidate models

4.4.1 Performance analysis

In this section, we illustrate the empirical findings generated by the SVM and KNN models to examine the simultaneous impact of negative and positive oil and coal prices on renewable energy consumption. However, to determine the best-fit model between competitors’ ML tools, we referred to the performance metrics (RMSE and MAE), which are depicted in Table 6. The forecasting tool with the lowest RMSE and MAE values was selected as the best-fit model. As shown in Table 6, the linear SVM model is dominant in predicting renewable energy consumption compared to the KNN model. Empirical evidence shows that the values of the performance metrics produced by the SVM model (RMSE = 0.0239; MAE = 0.0173) are the lowest compared to those of the KNN model. Overall, the ML tool, as a complex model, outperforms the KNN model in forecasting renewable energy consumption with good accuracy.

4.4.2 Feature analysis

Now, we focus only on the features of both forecasting machine learning (ML) tools (e.g., linear SVM and KNN). The Shapley additive explanation method (SHAP) was used to explain the effect of the WTI crude oil price on renewable energy consumption. Ben Jabeur et al. (2021) inferred that the Shapley additive explanation method can be used by policymakers and investors to understand machine learning results, which are characterized by their complexity. Before discussing the feature analysis, to interpret the convergence of the residuals for both the linear SVM and KNN models, we used the DALEX R package proposed by Biecek and Burzykowski (2021). The reverse cumulative of the absolute residual from Fig. 7 indicates that there is a lower number of residuals in the left tail of the SVM residual distribution than in the KNN model. The results showed that the SVM model was more efficient than the KNN model in terms of convergence.

Fig. 1
figure 1


Figure 8 displays the width of the interval bands that correspond to variable importance, while the bars indicate the RMSE loss after permutations for the SVM and KNN models. The SVM model had the lowest RMSE with the green bar plot, compared to the KNN model with the blue bar plot. However, as shown previously, the SVM model dominates the KNN model in terms of accuracy, performance, and convergence. The feature importance generated by the SVM model is more evident in this study. Thus, we infer that the increase in coal price has a higher ability to predict renewable energy consumption than the oil price. In China, the share of coal in electricity production remains high at 49%, compared to renewable energies at 43% and oil at 1%.

Fig. 2
figure 2

CUSUM of squares test (ARDL) In Appendix 1

Footnote 3

5 Robustness check

To check the robustness of the results of the association between oil and coal prices and REC, we used the Brent oil price (lbrent) instead of WTI (loilp). The results of the Brent model are presented in Table 7.

Table 7 Nonlinear Brent model

5.1 Empirical findings using Brent oil price

Table 7 reports the robustness check estimation results in which we use the Brent instead of WTI crude oil price.

The results indicate that in the short run, a 1% increase in the Brent price significantly decreases REC by 32%. The high oil prices and high environmental costs lead to a decrease in the REC and incentivize new investments in clean energy. In this case, renewable energy could benefit from this situation. However, no decrease in Brent price has a significant effect on REC. The long-run results indicate that a 1% decrease in the Brent price significantly decreases the REC by 13%. However, no significant effect was found in terms of the impact of an increase in the Brent price on REC. Using either WTI or Brent as oil prices, we found that, in the short run, an increase in oil prices significantly decreases the REC. However, in the long run, no significant effect was found for either WTI or Brent.

With regard to the impact of coal price fluctuations, the results show that an increase in the coal price significantly increases REC by 28% in the short run and 26% in the long run. The findings also indicate that a drop in coal price decreases REC by 27% in the short run and by 18% in the long run.

6 Conclusion

This study explores the link between oil prices, coal prices, and REC in China during 1970–2019. The estimation findings of the NARDL model show that the nexus between the REC and oil and coal prices is asymmetric. In addition, the results show that an increase in the coal price and a decrease in the oil price significantly affect REC in both the short and long run. The results of the robustness check indicate that in the short run, an increase in the Brent price significantly decreases REC. However, in the long term, no significant effects were found. In contrast, any decrease in the Brent price only leads to a significant decrease in REC in the long run.

The findings of this study assert that any decrease in oil prices decreases REC. Thus, certain alternative energy-generation technologies are cost-competitive with conventional generation technologies. In contrast, an increase in coal prices increases REC in China. Coal production and consumption have decreased by 9% since 2013, and coal imports have decreased by 30% in 2015 compared to the 2014 levels, Agency (2016). The Chinese authorities have set the target of reducing the share of coal in the coal sector energy mix to 63% by 2020 and then to 55% by 2040, Agency (2016).

Despite the accelerated development of renewable energy in China, the solar and wind industries suffer from structural challenges generated by incentive policies. Subsidies strongly foster producers of renewable energy plants, but their consumption remains low. Moreover, with the multiplication of actors and an increase in competition, overproduction has sharply lowered prices. However, severe competition and saturation of domestic markets are pushing Chinese companies to conquer foreign markets. Nevertheless, Western players’ accusations of strongly dumping limit the capacity of Chinese companies to act in foreign markets.

The results of this study contribute to the existing literature and address relevant policy implications. Given that we found that an increase in the coal price increases REC for both the short and long run, while an increase in the oil price decreases the REC in the short run, some policy recommendations could be addressed based on these findings. First, policymakers in China are invited to adopt an energy strategy based on the substitution effect running from oil to coal before moving to the use of renewable energy. Although this recommendation promotes the economic dimension, it can harm environmental quality. Hence, the use of natural gas can be beneficial in terms of economic and environmental dimensions. Second, China can enhance energy conservation by tying its energy markets to the international oil price system, which may be mirrored to motivate the spontaneous use of renewable energy. In addition, renewable energy accounts for less than 20% of Chinese energy consumption (Agency 2016), and technological challenges have slowed the development of renewable energy. Third, collaboration with other countries could help China to obtain exclusive technologies developed by Western countries.Although this study has some relevant results, it encounters some limitations. For example, annual data limits the observation and detection of seasonal fluctuations that can be compensated for over time. Hence, an asymmetric effect is not observed. Second, this study is based only on oil and coal prices as fossil fuels, neglecting gas prices. For further research, we will use seasonal data and consider three indicators (oil, coal, and gas) to have a global idea of the asymmetric effect of the pricing volatility of fossil fuels on the use and consumption of renewable energy.