Introduction

Decreasing the carbon dioxide emissions at global level has become a major policy priority in the worldwide efforts to reduce climate change’s hazardous consequences. In the cooperation of environmental policies, trade-associated economic activities and foreign direct investment have no exception. The linkage amid environmental quality, economic progression, and CO2 emission is a hot debate, and this focus is highly important for many academics, officials, and various emerging economies. It is a mystifying relationship that needs attention regarding the reduction of carbon dioxide emissions in any region. Emissions also increase as the income levels grow (Wasti and Zaidi 2020). In emerging economies, growth trend has lack of adequate investment in the capital and foreign direct investment plays a vital role. It not only promotes economic growth in developing countries by funding capital but also transfers state-of-the-art production technology, management skills, and expertise to enable those countries to increase productivity, modernize their economies, and promote innovation. Foreign direct investment also generates employment and stimulates the economy and competitiveness of developing countries which have the key drivers for rapid growth (Lee 2013; Fernandes and Paunov 2012).

Climate change has been caused by the usage in recent decades of polluted energy (fossil fuels). This has affected the conditions of people and nature. Unless greenhouse gas (GHG) emissions continue to grow, more heating and long-term variations will occur to increase the temperature. There are several issues about human health and environmental quality in relation to carbon dioxide emission growth levels (Alshehry and Belloumi 2017; Apergis and Payne 2015; Jebli 2016; Dahlmann et al. 2019; Rosenzweig et al. 2020). Therefore, the question has been raised whether greenhouse gas emissions or improved environmental quality has been caused by economic growth, energy use, and foreign investments. An understanding of this relationship is expected to help establish strategies to mitigate pollution. Moreover, some authors stressed the lack of important explanatory variables in traditional EKC (environmental Kuznets curve) estimations. Energy is a key element of this partnership which is usually omitted (Bölük and Mert 2015; Dogan and Seker 2016; Charfeddine and Khediri 2016; Gill et al. 2018; Zafar et al. 2019).

Greenhouse gas emissions are, as we know, the main cause of global warming. Such emissions are used as the leading environmental dilapidation indicators, although other gas emission indicators have been used in preceding studies. In recent opinions, carbon dioxide emission is considered the leading ecological pollution indicator (Narayan et al. 2016; Stern 2017; Tiba and Omri 2017; Balsalobre-Lorente et al. 2019). One goal is to protect the atmosphere and to prevent the environment from continuously deteriorating, because governments of all countries face enormous costs in consequence to ongoing issues of environmental dilapidation. The global warming issue is currently one of the most serious problems plaguing industrialized countries, emerging countries, and developing countries, as a result to an environmentally friendly decline. A number of studies indicate that the ingestion of ozone layers is a significant cause of warming worldwide and related to carbon dioxide emissions (Alam et al. 2012; Ali et al. 2015a, b; Farhani and Ozturk 2015). Various research studies have been done to demonstrate the CO2 emission influence on energy consumption, agriculture, agricultural soils, urban agglomeration, energy importations, population growth, urbanization, human capital, sustainable development, climatic variation and forestry, natural resources, crop yield, temperature, irrigation, and income inequality (Ahmad et al. 2021a; Rehman et al. 2021a; Rehman et al. 2019; Wu et al. 2020; Ahmad et al. 2021b; Rehman et al. 2021b; Hussain and Rehman 2021; Rehman et al. 2021c; Alvarado et al. 2021a; Chishti et al. 2021; Rehman et al. 2021d; Alvarado et al. 2021b; Shindell et al. 2019; Rehman et al. 2020; Ridzuan et al. 2020), but the main objective of the current study was to examine the asymmetric effect of CO2 emission to expenditures, FDI, trade, and renewable energy consumption in Pakistan. Data ranging from 1975 to 2017 was used and the variable stationarity was proved by employing three unit root tests. The asymmetrical technique (NARDL) was utilized to explore the linkage among study variables. Furthermore, causality test of Granger was also employed to check the variable unidirectional relation.

Literature review

Greenhouse gasses produce mainly economic activities by fossil fuel combustion. The biggest cause of greenhouse gasses is the carbon dioxide and its emission, which is associated to energy usage and considered imperative to economic activities regarding industrial consumption and production (Chang and Li 2019; De Jong et al. 2017). In order to confirm sustainable economic progression, continuous improvement in environmental quality is essential. Energy usage linkage with economic growth get priorities for a nation to the detriment of the environment are one of the significant variables linked to environmental degradation. Although this has been interpreted in assessing environmental pollution determinants, most studies only connect total consumption of energy and ecological pollution to economic growth, in particular CO2 emissions which is not only clarified by energy utilization and development (Zhang 2011; Sadorsky 2014; Sak 2018; Hou et al. 2020).

A majority of emerging economies rely on strategies for foreign direct investment to support their fast-growing economies. Foreign direct investment has been encouraged by the emerging economies as a priority for growth in current spans. However, it has double inspiration on the atmosphere in the host country (Linh and Lin 2014; Zeng and Eastin 2012; Assa 2018; Saidi et al. 2018). In those countries that have fewer environmental laws, foreign direct investment is usually undertaken to reduce production costs. Manufacturing is also the source of foreign direct investment, and development thus impacts a country’s economy in the prime time. The cause of environmental destruction is growing population and its density. Increase demand for electricity, diesel, industrial goods, and transport will continue to increase with the growing population (Mahmood and Chaudhary 2012; Abdouli and Hammami 2017).

Energy is an important source of renewable fuel and technology for home cooking, energy generation, power, light, and everyday business. To accomplish its economic activities, the industry needs more energy and uses resources as a contribution for extent output. Furthermore, the objective of energy is to meet the market economy supply and demand that officialize economic activities and make export resources more competitive and productive (Ali et al. 2015a, b; Anwar 2016; Appiah 2018). The flows of foreign direct investment have gotten attention intensely and increased throughout the world, especially from the last few decades. It is generally expected to increase the accumulation of capital and productivity and thus stimulate economic growth. It is not a coincidence that many developed economies are keen to draw further attention toward the foreign direct investment. Though, the upsurge in FDI influx has resulted in a debate over its possible environmental impacts (Chandran and Tang 2013; Bakhsh et al. 2017; Bokpin 2017).

The correlation amid environmental pollution and income has been influenced by the trade and foreign direct investment. Therefore, trade liberalization and FDI are possible generators of carbon emissions to facilitate decomposition exploration. Countries participating in the trade across the borders share the distribution of technology and access to renewable energy technologies would help with foreign trade. The transition of the technology to the host country is also supported by FDI. It is advised to contribute to the physical capital stock of foreign direct investment (Gozgor 2017; Rafindadi and Ozturk 2017; Jiang et al. 2018; Shahbaz et al. 2019; Abdo et al. 2020). The carbon emissions have become a major problem in international FDI agreements and sustainable environment as developed countries continue to grow (Blanco et al. 2013; Hakimi and Hamdi 2016).

The variation in the climate and sustainable development decreased temperature in the world and climate variation has led scientists and policymakers to concentrate on the causes of CO2 emission. The importance of the environmental Kuznets curve (EKC) for the atmosphere was the subject of extensive exploration. Finally, the connection between economic growth and emissions from carbon dioxide is reversed. Economic development will create a more polluting world before hitting the maximum level of income; there will then be more increases in economic growth that will boost environmental sustainability (Baek 2015; Amri 2018; Mbarek et al. 2018; Adu and Denkyirah 2018). A negative and positive correlation is believed to be the linkage amid financial growth and energy strength. In this regard, the principal conviction is that the innovations in financial cooperation in banks, financial markets, and foreign investments have prompted an expansion of lending to allow businesses to fund energy-intense goods like cars and machinery and therefore upsurge the consumption of energy and also adversely affect the environment by the pollution caused by air and water (Chang 2015; Phong 2019; Saud and Chen 2018). Developing countries need capital to improve their industrial and economic sectors in order to boost the productivity factor.

Methodology and data sources

The major source of time series data is WDI (https://data.worldbank.org/country/PK) which varies from 1975 to 2017, and the key variables of this analysis are CO2 emission, expenditures, foreign direct investment, trade, and renewable energy consumption. Figure 1 illustrates the methodological roadmap of this study.

Fig. 1
figure 1

Methodological roadmap of the study

Econometric model

The following econometric model was established to verify the variables’ association including CO2 emission, renewable energy utilization, expenditures, foreign investment, and trade in Pakistan:

$$ {\mathrm{CO}}_2{\mathrm{e}}_{\mathrm{t}}=\mathrm{f}\left({\mathrm{RNEWC}}_{\mathrm{t}},{\mathrm{FDI}}_{\mathrm{t}},{\mathrm{EXP}}_{\mathrm{t}},{\mathrm{TR}}_{\mathrm{t}}\right) $$
(1)

We can also write Eq. (1) as:

$$ {\mathrm{CO}}_2{\mathrm{e}}_{\mathrm{t}}={\uppsi}_0+{\uppsi}_1{\mathrm{RNEWC}}_{\mathrm{t}}+{\uppsi}_2{\mathrm{FDI}}_{\mathrm{t}}+{\uppsi}_3{\mathrm{EXP}}_{\mathrm{t}}+{\uppsi}_4{\mathrm{TR}}_{\mathrm{t}}+{\upvarepsilon}_{\mathrm{t}} $$
(2)

In Eq. (2), RNEWCt indicates renewable energy consumption, FDIt shows foreign direct investment, EXPt indicates the expenditures, and TRt shows the trade. t is dimension of time, εt is the error term, and ψ14 indicates the coefficients in the model.

In Eq. (2), the dependent variable is CO2 emission, while expenditures, FDI, trade, and renewable energy consumption are the independent variables. Short- and long-run relation can be demonstrated in this study in subsequent to ARDL (autoregressive distributed lag) method introduced by Pesaran et al. (2001). The error correction representation of this methodology can be specified as:

$$ {\Delta \mathrm{CO}}_2{\mathrm{e}}_{\mathrm{t}}={\upbeta}_0+\sum \limits_{\mathrm{d}=1}^{\mathrm{p}}{\uptheta}_{\mathrm{d}}{\Delta \mathrm{CO}}_2{\mathrm{e}}_{\mathrm{t}-\mathrm{d}}+\sum \limits_{\mathrm{d}=0}^{\mathrm{P}}{\uppi}_{\mathrm{d}}{\Delta \mathrm{RNEWC}}_{\mathrm{t}-\mathrm{d}}+\sum \limits_{\mathrm{d}=0}^{\mathrm{P}}{\updelta}_{\mathrm{d}}{\Delta \mathrm{FDI}}_{\mathrm{t}-\mathrm{d}}+\sum \limits_{\mathrm{d}=0}^{\mathrm{P}}{\uplambda}_{\mathrm{d}}{\mathrm{EXP}}_{\mathrm{t}-\mathrm{d}}+\sum \limits_{\mathrm{d}=0}^{\mathrm{P}}{\uptau}_{\mathrm{d}}{\mathrm{TR}}_{\mathrm{t}-\mathrm{d}}+{\upvartheta}_1{\mathrm{CO}}_2{\mathrm{e}}_{\mathrm{t}-1}+{\upvartheta}_2{\mathrm{RNEWC}}_{\mathrm{t}-1}+{\upvartheta}_3{\mathrm{FDI}}_{\mathrm{t}-1}+{\upvartheta}_4{\mathrm{EXP}}_{\mathrm{t}-1}+{\upvartheta}_5{\mathrm{TR}}_{\mathrm{t}-1}+{\upvarepsilon}_{\mathrm{t}} $$
(3)

Equation (3) demonstrates the short- and long-run dynamics linkage among variables which is more suitable for new critical values of small samples than for most conventional reintegration processes and therefore, it has benefit. To confirm the long-term estimates, however, Pesaran et al. (2001) projected that F-test considers the common consequence among the integrated long-term variables. Once cointegration is clear, however, long-term pliability is explored by ϑ2–ϑ5 and regularized through ϑ1.

Moreover, an asymmetric technique (NARDL) can be stated through the study of Shin et al. (2014) in directive to the decomposition of renewable energy consumption and FDI with their positive (RNEWC+t; FDI+t) and negative (RNEWCt; FDIt) mechanisms which are as follows:

$$ {{\mathrm{RNEWC}}^{+}}_{\mathrm{t}}=\kern0.5em \sum \limits_{\mathrm{h}=1}^{\mathrm{t}}\Delta {{\mathrm{RNEWC}}^{+}}_{\mathrm{t}}=\kern0.5em \sum \limits_{\mathrm{h}=1}^{\mathrm{t}}\max\ \left(\Delta {{\mathrm{RNEWC}}^{+}}_{\mathrm{t}},0\right) $$
(4)
$$ {{\mathrm{RNEWC}}^{-}}_{\mathrm{t}}=\kern0.5em \sum \limits_{\mathrm{h}=1}^{\mathrm{t}}\Delta {{\mathrm{RNEWC}}^{-}}_{\mathrm{t}}=\kern0.5em \sum \limits_{\mathrm{h}=1}^{\mathrm{t}}\min\ \left(\Delta {{\mathrm{RNEWC}}^{-}}_{\mathrm{t}},0\right) $$
(5)
$$ {{\mathrm{FDI}}^{+}}_{\mathrm{t}}=\kern0.5em \sum \limits_{\mathrm{h}=1}^{\mathrm{t}}\Delta {{\mathrm{FDI}}^{+}}_{\mathrm{t}}=\kern0.5em \sum \limits_{\mathrm{h}=1}^{\mathrm{t}}\max\ \left(\Delta {{\mathrm{FDI}}^{+}}_{\mathrm{t}},0\right) $$
(6)
$$ {{\mathrm{FDI}}^{-}}_{\mathrm{t}}=\kern0.5em \sum \limits_{\mathrm{h}=1}^{\mathrm{t}}\Delta {{\mathrm{FDI}}^{-}}_{\mathrm{t}}=\kern0.5em \sum \limits_{\mathrm{h}=1}^{\mathrm{t}}\min\ \left(\Delta {{\mathrm{FDI}}^{-}}_{\mathrm{t}},0\right) $$
(7)

The specification of the NARDL model can be specified by using Eqs. (4), (5), (6), and (7) positive and negative shocks. So Eq. (3) can be written as in asymmetric model as:

$$ {\Delta \mathrm{CO}}_2{\mathrm{e}}_{\mathrm{t}}={\upbeta}_0+\sum \limits_{\mathrm{d}=1}^{\mathrm{P}}{\uptheta}_{\mathrm{d}}{\Delta \mathrm{CO}}_2{\mathrm{e}}_{\mathrm{t}-\mathrm{d}}+\sum \limits_{\mathrm{d}=0}^{\mathrm{P}}{\uppsi}_{\mathrm{d}}\Delta {{\mathrm{RNEWC}}^{+}}_{\mathrm{t}-\mathrm{d}}+\sum \limits_{\mathrm{d}=0}^{\mathrm{P}}{\uppi}_{\mathrm{d}}\Delta {{\mathrm{RNEWC}}^{-}}_{\mathrm{t}-\mathrm{d}}+\sum \limits_{\mathrm{d}=0}^{\mathrm{P}}{\updelta}_{\mathrm{d}}\Delta {{\mathrm{FDI}}^{+}}_{\mathrm{t}-\mathrm{d}}+\sum \limits_{\mathrm{d}=0}^{\mathrm{P}}{\upeta}_{\mathrm{d}}\Delta {{\mathrm{FDI}}^{-}}_{\mathrm{t}-\mathrm{d}}+\sum \limits_{\mathrm{d}=0}^{\mathrm{P}}{\uplambda}_{\mathrm{d}}{\mathrm{EXP}}_{\mathrm{t}-\mathrm{d}}+\sum \limits_{\mathrm{d}=0}^{\mathrm{P}}{\uptau}_{\mathrm{d}}{\mathrm{TR}}_{\mathrm{t}-\mathrm{d}}+{\upvartheta}_1{\mathrm{CO}}_2{\mathrm{e}}_{\mathrm{t}-1}+{\upvartheta}_2{{\mathrm{RNEWC}}^{+}}_{\mathrm{t}-1}+{\upvartheta}_3{{\mathrm{RNEWC}}^{-}}_{\mathrm{t}-1}+{\upvartheta}_4{{\mathrm{FDI}}^{+}}_{\mathrm{t}-1}+{\upvartheta}_5{{\mathrm{FDI}}^{-}}_{\mathrm{t}-1}+{\upvartheta}_6{\mathrm{EXP}}_{\mathrm{t}-1}+{\upvartheta}_7{\mathrm{TR}}_{\mathrm{t}-1}+{\upvarepsilon}_{\mathrm{t}} $$
(8)

Equation (8) demonstrates the NARDL model specification. Besides that, the dynamics of short-run asymmetries include the Wald measure, which was also used as (∑ψ2d ≠  ∑ π3d and ∑δ4d ≠  ∑ η5d) and for long-run asymmetries as (\( \raisebox{1ex}{${\upvartheta_2}^{+}$}\!\left/ \!\raisebox{-1ex}{${\upvartheta}_1$}\right. \)\( \raisebox{1ex}{${\upvartheta_3}^{-}$}\!\left/ \!\raisebox{-1ex}{${\upvartheta}_1$}\right.\mathrm{and}\kern0.5em \raisebox{1ex}{${\upvartheta_4}^{+}$}\!\left/ \!\raisebox{-1ex}{${\upvartheta}_1$}\right. \)\( \raisebox{1ex}{${\upvartheta_5}^{-}$}\!\left/ \!\raisebox{-1ex}{${\upvartheta}_1$}\right. \)). The representation of ECM (error correction model) can be as follows:

$$ {\displaystyle \begin{array}{c}{\Delta \mathrm{CO}}_2{\mathrm{e}}_{\mathrm{t}}={\mathrm{a}}_0+\sum \limits_{\mathrm{f}=1}^{\mathrm{k}}{\uptheta}_1{\Delta \mathrm{CO}}_2{\mathrm{e}}_{\mathrm{t}-1}+\sum \limits_{\mathrm{f}=0}^{\mathrm{k}}{\uptheta}_2\Delta {{\mathrm{RNEWC}}^{+}}_{\mathrm{t}-1}\\ {}\begin{array}{l}+\sum \limits_{\mathrm{f}=0}^{\mathrm{k}}{\uptheta}_3\Delta {{\mathrm{RNEWC}}^{-}}_{\mathrm{t}-1}+\sum \limits_{\mathrm{f}=0}^{\mathrm{k}}{\uptheta}_4\Delta {{\mathrm{FDI}}^{+}}_{\mathrm{t}-1}\\ {}+\sum \limits_{\mathrm{f}=0}^{\mathrm{k}}{\uptheta}_5\Delta {{\mathrm{FDI}}^{-}}_{\mathrm{t}-1}+\sum \limits_{\mathrm{f}=0}^{\mathrm{k}}{\uptheta}_6{\mathrm{EXP}}_{\mathrm{t}-1}\\ {}+\sum \limits_{\mathrm{f}=0}^{\mathrm{k}}{\uptheta}_7{\mathrm{TR}}_{\mathrm{t}-1}+{\uptheta \mathrm{ECM}}_{\mathrm{t}-1}+{\varepsilon}_{\mathrm{t}}\end{array}\end{array}} $$
(9)

The nonlinear ARDL method also estimates the asymmetrical structural multiplier effects of CO2 emission response to the RNEWC and FDI as follows:

$$ {\displaystyle \begin{array}{c}{m}_h^{+}={\sum}_{j=0}^h\frac{\partial {CO}_2{e}_{t+j}}{\partial {RNEWC}_j^{+}},\kern0.5em {m}_h^{-}={\sum}_{j=0}^h\frac{\partial {CO}_2{e}_{t+j}}{\partial {RNEWC}_j^{-}}\\ {}{m}_h^{+}={\sum}_{j=0}^h\frac{\partial {CO}_2{e}_{t+j}}{\partial {FDI}_j^{+}}\ {m}_h^{-}={\sum}_{j=0}^h\frac{\partial {CO}_2{e}_{t+j}}{\partial {FDI}_j^{-}}\ where\ h=1,2,3\dots .\\ {} And\ where\kern0.5em {m}_h^{+}\to {L}_{m{i}^{+}}\ as\ h\to \infty, \mathrm{and}\ {m}_h^{-}\to {L}_{m{i}^{-}}\end{array}} $$

The multiplier effect by estimating the unit shock of RNEWC and FDI shows a long-term balance adjustment.

Study outcomes and discussion

Descriptive and variable correlation analysis

Descriptive analysis results are reported in Table 1 with probability values. Additionally, correlations among variables are explored in Table 2. All variables including CO2 emission, expenditures, FDI, trade, and renewable energy consumption are correlated.

Table 1 Descriptive analysis
Table 2 Correlation amid variables

Variables stationarity test

The results of the augmented Dickey-Fuller (ADF) (Dickey and Fuller 1979), Phillips-Perron (P-P) (Phillips and Perron 1988), and Kwiatkowski-Phillips-Schmidt-Shin (KPSS) (Kwiatkowski et al. 1992) unit root tests are depicted in Table 3. The attribution of the NARDL method is to achieve the successful results when all simulating variables are combined in the order of zero or one. Nevertheless, if every modeling variable is set to I(2), the drawback of asymmetric techniques is that it will yield inefficient findings.

Table 3 Unit root tests results

Asymmetric bounds test to cointegration

An asymmetric technique was used to display the linkage of long-run connection amid variables and symmetry via bounds testing. Table 4 depicts the findings of the asymmetric bounds test to cointegration having F-statistic value of 7.018130 and level of significance at 10%, 5%, 2.5%, and 1% with lower and upper bound and get decision of cointegration.

Table 4 Asymmetric bounds test to cointegration consequences

Cointegration test of Johansen

The robustness among variables via long-run interferences can be determined by using the test of Johansen cointegration (Johansen and Juselius 1990) and consequences are interpreted in Table 5.

Table 5 Results of J cointegration test

Long- and short-run evidence

Table 6 reveals the short- and long-run implications.

Table 6 Short- and long-run outcomes

Table 6 illustrates the estimated short- and long-run outcomes of the NARDL technique. Focusing on the short-run estimates as Panel A demonstrates, the findings show that there is a large rise in carbon dioxide emissions due to negative energy usage shocks (RNEWC-). That suggests the carbon dioxide (CO2e) harmful effects have increased by 1.081% with a decrease of 1% in the use of renewable energy (RNEWC). The negative correlation of environmental emissions shows the optimistic shocks of green energy consumed, where 1% upsurge in the RNEWC insignificantly contracts the ration of carbon dioxide emission (CO2e) by − 0.891%.

Furthermore, the decreasing trend in foreign direct investment (FDI) tends to impede the detrimental effects of carbon dioxide emission such that level of carbon emissions falls by − 0.037% as foreign direct investment squeezes by 1%. Conversely, the increasing trend in FDI shows the direct link with pollution, implying that expansion in the amount of FDI by 1% is accountable for boosting the level of carbon dioxide emission (CO2e) by 0.040%. Additionally, we find that expenditures also create the non-eco-friendly impacts and manifest the positive association with the pollution. It indicates that the rise in the expenditure function by 1% results in polluting the environment by 1.316%. Besides, the variable of trade possesses the statistically insignificant relationship with the environmental degradation.

Do these short-run coefficients remain consistent in the long-run dynamics? Hence, we move toward the discussion of Panel B of long-run coefficients reported in Table 6. Fascinatingly, the consequences suggest the direct association between downward trend in renewable energy consumption and CO2 emission, signifying that the pollution level decreases by − 7.897% on account of 1% decrease in deployment of renewables. The upward trend in renewable energy consumption, however, demonstrates insignificantly positive effects, indicating that 1% upsurge in renewable energy consumption is accountable for 1.755% upsurge in carbon dioxide emission (CO2e). The results also disclose that positive as well as negative variations in the FDI lead to degrade the environmental quality. It means that 1% increase and decrease in the flows of foreign direct investment will intensify the ratio of CO2 emission by 0.210% and 0.339%, respectively. Moreover, it is found that the expenditures, again in the long run, soar the issue of pollution such that CO2 emission rises by 1.316% as the expenditure function enhances by 1%. Lastly, the effect of trade on CO2 emission is insignificant, as the outcome suggests. Foreign direct investment inflows are now one of developing countries’ key sources of external funding. But carbon emission and energy-intensive industries have moved from more stringent environmental inspection jurisdictions into weaker areas which lead to pollution paradises. In the challenges to achieve sustainable development targets, exports, distributes, and disseminations of foreign direct investment using polluting technology, products, and services to the developing countries have been the most critical challenge (Sarkodie and Strezov 2019; Jebli et al. 2019; Abban et al. 2020). The environmental dominance can also be assessed using FDI (foreign direct investment) influxes. There has been debate about the linkage amid FDI and environmental pollution, and pollution haven theory is the best known to endorse the foreign direct investment relationship with environmental contamination (Yang et al. 2018; Saud et al. 2019).

FDI is considered an important component for renewable energy production. The technological progress of host country companies by technology transfer and technology spill overs can have a significant influence on FDI. It is effective in providing funding and technical aid for the renewable energy industry, since the production of renewables needs a large amount of capital and technology investment. Foreign direct investment also has an imperative role to boost the economy of any emerging economy, particularly emerging economies with advanced monetary markets (Azman-Saini and Law 2010; Liu et al. 2018; Chen et al. 2019). Over the past few decades, trade liberalization and FDI inflows have accelerated rapidly worldwide, and have also become an important environmental phenomenon (Seker et al. 2015; Omri et al. 2014).

The channels that impacted the level of financial growth and consumption of energy are direct, commercial, and wealthy. The straight impact is that customers can easily find resources to buy sustainable products and increase energy demand in an efficient financial intermediary environment. The impact on the market is driven by an increasing model of financial growth that gives businesses better access to financial resources. Financial growth enables companies to obtain cheaper resources to set up a new joint undertaking to increase demand for petroleum effectively. Trusts and families have a wealth effect on established capital markets (Çoban and Topcu 2013; Burakov and Freidin 2017; Salim et al. 2017). Rebalancing concentrations of greenhouse gasses from industrial activity is a major problem for states, policymakers, and experts. In developed countries, this problem is much more severe if standards and pollution management and control mechanisms are lacking. The other key argument expressed in the outcomes is that in fact the idea of conserving energy and saving energy is not. The fact that much of Pakistan’s resources comes from fossil fuels is surprising. If no principles are utilized for energy conservation and savings, the same performance as increased pollution would be generated by the usage of more energy. That is an extraordinary chance to reach carbon neutrality and, as usual, a sustainable and optimistic economic growth–green sector revival. Access to new, fair, inexpensive, and clean energy is necessary in order to support the recovery of a green economy (Shah and Longsheng 2020; Shah 2020; Shah et al. 2021). Figure 2 clearly illustrates the short- and long-run dynamics among the study variables.

Fig. 2
figure 2

Dynamic association of variables via short- and long-run analysis

Beyond that, in the Panel C, some diagnostic tests are also used to demonstrate the robustness of the findings. The high values of R2 and Adj-R2 show the goodness of model which is fitted for the demonstration. Furthermore, the value of ECM (error correction model) is −0.129 that is substantial at 5% significance level, which implies the slow convergence to long-run equilibrium. The LM test reports that the model is crippled with the problem of autocorrelation, while the R-RESET and J-Bera tests confirm the accurate specification of and normality in the estimated model, respectively. Finally, CUSUM and CUSUMQ tests assert the constancy of coefficients in the model. Figures 3 and 4 demonstrate the multiplier graph of RNEWC+ and RNEWC and multiplier graph of FDI+ and FDI, respectively. Furthermore, Figs. 5 and 6 illustrate the CUSUM and CUSUM of square at 5% level of significance.

Fig. 3
figure 3

Graph of RNEWC+ and RNEWC

Fig. 4
figure 4

Graph of FDI+ and FDI

Fig. 5
figure 5

CUSUM graph (5% significance level)

Fig. 6
figure 6

CUSUM of squares graph (5% significance level)

Causal association

To verify the unidirectional linkage amid CO2 emission, renewable energy consumption, expenditures, foreign direct investment, and trade, the Granger causality method was used.

Table 7 results show that CO2 emission did not show the causality to renewable energy consumption, expenditures, FDI, and TR. Similarly, RNEWC did not expose the causality linkage to CO2 emission, FDI, EXP, and TR. The FDI also did not expose the causality connection to CO2 emission, RNEWC, EXP, and TR. Furthermore, EXP did not display a causality linkage to CO2 emission, RNEWC, TR, and FDI. TR also did not demonstrate a causality association to CO2 emission, RNEWC, EXP, and FDI.

Table 7 Causal association among variables

Conclusion and policy recommendations

The principal intention of this paper was to demonstrate the effect of CO2 emission on expenditures, FDI, trade, and renewable energy consumption in Pakistan. Three unit root tests were applied to demonstrate the variable stationarity. The nonlinear autoregressive distributed lag (NARDL) method was employed to verify the dynamic relation among variables with short- and long-run analysis. Furthermore, a causality test was also employed to confirm the variable unidirectional causal association between variables. Study outcomes exposed that the deleterious shocks of renewable energy utilization display a suggestively upsurge of the CO2 emissions in short-run dynamics. The constructive shock of renewable energy consumption exposes the adversative connection with the environmental pollution. Furthermore, the decreasing trend in foreign direct investment tends to impede the detrimental effects of carbon dioxide emission. Moreover, expenditures also create the non-eco-friendly impacts and manifest the constructive linkage with the CO2 emission. The variable trade possesses the statistically insignificant connection with the environmental degradation. Results also disclose that positive as well as negative variations in the FDI lead to degrade the environmental quality. Similarly, the results of long run suggest the direct association between downward trend in the renewable energy consumption and CO2 emission, signifying that pollution level decreases. The upward trend in the renewable energy consumption, however, demonstrates insignificantly positive effects. The results also reveal that positive as well as negative variations in FDI lead to degrade the pollution. The expenditures again demonstrate the issue of pollution in the long run and the trade influence on environmental pollution is also insignificant.

In order to improve the environmental policies for sustainable growth, the study pointed out the direction for a sustainable environment by reducing CO2 emissions. FDI has a key role to upsurge the economy of Pakistan and technological development. Pakistan is belonging to those countries that have lack of corporeal capital, and overseas corporations can assist to improve the performance in order to enhance capital structure. It creates the opportunity of jobs to improve the living standards of community through management skills and advanced technology, and also brings the local economy in the competition of worldwide. The amendment of Pakistan’s trade policy is aimed at attracting FDI into the country. Preferential trade taxes and reduction of tariff create a favorable place for foreigner investor in the country. Trade liberalization has accelerated economic growth, but it also causes environmental dilapidation, especially in the emerging economies. From the past few decades, the process of environmental degradation in developing countries has accelerated at an alarming rate. Due to variations in climate, Pakistan’s economy has slowed down. CO2 emission has direct linkage to climatic variations that reflect major changes in the weather conditions during a particular period.