Introduction

In recent years, the threating effects of global warming—ranging from environmental damage to human health challenges—have attracted considerable attention of environmentalists and policy-makers. Paris climate conference 2015 is considered a watershed mark in the context of combating global warming through reduction in GHGs (greenhouse gas emissions) backed by a serious pledge of international community, Glasgow Summit the most recent. Scientists believe that despite determined efforts on the part of governments spread over decades, the planet will not cool down as the threshold level of temperature set at 2 °C will be missed. Furthermore, the projection that temperature will reach 30 °C by 2050 warns about impending catastrophes including natural disasters (UNFCCC 2015). Intergovernmental Panel on Climate Change (IPCC 2007) mentions that developing countries will face decrease in their GDP by 2–4% and 10% by 2040 and 2100, respectively. The common global goal agreed by nations compels developed nations to transfer energy-efficient technologies to developing countries with the objective to combat \({CO}_{2}\) emissions without compromising their economic development. The measures including environmental fund transfer from developed nations to low-income countries and transition toward renewable, sustainable, and clean energy will enable poor nations to participate in the global efforts to address environmental challenges (UNFCCC 2015).

Despite its catastrophic implications, the impacts of global warming are not uniform for all regions in the world, as few regions are more prone to these events due to many socio-economic factors including trade openness, level of development, and financial development. To protect environmental damage without compromising on increased human activity aimed at economic growth is a challenge for environmentalists and policy-makers. Energy consumption is the crucial input in the production process in modern economy (Rafiq and Salim 2009) and all the developments are in and around energy especially fossil fuel. According to an estimate, until 2025, energy consumption will grow at 1.1% and 3.2% in developed and developing countries, respectively (Asif and Muneer 2007). The contribution of fossil fuels in global energy demand is about 80–95%. This is alarming as fossil fuel consumption has huge damaging effect on the environment including air pollution, climate change, and global warming (Nejat et al. 2015). Therefore, it is mandatory to use renewable, clean, and sustainable energy sources to grow economies without compromising the ecological footprint (Saidi and Omri 2020). The share of renewable energy such as wind power, biomass, solar, hydropower, nuclear, tidal, and geothermal is increasing in total energy mix in industrialized countries due to rapid decrease in renewable energy technology costs (Bulut and Inglesi-Lotz 2019). However, developing countries are struggling to exploit renewable energy sources to meet their energy demand and hence causing massive \({CO}_{2}\) emissions which raises various concerns about global environmental conditions (WDI 2018). The continuous increase in energy demand to power economic activities in developing nations has elevated pollution levels (Zafar et al. 2020).

In the light of energy economic literature, it is argued that renewable energy can help reduce \({CO}_{2}\) emissions, ensure sustainable development, and enhance environmental quality (Bulut 2017; Swain et al. 2020) especially in developing countries (Shafiei and Salim 2014). According to Fang (2011), policy-makers expect that renewable energy can outweigh environmental challenges created by fossil fuel energy consumption and meet energy needs for economic development. Therefore, many countries have reshaped their energy policies to incentivize renewable energy through provision of investment and sectoral subsidies and other supports (Koçak and Şarkgüneşi 2017). To draw meaningful conclusions and frame suitable policies regarding renewable energy, trade openness, and financial development, we have selected the sample of low-, middle-, and high-income countries. We mention in this study that the impacts of financial development, trade openness, and renewable energy consumption on \({CO}_{2}\) emissions are different across countries. Trade openness and economic growth are strongly correlated, and we are investigating whether trade openness and environmental quality are associated in the ensemble countries. In studies of environmental quality, the major concern has been the association between environmental quality and trade openness as later may affect environment positively (Ferrantino 1997) or negatively (Khan et al. 2021). Trade openness improves economic development but at the same time pollutes environment through export and import activities (Khan et al. 2021). Poor policies in developing countries fail to increase economic growth without rise in \({CO}_{2}\) emissions. This study considers role of trade in determining \({CO}_{2}\) emissions due to increase in global human activities and changing environmental standard. We expect that the trade effects on environmental quality are not uniform across countries but vary according to development level of a country.

This study also expects that like trade openness, financial development can have impact on environmental quality. A plethora of studies record the negative impact of financial development on environmental quality (Muhammad et al. 2011) through different channels including foreign direct investment which enhances economic growth and subsequently increases energy consumption that causes global warming, reduction in financial cost because of development of the stock market that attracts new installations leading to increase in energy consumption, and consumerism based on easy and affordable loans that increase purchase of luxurious items (Ahmed et al. 2020). On the other hand, a handful of studies conclude that financial development improves environmental quality (Komal and Abbas 2015; Tamazian and Rao 2010) through the channel of increase in energy efficiency (Gokmenoglu et al. 2015). This can be attributed to the easy provision of modern technologies that are environmentally friendly. Hence, it is believed that financial development is key to sustainable environment (Boutabba 2014). The inconsistency in findings of the existing empirical literature on financial development-environmental nexus requires further examination of the potential impact of financial development on environmental sustainability.

Therefore, a thorough investigation of the literature reveals several limitations to which we want to address in this study: first, the non-existence of a consensus on the possible outcomes of renewable energy, trade openness, financial development in the context of environmental pollution. For example, the impacts of trade openness and financial development on \({CO}_{2}\) emissions might be positive as well as negative (Abbas et al. 2020; Honma 2015; Khobai and Le Roux 2017; Solarin et al. 2017). In addition to these contradictory findings, some studies reveal non-linearity/asymmetric association between the stated nexus (Ahmed et al. 2020). Second, as per our knowledge, scarce literature exists that discusses the environmental implications of financial development and trade openness (Boutabba 2014). Shah et al. (2019) investigate the impact of financial development on \({CO}_{2}\) emissions in 101 countries; however, no information is available about the possible implications of financial development in different countries in terms of their income level. Third, no empirical evidence can be found on the relationship of trade openness, financial development, and \({CO}_{2}\) emissions worldwide. Therefore, this study contributes on the several fronts: First, the study used the quintile regression in addition to panel ARDL to account for the income level in explaining trade openness-financial development-\({CO}_{2}\) emissions nexus. In this way, the roles of a variety of income-related attributes of the problem are considered which are important to understand the relationship between renewable energy, trade, financial development, and carbon emissions. The findings of the study will demonstrate the influence of renewable energy, trade, and financial development is either homogenous or heterogenous. Furthermore, D-H causality test has been conducted to determine the direction of relationship between the variables. The quantile regression with its unique characteristics can handle outliers lying across percentiles of the data series while other regression techniques estimate mean effects, which usually overestimate, underestimate, or fail to detect significant dependencies (Binder and Coad 2011). In addition, along with conditional distribution, the quantile regression help find more detailed and comprehensive relationship among the series (Zhang et al. 2015).

Second, the study targets all groups of countries, e.g., low-, middle-, and high-income countries to provide reliable insights for policy purpose as all the previous investigated relationships are either country specific (Ahmed et al. 2020) or region specific (Aruga 2019). Third, long data ensures the credibility of estimation results that are essential for effective policy framework related to renewable energy in all group of countries. This study uses data from 1960 to 2019 that is significantly larger than any other data set used in previous empirical literature on the subject as (Ahmed et al. 2020) [1996–2018: Pakistan]; (Aluko and Obalade 2020) [1985–2014: 35 SSA countries]; (Shobande and Ogbeifun 2021) [1980–2014: 24 OECD countries]; (Li et al. 2015) [1980–2010: 102 countries]; (Ye et al. 2021) [1987–2020: Malysia].

Third, country-specific studies have some constraints regarding estimation as these studies use time-series approaches (Baltagi 2008). This demands a panel data study that allows the heterogeneity across economies and increases the estimation power by combining time-series and cross-sectional data. In addition, studies conducted on panel data can potentially handle limitations associated with time-series analysis. Finally, the previous empirical literature has yielded un-conclusive findings on \({CO}_{2}\) emissions-renewable energy-trade openness-financial development nexus thus necessitating further analysis of the nexus. To our best knowledge, not a single study can be mentioned that investigates the dynamic impact of renewable energy, trade openness, and financial development on \({CO}_{2}\) emissions globally.

Literature review

The energy-environmental literature has been growing rapidly over the last few decades. Many of the studies have examined the relationship between energy consumption (renewable and non-renewable) and several environmental indicators including \({CO}_{2}\) emissions, ecological footprint, and coal consumption. No consensus can be found on the linkage between environmental degradation and energy consumption especially renewable energy consumption. The role of renewable energy consumption in the context of environmental standard has been relatively a less studied area of research. Here, we document only those studies that are directly linked to environmental quality in the context of renewable energy, trade openness, and financial development. We divide literature review into three subsections.

Renewable energy consumption and \({CO}_{2}\) emissions

Plethora of evidence is available on the linkage between renewable energy and \({CO}_{2}\) emissions. Saidi and Omri (2020) used data from 15 major renewable energy consuming economies to study the relationship between renewable energy consumption and \({CO}_{2}\) emissions. They found effective role of renewable energy consumption in mitigating the effects of \({CO}_{2}\) emissions; however, this relationship vanishes in the long run. Using data from China for the year 1980–2014, Chen et al. (2019) investigated the relationship between renewable energy and \({CO}_{2}\) emissions and reached the conclusion that bidirectional causality existed between renewable energy and \({CO}_{2}\) emissions. Using data from 144 countries for the period 1990–2017, Husnain et al. (2022) reported that renewable energy was positively associated with economic development and did not damage the environment. Qi et al. (2014) reported reduction in cumulative \({CO}_{2}\) emissions due to renewable energy installation for the period 2010–2020 in China but in each year through 2025 the increased renewable effects were offset. A modest reduction in \({CO}_{2}\) emissions was observed when only supply side in energy sector was targeted. Long et al. (2015) used data from China over the period from 1952 to 2012 to examine the nexus between energy consumption (renewable and non-renewable) and carbon emissions. Their findings revealed weak impact of renewables in reducing \({CO}_{2}\) emissions and improving economic growth; however, reduction in cool consumption significantly improved environmental standards. Using data from top 10 electricity producing sub-Saharan African countries, Inglesi-Lotz and Dogan (2018) examined the nexus between renewable energy and \({CO}_{2}\) emissions. Their finding showed the long-run association between renewable energy and \({CO}_{2}\) emissions. Bilgili et al. (2016) revisited environmental Kuznets curve hypothesis by employing data set from 17 OECD countries for the period 1977–2010. They report the negative association between renewable energy consumption and carbon emissions and conclude that global warming problem can be combat through improved renewable energy technologies. Nachrowi (2012) investigated the impact of renewable energy on \({CO}_{2}\) emissions using panel data of G-20 countries for the period 2001–2010 and reached the conclusion that renewable energy use reduced \({CO}_{2}\) emissions per capita. For the sample of European Union member countries, Shahnazi and Dehghan Shabani (2021) used data for the period 2000–2017 to examine the nexus between renewable energy and \({CO}_{2}\) emissions and concluded that renewable energy led to decrease in \({CO}_{2}\) emissions. Similar findings were also observed by Rahman and Alam (2022a) for 22 well-developed countries, Rahman and Alam (2022b) for 25 largest emerging countries and Rahman and Vu (2020) for Australia. Dong et al. (2018) also reported that both in the long run and short run, renewable energy led to reduction in \({CO}_{2}\) emissions. Zoundi (2017) used data from 25 selected African countries and concluded that use of renewable energy plummeted \({CO}_{2}\) emissions and remained an important substitute for the traditional fossil energy. However, this effect was outweighed in the short run as well as in the long run by primary energy consumption which required large-scale adoption of clean energy to outpace environmental challenges. Bölük and Mert (2015) recorded the positive impact of renewable and non-renewable energy consumption on \({CO}_{2}\) emissions in European Union countries. In Vietnam, renewable energy had no impact on \({CO}_{2}\) emissions (Al-Mulali et al. 2015).

Trade openness and \({CO}_{2}\) emissions

Trade openness expounds the level of engagement of a country with its trading partner in terms of exports and imports. Shahbaz et al. (2017) state that global economy grows because of free trade; however, this growth trend leads to environmental degradation. To enhance domestic production, countries increase exports by expanding industries that in turn pollute the environment (Jun et al. 2020). Through technological and economic growth effect, trade openness can reduce and increases \({CO}_{2}\) emissions at the same time making the efficient estimate of environmental quality difficult (Yu et al. 2019). No consensus has been developed on the environmental impact of trade openness: a strand of empirical studies state increase in pollution levels because of increase in trade openness, e.g., (Husnain et al. 2021a, b; Lin 2017; Wen and Dai 2020); however, a handful of studies conclude that environmental quality improves due to increase in trade openness based on technology effect which states adoption of cleaner practices because of technology transfer among trading economies (Ghazouani et al. 2020; Kohler 2013). Wang and Zhang (2021) noted that in low-income countries, trade openness leads to increase in pollution levels but improves environmental condition in middle- and high-income countries. Likewise, Sajeev and Kaur (2020) mention that with fewer and lax environmental regulations, trade openness increases GHG emissions in developing nations. On the other hand, negative association between environment and trade openness was observed in the case of India (Jayanthakumaran et al. 2012). Haider et al. (2022) used Canadian data from 1970 to 2020 and reported that export reduced environmental degradation by decreasing N2O emissions. In the same vein, Chen et al. (2019) recorded the negative impact of trade on carbon emissions. Using data from both developing and developed countries, Kim et al. (2019) examined the relationship between trade and \({CO}_{2}\) emissions and reported that in developed countries, trade reduced carbon emissions while in developing countries, it led to increase in \({CO}_{2}\) emissions. Haider et al. (2020) used data from developing and developed countries to estimate the impact of export on N2O emissions and found that export and environmental degradation were positively associated. Rahman et al. (2021) also identified the same results for NICs. Likewise, Husnain et al. (2021a, b) stated that many factors including trade openness deteriorated environmental quality by increasing the level of \({CO}_{2}\) emissions.

Financial development and \({CO}_{2}\) emissions

The theoretical relationship between financial development and environmental quality is backed by the so-called wealth effect, business effect, and household effect. The wealth effect states that financial development spurs economic growth which leads to more energy consumption (Acheampong 2019). Business effect channel of financial development can improve environment quality as firms may adopt environmentally friendly technologies based on their easy access to funds while it may have negative implications for the environment if firms utilize easy funds to expand their business and acquire more inputs leading to increased energy consumption and hence deterioration of the environment. Under household effect, cheap credit ensures availability of energy-consuming items which negatively affect environmental quality (Koçak and Şarkgüneşi 2017; Zhang 2011).

Many studies have explored the association between carbon emissions and financial development. This includes but not limited to Ye et al. (2021) work in which they investigated the potential environmental implications of financial development in case of Malaysia using data from 1987 to 2020. It was observed that financial development deteriorated environmental quality in the short run as well as in the long run. By employing ARDL and canonical cointegration method on data from Turkey for the period 1974–2014, Pata (2018) examined the relationship between financial development and environmental degradation. The findings of the study revealed that \({CO}_{2}\) emissions increased because of financial development. According to Shahbaz et al. (2016), financial development led to decrease in \({CO}_{2}\) emissions and hence protected the environment while Sadorsky (2010) reported that financial development affected environment negatively. Ozturk and Acaravci (2013) concluded an insignificant impact of financial development on \({CO}_{2}\) emissions. Cole et al. (2005) reported confusing findings regarding the relationship between financial development and \({CO}_{2}\) emissions.

Mesagan and Nwachukwu (2018) applied the ARDL bound testing approach on the Nigerian data for the period 1981–2016. They found no evidence of any causal relationship between financial development and environmental deprivation. Ali et al. (2019) analyzed Nigerian data from 1971 to 2010 with the help of ARDL bound testing method and concluded that financial development increased carbon emissions both in the short run and the long run. Using data from 24 OECD countries for the period 1980–2019 and applying the Arellano-Bover/Bundell Bond dynamic panel technique, Shobande and Ogbeifun (2021) stated that financial development did not deteriorate environment and increased energy consumption in the ensemble counties. In Asia Pacific region, environment degradation was negatively associated with financial development (Zaidi et al. 2019) while in 5 ASEAN countries, financial development degraded the environment (Nasir et al. 2019). In a sample of 9 Belt and Road economies, Baloch et al. (2019) reported that financial development was a cause of decline in environmental quality. Green finance in China improved environmental quality (Zhou et al. 2020) while Nguyen et al. (2020) reached the conclusion that financial development exerted negative impact on environmental quality in G20 countries. Shah et al. (2019) used data from 101 countries for the period 1995–2017 to examine the relationship between financial development and \({CO}_{2}\) emissions. Their findings revealed that financial development and carbon emissions were positively associated. However, after the inclusion of economic institutions in the model, the negative effect of financial development on environmental quality became moderate. Yao et al. (2021) studied the impact of financial development on ecological footprint of the Next-11 countries and the BRICS countries for the period 1995–2014 and concluded that there exists feedback hypothesis between financial development, energy efficiency, and ecological footprint.

The following two points lie behind motivation of this work. First, despite the existence of a few studies on the energy-environmental Kuznets curve, none of them demonstrates the role of renewable energy in mitigating carbon emissions while controlling for the effect of trade openness and financial development at international level. Second, this study scrutinizes the role of income level while testing the validity of energy-environmental Kuznets curve by dividing sample based on income level. This study bridges this gap by investigating the dynamic relationship between renewable energy, \({CO}_{2}\) emissions, trade, and financial development using data from 187 countries and employing most recent estimation techniques including the panel ARDL, the quantile regressions, and D-H causality test.

Data and methodology

The EKC framework assumes that income accelerates pollution at early stages of economic growth and improves environmental quality at higher level of development (Grossman and Krueger 1991). Researchers are putting their tremendous efforts to empirically understand and analyze the probable factors influencing \({CO}_{2}\) emissions without compromising economic growth (Bölük and Mert 2015; Dogan and Turkekul 2016; Jebli et al. 2016). Dogan and Seker (2016) additionally added financial development to further modify the basic EKC framework. The primary objective of the study is to examine the influence of renewable energy (RE), trade openness (TO), and financial development (FD) on \({CO}_{2}\) emissions in low-, middle-, and high-income countries. Domestic credit to private sector represents financial development (Bui 2020), and results in funds effective allocation (Greenwood and Jovanovic (1990) which ultimately boost the market (McKinnon 1974), thus used as a proxy to represent financial development. Ibrahim and Alagidede (2017) characterized domestic credit to have a straight edge over other monetary aggregate proxies due to its accuracy for channelization of total funds toward private sector. Logarithmic baseline model for the current study can be framed as under:

$${\mathrm{ln}CO2}_{t,ij}={f(\mathrm{ln}RE}_{t,ij}+ \mathrm{ln}{TO}_{t,ij}+\mathrm{ln}{FD}_{t,ij}+e)$$
(1)

where t represents time, i represents cross-section (country), and j represents panel (low-, middle-, and upper-income countries).\({CO}_{2}\) is carbon emissions while \(\mathrm{RE}\), \(\mathrm{TO}\), and \(\mathrm{FD}\) represent renewable energy consumption, trade openness, and financial development, respectively. We obtain country level annual data from WDI (2021) for the period of 1960 to 2019. We produce 3 panels, i.e., low-, middle-, and high-income countries grouped on the basis of GNI per capita based on World Bank criteria. Out of total 212 countries, data was missing for 25 countries. The remaining 187 countries were grouped to low- (23), middle- (102), and high-income (62) countries.

Cross-sectional dependence

Our systematic methodology begins with the testing of cross-sectional dependence (CD). Avoiding the issue of cross-sectional independence may lead us to forecasting inaccuracies (Dogan and Seker 2016). Thus, to confirm CD in each panel, this study employs panel CD test of Pesaran (2004). Breusch and Pagan (1980) propose LM test in the essence of apparently distinctive regression models applicable in case of finite N where T belongs to ∞, while Pesaran (2004) suggests an alternative advance estimator with the null of CD applicable in case of sufficiently large T and infinite N given as:

$$d=\sqrt{{~}^{2T}\!\left/ \!{~}_{N(N-1)}\right.}\left({\sum }_{i=j}^{N-1}{\sum }_{j=i+1}^{N-1}\widehat{{k}_{ij}}\right)$$
(2)

As \(\widehat{{k}_{ij}}\) represents the residual correlation (pairwise). In case of fixed values of N and T, unlike LM estimate, CD estimate of Pesaran (2004) has precisely zero mean applicable for a wide class of panels, i.e., dynamic/static, heterogeneous/homogeneous, or also for the panels with complex breaks in their variances (error) and slopes (coefficients).

Panel unit root test

In the essence of cross-sectional dependence, the first-generation tests for unit root such as Levin-Lin-Chu of Levin et al. (2002) and Im Pesaran-Shin of Im et al. (2003) fail to tackle CD (Dogan and Seker 2016). Thus, the current study employs CIPS (cross-sectionally augmented Im Pesaran-Shin) and CADF unit root tests as they are robust to both CD and heterogeneity. Both the CADF and CIPS perform the null of non-stationarity for all the cross-sections within the panel versus at least one stationary cross-section as an alternative hypothesis. The CADF estimator can be calculated from a general regression.

$${\Delta Y}_{it}={\propto }_{i}+{\beta }_{it}+{\varphi \overline{Y} }_{it}+{\vartheta \Delta \overline{Y} }_{it}+$$
(3)

where

$${\overline{Y} }_{t-1}={~}^{1}\!\left/ \!{~}_{N}\right.\sum\nolimits_{i=1}^{N}{Y}_{it-1} \mathrm\ {and}\ {\rho }_{i} \Delta {\overline{Y} }_{t-1}={~}^{1}\!\left/ \!{~}_{N}\right.\sum\nolimits_{i=1}^{N}\Delta {Y}_{it}$$
(4)

From averaging CADFi, Pesaran (2007) computed CIPS as under.

$$\mathrm{CIPS}={~}^{1}\!\left/ \!{~}_{N}\right.{\sum }_{i=1}^{N}ti$$
(5)

where the OLS ratio for \({\rho }_{i}\) is represented by \({t}_{i}\) (Herzer and Vollmer 2012).

Panel ARDL

To examine both the long- and short-run influence of renewable energy, trade and financial development on \({CO}_{2}\) emissions and avoid inappropriateness of static models, i.e., fixed, random, or pooled OLS in case of heterogeneous panels, we use PMG (pooled mean group)-based panel ARDL (auto-regressive distributed lag) model of Pesaran et al. (1999). PMG-based ARDL is a good substitute to other panel estimators such as 3SLS (3 stage least square), dynamic OLS and GMM (general method of moments) because it is a transitional estimator and takes account of averaging and pooling. Further advantage of PMG-ARDL over DOLS and OLS is that, it restraints long-term estimates to be the same while allows short-run coefficient to be heterogeneous for the cross-sections (Bildirici 2014). Empirical specification of the PMG framework is as follows:

$${\mathrm{ln }\;{CO}_{2}}_{ijt}= \sum\nolimits_{s=1}^{p}{\lambda }_{ijs}{\mathrm{ln }\;RE}_{i,j,t-s}+\sum\nolimits_{s=1}^{q}{\beta }_{ijs}{X}_{i,j,t-s}+{\mu }_{i}+{\varepsilon }_{ijt}$$
(6)

where \({CO}_{2}\) represents \({CO}_{2}\) emissions, \({\mathrm{X}}_{i,j,t-s}\) is a(K X 1) vector of independent variables consisting renewable energy consumption, trade openness, and financial development and their interactions.\({\lambda }_{ijs}\),\({\mu }_{i}\), and \({\beta }_{ijs}\) represent coefficient of the lagged dependent variable, coefficient of the explanatory variables, and the fixed effects respectively\(;i\),\(j\), and \(t\) indicate cross-sections, panels, and time, respectively, while \(\varepsilon\) is the error term.

Quantile regression

For policy analysis, employing traditional models such as OLS methods is not appropriate to reach the target implications under diverse market conditions (Kaza 2010; Koenker and Hallock 2001). The selection of quantile regression is motivated by the fact that the distribution of \({CO}_{2}\) emissions is properly confined by different quantiles (Hammoudeh et al. 2014). Panel quantile regression is preferred with its unique characteristic of dealing with outliers associated with different quantiles of the data series while other econometric frameworks focus only on the mean influence (Binder and Coad 2011). The quantile regression can study the diverse influence of explanatory variables on the entire distribution of \({CO}_{2}\) emissions. The τth conditional quantile of a response variable can be written as follows:

$${QR}_{i}\left(\left.\tau \right|{ E}_{i}\right)={x}_{i}^{m}{\lambda }_{\tau }$$
(7)

Koenker (2004) and Galvao (2011) extend Eq. (3) to capture the unperceivable heterogeneity of the panel units and apply panel quantile model as follows:

$${QR}_{i,j,t}\left(\left.\tau \right|{E}_{i,j,t}\right)= \omega {(\tau )}^{^{\prime}}{E}_{i,j,t}+{\lambda }_{ij}, i=\mathrm{1,2},\dots ,N, T=\mathrm{1,2},\dots ,N$$
(8)

where \({R}_{i,j,t}\) and \({E}_{i,j,t}\) indicate response (\({CO}_{2}\) emissions) and the explanatory factors (renewable energy, trade, and financial development) at time t for country j in panel i, \(\lambda\) representcross-sectional (country wise) unperceivable effect while \(\omega (\tau )\) represents a quantile varying vector of the probable parameters in the framework. But incompatibility of PQR (panel quantile regression) with linear methodologies makes solving Eq. 4 ambiguous. Koenker (2004) introduces penalty term, i.e., “L-1 norm” for avoidance of unobservable fixed effects in his proposed shrinkage method. The crucial importance of Koenker’s shrinkage framework is its capability to organize individual coefficients inconsistency.Footnote 1 The model after introduction of penalty term can be written as follows:

$${}_{\beta }{}^{\mathrm{min}}\sum\nolimits_{t=1}^{K}\sum\nolimits_{I=1}^{T}\sum\nolimits_{n=1}^{C}{w}_{n}{p}_{\tau n}({\mathrm{R}}_{\mathrm{i},\mathrm{j},\mathrm{t }}- \beta {E}_{i,j,t}^{T}\xi {(\tau }_{n}))+\alpha \sum\nolimits_{i,j}^{C}\left|{\beta }_{i,j}\right|$$
(9)

where i indicates the countries index “C” of panel j in time t. T represents total number of observations, K is the number of observations per τth conditional quantile,\(R\) is response variable,\(E\) is a matrix of explanatory variables, and \(p\) denotes quantile loss function. Each nth quantile is weighted by \({w}_{n}\), and (\({w}_{n}=1/n)\), \(\alpha\) is a rotating parameter to shrink the individual effect with \(\xi\) as a performance parameter.

$${QR}_{i,j,t}\left(\left.\tau \right|{E}_{i,j,t}\right)={\beta }_{1,\tau }{{CO}_{2}}_{i,j,\tau }+{\beta }_{2,\tau }{RE}_{i,j,\tau }+{\beta }_{3,\tau }{TO}_{i,j,\tau }+{\beta }_{4,\tau }{FD}_{i,j,\tau }+{\beta }_{5,\tau }{GNI}_{i,j,\tau }$$
(10)

where i, j, and t are the cross-section, panel, and time, respectively (I and t = 1… N, j = 1, 2, 3).

Dumitrescu and Hurlin panel causation

Once long run integration and the diverse influence in the observed variables is established and reported, it becomes a key interest of researchers to investigate causal relationships between the variables. Understanding of the causal linkages assists in policy-making regarding economic growth and sustainable environment (Dogan et al. 2017). Several studies rely on VECM (vector error correction model)-based Granger causality test but Dumitrescu and Hurlin (D-H) (2012) causality test is the most prominent test to examine panel causality (Bilgili et al. 2017). D-H estimate is specified for its unique characteristic of taking account of the CD (Dogan et al. 2017). Furthermore, causality estimator of Granger (1969) uses past observations of x on current observations of y for detection of causality which is unable to account for individuals in the panel (Lopez and Weber 2017). Thus, we employ D-H in order to determine direction of causality among the subject variables. D-H estimator for a given y and x can be written as follows:

$${Y}_{it}=\propto +{\sum }_{m=1}^{M}{Y}_{i}^{m}{Y}_{it-m}+ {\sum }_{m=1}^{M}{\delta }_{i}^{m}{X}_{it-m}+{\varepsilon }_{it}$$
(11)

where \(\propto\) and \(\delta\) are the constant term and coefficient of X, respectively, \(M\) is the optimal lag while \(\varepsilon\) is the error term.

Results

First, we report the test statistics and p-value based on panel CD test of Pesaran (2004) to confirm CD dependence in each panel time series (Table 1). Based on the p-values, the null of CD for all the 3 panels, i.e., low-, middle-, and high-income countries is rejected. In the essence that the observed variables have CD, one may proceed with non-homogenous panel techniques (Dogan and Seker (2016). Therefore, we use CIPS (cross-sectionally augmented Im Pesaran-Shin) unit root test as it is robust to both heterogeneity and CD.

Table 1 Cross-sectional independence

Given that the observed variables show CD, Table 2 contains cross-sectionally augmented Im Pesaran-Shinand CADF unit root test results which are equally capable to take account of both heterogeneity and CD. The results show that \({CO}_{2}\) emissions, renewable energy, trade, domestic credit, and GNI per capita are not stationary at their both levels and first difference in case of low-income countries. In case of middle- and high-income countries, all the variables are not stationary at their levels, while stationary at their first difference since the null hypothesis of stationarity is rejected with 99% confidence level. Table 2 exposes stationarity for all the series as all the subject series are integrated either of order I (0) or I (1). In other words, the integration of series in order I (0) or I (1) allows for further long-run analysis procedure (Abdul Hadi et al. 2018; Sinaga et al. 2019). Thus, the current study uses PMG-based panel ARDL to examine both the short- and long-run influence of renewable energy, trade, and domestic credit on \({CO}_{2}\) emissions of low-, middle-, and high-income countries.

Table 2 CIPS and CADF unit root

Table 3 shows that in the long run, renewable energy, financial development, and GNI reduce \({CO}_{2}\) emissions in all the sample countries. However, trade openness is positively associated with \({CO}_{2}\) emission in low- and middle-income countries while it affects \({CO}_{2}\) emissions negatively in upper-income countries. In the short run, the results are somehow mixed and differ from one group of countries to other group of countries. Overall, the findings suggest diversified influence of the subject variables on \({CO}_{2}\) emissions of low-, middle-, and high-income countries. This diversified influence of renewable energy, trade openness, and domestic credit on \({CO}_{2}\) emissions is due to their differential characteristic associated with their income levels and diversified demographics of the panels.

Table 3 Panel ARDL

In the essence of diversified results derived from the panel ARDL, we use panel quantile regression which deals with outliers associated with τth conditional quantile of the data series while the other econometric models focus only on the average influence (Binder and Coad 2011). Table 4 presents the results based on quantile regression at the τ = 25th, τ = 50th, and τ = 75th quantiles. The findings reveal that trade openness and financial development at their upper quantiles decrease while renewable energy at their all quantiles increases the level of \({CO}_{2}\) emissions in lower-income countries. In case of middle-income countries, renewable energy and trade openness at their τ = 25th and τ = 50th while financial development at their τ = 50th and τ = 75th significantly increase the level of \({CO}_{2}\) emissions. Furthermore, renewable energy and trade at their τ = 25th and financial development at their 50th and τ = 75th significantly increase while renewable energy and trade at their τ = 75th decrease the level of \({CO}_{2}\) emissions in the case of upper-income countries.

Table 4 Panel quantile regressions results

Once long and short run and different quantiles influence of the studied variables is observed, it is interesting to exploit causal relationship among the variables (Dogan et al. 2017). The existence of causal relationship facilitates policy-makers regarding economic development and sustainable environment. The results of causal direction are reported in Table 5. We have a sturdy support of bidirectional causation among renewable energy and \({CO}_{2}\) emissions of low-income countries. In case of middle-income countries, bidirectional causality is observed between \({CO}_{2}\) emissions and renewable energy, trade openness, and financial development. Furthermore, bidirectional causality of \({CO}_{2}\) emissions with trade openness and financial development is also observed in the case of upper-income countries.

Table 5 Dumitrescu and Hurlin (2012) causality results

Discussion

The findings reveal that renewable energy plays a crucial role in reducing \({CO}_{2}\) emissions in low-, middle-, and upper-income countries. This conclusion is in line with the Nachrowi (2012) who reports that due to its non-carbon chemical characteristics, renewable energy is expected to be an important substitute of fossil energy and can reduce carbon emissions substantially. Dogan and Seker (2016) show that renewable energy mitigates carbon emissions in the European Union and there is unidirectional causality running from renewable energy to carbon emissions. Karimi et al. (2021) report that increase in renewable energy significantly decreases carbon emissions in Iran. However, the findings of this study contrast with the conclusion reached by Bilgili et al. (2017) who find validity of the energy-environmental Kuznets curve regardless of income level of individual county in ensemble economies.

The trade theory put forward by Heckshers and Ohlin expect positive impact of trade openness on \({CO}_{2}\) emissions (Halicioglu 2009) because \({CO}_{2}\) emissions are stipulated by expansion of manufacturing activities due to larger open trade. Sharma (2011) observed positive association between trade openness and \({CO}_{2}\) emissions in case of 69 countries sub-paneled based on national income level, namely low-income, middle-income, and high-income. Shahbaz et al. (2017) state that global economy grows because of free trade; however, this growth trend leads to environmental degradation. Haider et al. (2022) report that export reduces environmental degradation by decreasing N2O emissions. Chen et al. (2019) recorded the negative impact of trade on carbon emissions. Kim et al. (2019) report that in developed countries, trade reduces carbon emissions while in developing countries, it leads to increase in \({CO}_{2}\) emissions. Haider et al. (2020) find that export and environmental degradation are positively associated. Husnain et al. (2021a, b) state that many factors including trade openness deteriorate environmental quality by increasing the level of \({CO}_{2}\) emissions. Using data of 33 countries selected from all parts of the world over the 1971–1991 period, Suri and Chapman (1998) find that increase in manufactured goods imports significantly reduces energy consumption in a country and hence improves environmental standard. Trade openness has dual effect as it promotes economic growth but deteriorates environmental quality. Hossain (2011) finds that trade openness causes \({CO}_{2}\) emissions in new industrialized countries during the period 1971–2007. Radmehr et al. (2021) indicate that trade openness and carbon emissions are significantly and positively associated in the European Union countries.

In contrast, Karedla et al. (2021) point out that trade openness reduces carbon emissions in the sample countries. The technology effect justifies the negative association between trade openness and carbon emissions. Therefore, developing countries should opt preferential trade policies through trade liberalization with especial focus on technological value addition. Eventually, because of trade openness, a virtuous cycle emerges that enhances economic growth through intensification of competition, encouragement of capital flows, and increase in employment opportunities. Faster and larger information flow because of expanded global trade will lead to decrease in pollution level (Karedla et al. 2021). The inconsistency of trade effects on environmental pollution may be attributed to difference in its direct and indirect effect (Dean 2002).

Financial development has been considered a solution to the environmental challenges spurred by GHGs emissions. It is argued that increase in financial development enhances economic growth which ends in increased energy use leading to degradation of environment (Zhang 2011). Shah et al. (2019) use data from 101 countries for the period 1995–2017 to examine the relationship between financial development and \({CO}_{2}\) emissions. Their findings reveal that financial development and carbon emissions are positively associated. However, after the inclusion of economic institutions in the model, the negative effect of financial development on environmental quality becomes moderate. Yao et al. (2021) study the impact of financial development on ecological footprint of the Next-11 countries and the BRICS countries for the period 1995–2014 and conclude that there exists feedback hypothesis between financial development, energy efficiency, and ecological footprint.

Conversely, through the provision of easy finance to adopt energy-efficient technology, financial development ameliorates deleterious effect of GHGs (Charfeddine and Kahia 2019). Furthermore, by improving corporate governance, financial development could increase the quality of the environment (Claessens and Feijen 2007). The seminal work of Frankel and Romer (1999) reveals that because of financial development multinational’s investment enter that are closely linked with extensive R&D activities that end up in improvement of environmental quality. The observed diversified influences of renewable energy, domestic credit, and trade on \({CO}_{2}\) emissions of countries with different income levels are consistent with Gozgor et al. (2018); Jebli et al. (2020); and Kahsai et al. (2012).

Future research can extend the scope of this study by considering foreign direct investment, urbanization, population growth, and renewable energy generation as determinants of \({CO}_{2}\) emissions. Fossil fuel prices are also crucial and should be accounted for when exploring the interplay between \({CO}_{2}\) emission and its determinants. Furthermore, different sources of renewable energy generation can also be considered to have source-specific understanding on the role of renewable energy consumption in improving environmental standard in the ensemble countries.

Conclusion and policy implication

The effectiveness of clean energy, trade openness, and financial development in environmental protection has been the subject of great debate in the energy-economics literature. The prime objective of this study is to extend this literature by providing international evidence on the role of renewable energy, trade, and financial development in the context of \({CO}_{2}\) emissions by using reliable and robust estimation methods. Applying panel ARDL and quantile regressions on data of 187 countries for the period 1960–2019, this study provides some important results and hence policy implications. The panel ARDL results show that renewable energy consumption reduces \({CO}_{2}\) emissions in the short run in low-, middle-, and high-income countries. \({CO}_{2}\) emissions plumet as countries open up for trade and expand financial services for their people. The quantile regression results verify the findings reached in the panel ARDL estimation. It shows that trade openness and financial development decrease \({CO}_{2}\) emissions at upper quantile in low-income countries. However, at all income quantiles, renewable energy increases \({CO}_{2}\) emissions in low-income countries. In the middle-income, the findings are not much different as reported in case of low-income countries. In the high-income countries, renewable energy consumption and trade openness lead to decrease in \({CO}_{2}\) emissions at all income quantiles. The D-H causality test draws a sturdy support of bi-directional causation between renewable energy and \({CO}_{2}\) emissions in low-income countries. However, bi-directional causality is observed between trade openness, financial development, and financial development in middle- and high-income countries.

Based on this analysis, some important policy implications can be drawn. First, in advanced countries, restrictions on renewable energy do not have significant effect on environmental condition. However, in low-income countries, adoption of renewable energy can significantly reduce \({CO}_{2}\) emissions. Second, low-income countries may combat rise in \({CO}_{2}\) emissions by introducing new technologies in exploiting trade potentials that are necessary to acquire resources to adopt clean energy. Third, energy policies should be framed based on the stage of development of a country, share of renewable energy in its total energy mix, and environmental condition of the country. In low-income countries, incentive base mechanism should be introduced for the production, accessibility, and consumption of the renewable energy. Public–private partnership in renewable energy market could be a viable solution as under-developed countries are resource constrained and struggle to develop clean energy infrastructure. Finally, availability and accessibility to microcredit need widespread expansion to enable people to adopt to clean sources of energy that will improve environmental standards in the country. A policy approach including emissions trading system will help mitigating \({CO}_{2}\) emissions effects over the long term. Fair and easy access to renewable, sustainable, and clean energy sources is crucial to combat \({CO}_{2}\) emissions and hence global warming problem. Governments in low-income countries should relocate subsidies from non-renewable energy sources to renewable energy by showing commitment to build power plants that encapsulate renewable energy raw materials. The research based on renewable energy development should be incentivized.