CO2 price effects on the electricity market and greenhouse gas emissions levels: an application to the Spanish market

This research proposes an empirical method to estimate the impact on the wholesale electricity market of an increase in the price of CO2 emission allowances. The current literature in this field is mainly focused on long-term simulation analyses, while this study carries out a short-term analysis with microdata from the electricity market. A higher price of CO2 implies an increase in the electricity generation costs of polluting units and therefore an increase in the price of the electricity market. When CO2 becomes more expensive, polluting electricity generators are shifted in the hourly electricity supply curve towards less competitive positions (in favour of less polluting/cheaper units). Displaced polluting units could even be taken out of the market, which would imply a reduction in CO2 emissions. These short-term movements can be reproduced with our microdata of the day-ahead electricity market –data Provided by the Spanish Market Operator (OMIE). According to our results, increases in the carbon price of 10, 20, or 30 € per ton, respectively, cause increases of 1.8%, 4.2% and 5.3% in the electricity price (year 2018), while the negative effect on emissions is relatively small. Our analysis concludes with the estimation of an ARIMA-SARIMA model that looks for the main determinants of the variations in the hourly energy prices and the carbon emissions. The estimations show that the marginal supply technology in the electricity market is important in explaining these variations.


Introduction
Political and social concerns about climate change have become especially relevant since the end of the last century, after the signature of the Kyoto protocol in 1997 (United Nations 1997) - Bengochea and Faet (2012), for Europe, and Alizadeh et al. (2014), for Iran, offer two studies based on the Kyoto protocol. Despite all environmental measures taken, global greenhouse gas (GHG) emissions increased by more than 25% in the period 1995 to 2013 (International Energy Agency, 2016). Reducing these emissions is probably one of the greatest challenges facing world society in the present century (Stern et al. 2006). Ackerman (2012) states that the social cost of carbon is higher than that given by the US government in 2010 (21 $/tCO 2 ). According to this author, the most ambitious scenarios for eliminating carbon dioxide emissions as quickly as technologically feasible (reaching zero or negative net global emissions by the end of this century) require spending up to $150 to $500 per ton of reductions in carbon dioxide emissions by 2050.
Reducing emissions is important not only from the climate point of view, but also from that of air quality. Torkaesh et al. (2021) analyse the air quality of 22 European countries, identifying those who urgently need to implement strategies and solutions to improve it. The Paris agreement (United Nations, 2015) is a milestone in the attempt to reduce emissions and improve air quality. This agreement establishes a 40% reduction in GHG emissions in 2030 from the 1990 levels and establishes that 32% of global energy consumption comes from renewable sources. The agreement was updated in December 2019 in the European Green Deal (European Commission, 2019). This communication establishes a 55% reduction in GHG emissions by 2030 (compared to 1990 levels) and that 32% of the total energy consumption comes from renewable sources.
Inspired by the Kyoto protocol, the European Union (EU) implemented in January 2005 the first major carbon dioxide Emissions Trading System (ETS) (based on emission allowances) to reduce GHG emissions in the following years -on the weaknesses of the EU internal electricity market, see Glachan and Ruester (2014). Through a "cap and trade" system, a carbon emissions target is divided into carbon allowances of one ton of carbon dioxide equivalent, which are distributed among the companies and are marketable (Van den Bergh et al. 2013;Koch et al. 2014;Fagiani et al. 2014;Sun 2018). The EU ETS accounts for 42% of global CO 2 emissions (Da Silva et al. 2016). Note that, according to the United Nations, the global carbon market grew to 851 billion dollars in 2021, surpassing oil as the largest market in the world (Chesney 2022).
More than 80% of the world's energy has been generated using fossil fuels (International Energy Agency, 2018). As a result, electricity and heat productions represent 25% of global greenhouse gas emissions (Victor et al. 2014;Zhang et al. 2016), causing global warming and, consequently, climate change. In this context, the introduction of renewable energy in the electricity market and the improvement of energy efficiency in the industrial sector are essential to the achievement of environmental objectives; the experience of recent years shows that these elements can be viable and economic options. There are different tools available to reduce the environmental impact of electricity generation (Byrom et al. 2020), and one of them refers to ETS. Indeed, the relationship between the carbon and the electricity markets has been greatly strengthened by the ETS, because restrictions on carbon emissions have an important impact on the power generation resources and investments in new green technologies (Brink et al. 2016;Wu et al. 2018;Newbery 2019;Palmer et al. 2018;Zeng et al. 2017). With an emissions market, the contribution of the most polluting technologies can be discouraged by the cost internalization of their negative external effects. The establishment of prices for the GHG emissions makes polluting generators less profitable in the wholesale electricity markets, which will drive the most polluting and expensive companies out of the market (Byrom et al. 2020;Burtraw et al. 2003) -in our study, we analyse the effect of this cost internalization. It is important to note that most of the existing studies on the effects of changes in emissions allowances on the electricity market observe long-term effects. For example, according to Lin et al. (2019), the largest benefits of electricity market reforms in Guangdong (China), including carbon pricing, are likely to be long term. Although looking to the future is important, short-term impacts can be predicted with greater certainty and are also relevant to decision-makers. This study tries to cover this research gap by exploring the shortterm effects of changes in the carbon price (in the EU ETS) on the Spanish electricity market.
Although not the objective of this study, there are other alternatives, apart from the emission trading system, to control emissions from electricity generation (and other industries). The closest one is to establish a Pigouvian tax on emissions (Voorspools and D'haeseleer, 2006), but there are other alternatives such as tradable green certificates (Feng et al. 2018;Caron et al. 2018), certified emissions reduction (Zeng et al. 2021), production and investment tax credits (Levin et al. 2019) or feed-in tariff systems - Espinosa et al. (2018) observe that the feed-in tariff to promote renewable energies had a limited impact on the energy price and GHG emissions in the Spanish electricity market from 2002 to 2017.
The literature analyses the effect of carbon pricing on the electricity market from two main perspectives: the effect on emissions in this last market and the effect on its pricequantity equilibrium. Voorspools and D'haeseleer (2006) study the effect of a CO 2 tax on the electricity market emissions, in and among eight interconnected European areas. Their simulation model of electricity generation shows that an increase of CO 2 tax of 10 €/t causes an overall reduction in CO 2 emissions of approximately 6%. In some areas (Netherlands, Belgium, Luxembourg, and Italy) emissions will increase, while in others (France, Germany, and Spain) emissions will decrease due to redistribution of the crossborder electricity trade. Nicholson et al. (2011) point out that the selection of future technologies would be influenced by the total cost of technology substitution, including carbon pricing, which is synergistically related to the levelized cost of energy (LCOE) and the GHG emissions. Their meta-review of the energy literature shows that the technology options for replacing fossil fuels, based on reliable cost projections (linked to carbon price increases), are much more limited than is popularly perceived. This result may be debatable given the empirical literature in this field. For example, Palmer et al. (2018) find that the increase in allowance prices in the US market leads to an increase in the share of renewables, without having a significant impact on electricity prices. This is also in line with the study of Caron et al. (2018), according to these authors the penetration of renewable energies in the U.S. market is achieving a large reduction in GHG emissions at a relatively low cost. Mann et al. (2017) use three specific software based on the power plants capacity and their economic items (cost, debt, shelf life, etc.) to estimate the electricity price and production generation per technology in year 2030 when there is a change in the production cost. They found that an increase in the cost of coal plants will decrease their generation, which will be gradually replaced by gas and renewable plants. For their part, Dahlke (2019) estimates the impact of the carbon price on the electricity industry, but using a mathematical model of cost minimization in the U.S. market. This author shows that prices of 25$ and 50$/tCO 2 equivalent emissions cause emission reductions of 17% and 22% from current levels, respectively. The model captures short-run effects via operational changes at existing U.S. power plants, mostly by switching production from coal to natural gas.
Carbon pricing also affects the price and the energy exchanged in the electricity market. Cotton and Mello (2014) analyse the efficiency of Australia's Emission Trading Scheme using a long-term structural modelling technique. Applying a generalized decomposition of the forecast error variation, they find that emission prices have little effect on electricity prices in the short-term because of an increase in the efficiency of the coal plants during the study period. Sijm et al. (2012) show that 100% of the emission costs are ultimately passed on to consumers. However, in the short term, due to supply competition, suppliers offer electricity at their marginal production costs. Consumers are protected from price changes in the short run and will buy the same amount of electricity. The response of electricity demand to electricity price variations was also studied by Lijesen (2007) for the Netherlands market. He finds that the relationship between electricity demand and price is very inelastic in the short term because not all users can perceive price variations. Apergis (2018) performs a regression analysis to investigate whether carbon and electricity prices have an asymmetric relationship in the case of the New Zealand economy. Data were obtained from the Ministry of New Zealand Treasury and not directly from the electricity market. His empirical findings indicate that carbon prices have long-run asymmetric effects on electricity prices, with only positive changes in carbon prices signalling a complete pass-through.
In our view, there is little empirical literature on the shortterm performance of the wholesale electricity market using microdata from the electricity market. The literature in this field moves between short-term analyses that do not directly use market microdata and long-term simulations in which the technological substitution towards less carbon-intensive generation sources is considered. Although no one can currently doubt an emission-free (or with lower emissions) future in electricity generation, the time scales for structural changes in the electricity industry are not short, due to the significant administrative requirements for the development of new facilities and to the significant residual effective life of most of the existing facilities (about 16 years). For this reason, we undertake a short-term analysis. Taking advantage of the existence (in Spain) of open access to the data of the wholesale electricity market, we propose a comparative statics model to calculate the short-term effects of an increase in the CO 2 prices, both on the price of the electricity and on the volume of CO 2 emissions produced. Therefore, the research questions that this paper aims to address are the following: (1) How do the CO 2 price increases impact on generators' bids? (2) What would be the effects of increases in CO 2 price on the Spanish electricity market? (3) What are the main determinants of variations in hourly energy prices and carbon emissions?
The novelty of the developed method is that we use real hourly microdata obtained from the wholesale market to quantify the variations that would occur both in the hourly price of electricity and in the quantity of energy sold as a consequence of a change in the price of emission allowances. That is, for each hour of the year our microdata of energy purchase and sale bids allow us to obtain, by aggregation, the hourly market demand and supply curves. As the sales bids correspond to the marginal costs of the companies in the short term, we can simulate the effect of more expensive emission allowances on these bids and, therefore, on the market supply. We have applied this simulation to the Spanish market and we have evaluated whether these results are in line with its emission reduction objectives. We find that for each 10€/t increase of the CO 2 price, the wholesale price of electricity will be increased approximately 1 €/MWh, while the CO 2 emissions will be reduced by 57 tons. This increase in electricity prices, motivated by political decisions oriented towards environmental sustainability, will have economic consequences, since it will increase the costs of companies and reduce the disposable income of consumers, affecting the Gross Domestic Product (GDP) in the medium term -an empirical analysis of CO 2 emissions and economic growth can be found in Khoshnevis Yazdi et al. 2018).
There are two main limitations in our study, the assumption that the Spanish electricity market is very close to a market in perfect competition -as we will see, the Herfindahl-Hirschman concentration index supports this assumption-and the time horizon of the analysis. The perfect competition condition makes it impossible for agents to adopt strategic behaviours, such as offering at marginal price instead of at marginal cost. However, in the Spanish case there are some behaviours of this type. For example, it is known that manageable (storage and pumped storage) hydroelectric units make some offers not at their marginal cost, but at the marginal cost of the combined cycle technology, which is the one that normally sets the equilibrium market price. This type of behaviour could also affect the amount offered by the corresponding hydraulic unit, which however is kept constant in our comparative statics model. Unfortunately, our market data do not allow to separate manageable and non-manageable technologies (particularly in the case of hydropower), which prevents modelling such behaviours.
The second limitation is related to the time horizon of the analysis. Our results are valid in the short term; in the long term, the higher costs of the emitting technologies will make them less attractive to investors, triggering a dynamic of technological substitution towards low-or zero-emission technologies. In addition, in the long term, regulatory changes or structural changes in fuel prices (gas, coal, etc.) are more likely to occur, which would affect the supply behaviour of the different technologies in the market.
Despite these limitations, the results obtained in this study can help regulators to find a compromise solution between the price of energy and the GHG emissions from the electricity sector. We provide them with qualitative and quantitative data about how the market responds when the emission price is increased.
The rest of the article is structured as follows. In "Methodology" we develop the methodology that allows us to calculate the new market equilibrium point (starting from the original supply and demand curves) after the increase in the price of GHG emissions. "Data on the Spanish electricity market" is dedicated to the analysis of the data obtained from the daily electricity market, while "Results and time series analysis" presents the results of applying our equilibrium analysis methodology to those data. "Conclusions" contains the corresponding conclusions and some regulatory recommendations that may be useful to the agencies that control the electricity market and to the utilities that operate in the sector. Finally, Appendix A.1 and A.2 provide information on the Spanish electricity market and the emission allowances trading in Spain, respectively.

Methodology
The comparative statics methodology proposed in this study allows us to simulate the effect of a rise in the price of CO 2 emission allowances on the price of electricity. We use a static methodology because we are interested in the final effect on the electricity market equilibrium of a higher cost of CO 2 emissions, and not so much in the dynamic process of adjustment between the two equilibria of the electricity market compared (before and after the rising cost of CO 2 ). To develop this comparative statics method, we need to use variables from two closely related markets, the day-ahead electricity market and the CO 2 emissions market. In order to reproduce the day-ahead electricity market and determine its equilibrium hourly price, we need to know its demand and supply curves (for each hour of the year). These curves are obtained by adding, respectively, all the electricity purchase and sale bids in every hour. In turn, the sales bids from the polluting units will depend on their marginal costs, which are positively related to the price of CO 2 emission allowances, so that the latter variable (the price of CO 2 ) is also necessary in our analysis. The proposed methodology assumes that the wholesale electricity market is under conditions of perfect competition and that an increase in emissions costs will be transferred to the generators' short-term marginal costs in proportion to their marginal emissions.
In the specific case of the Spanish market, it currently has a market structure which can be assessed as perfect competition. In fact, there are more than 8,000 bidders reaching a Herfindahl-Hirschman concentration index (HHI) below 600 (Arcos-Vargas et al. 2020). This assumption is not trivial, since at the beginning of the liberalization process, the HHI in Spain was over 3,000. In this regard, it is important to note that the European Commission considers that competition problems are unlikely in a market with an HHI less than 2000 and in which the largest agent has a share of less than 25% (European Commission, 2014). Some regulatory authorities, as for example the U.S. Department of justice, consider a market to be highly concentrated if the HHI exceeds 2500, and moderately concentrated if the HHI is between 1500 and 2500.
In this way, it is assumed that the hourly bids provided by OMIE of each generation unit depend on their marginal variable costs (operation and maintenance, fuel costs, financial expenses, former emission cost, etc.), while the increases in CO 2 emission costs will modify the bid functions according to the specific emissions of each technology (tCO 2 /MWh). As shown in Fig. 1, the new offer price will be the real price plus the increase in the emissions costs according to the emission rate of a given technology. Clean technologies (hydraulic, wind, nuclear, etc.) will not change their supply prices, while carbon-emitting technologies will increase their cost structure. These last companies will bear an additional cost for each ton of CO 2 they emit.
According to the aforementioned and assuming the ceteris paribus condition, if we reproduce the generators' offers with a variation in the price of the CO 2 emission allowance, we will obtain a new supply curve. The curve is formed with the offers ordered according to their price, and those that satisfy the demand will be matched to arrive at an equilibrium price. If the price of the emission allowance shows a significant increase, then the new price of the emitting energies will be too high to enter among the matched offers, and these energies will be replaced by others with less or no emission factor altering the energy mix and emissions totals. See Fig. 2 for the methodology flow chart.
Our empirical methodology concludes with the estimation of two separate ARIMA/SARIMA models for the variations in electricity hourly price and CO 2 emissions, respectively, due to the increase in CO 2 price. ARIMA(p,d,q) methodology fits univariate models for time series where the error terms follow a linear autoregressive moving-average (ARMA) specification. The univariate time series regression relates the dependent variable to p delays of itself (AR(p) part) and q delays of the disturbance term (MA(q) part). Sometimes the series has to be integrated d times in order to achieve its stationarity (hence the term integrated). Moreover, when independent variables are included in the specification, such models can be called ARIMAX models. Finally, a SARIMA(P,D,Q,s) multiplicative component can be incorporated into the ARIMA model when the time series exhibit a periodic seasonal component; with this component, the dependent variable and any independent variables are lag-s seasonally differenced D times, and 1 through P seasonal lags of autoregressive terms and 1 through Q seasonal lags of moving-average terms are included in the model -on ARIMA models and all its possible extensions see, for example, Hamilton (1994), Lütkepohl (1993), andStock andWatson (2001).

Data on the Spanish electricity market
Thanks to the transparency of the Iberian Electricity Market, we can count on the availability of all the necessary information. OMIE has an electronic platform that allows the simultaneous participation of numerous agents that manage purchase and sale offers. Sellers and buyers can contract the quantities they need at transparent and public prices. Among the functions of OMIE, the publication of information to third parties stands out. This information includes the aggregate supply and demand curves of the daily and intraday markets, the offers presented by agents for each day and hour, and the final prices of the energy and its components. The data required to carry out this study will be: -The prices offered by each generator: OMIE has all the economic offers of the energy producing companies that want to sell their energy in the wholesale market and publishes them monthly for each hour of each day. -The quantities demanded by each installation: OMIE also has all the energy demands made by marketers, distributors, and large consumers in the wholesale market. These demands will be crossed with the offers to achieve the equilibrium price; the data are available and publicly accessible. -The type of fuel of each offer: as indicated above, there is an order of merit according to the type of technology by which OMIE sorts the offers before ordering by price. This is why OMIE also has the type of technology (depending on the type of fuel) of each offer received, and this information is made available. -The price of the CO 2 emission allowance: CO 2 emission allowances are a commodity, so their price is given by the interactions of supply and demand in a market made up of buyers and sellers. Current and historical prices are available to the public.
The Spanish case is particularly relevant because of its high proportion of emitting generation (mainly coal and gas). In the year of the study (2018), the share of electricity production of these two technologies amounted to 35%. Currently, due to the government's energy plans (aligned with those of the EU), this share is decreasing.
In Table 1, we show the annual emissions by technology and also the GWh generated. With these data, we can calculate an emission factor dividing the emissions of each technology by the energy generated. The energies generated by coal have the highest emission rate of 1.0 tons of CO 2 for each megawatt hour generated, more than 2.5 times that of the combined cycle.

Results and time series analysis
In this section, we apply the described methodology to the Spanish electricity market. The offers of each generator are reproduced for every hour of each day ("Market simulation") assuming increases in the CO 2 price of 10 €, 20 € and 30 €, respectively. We use real microdata for the full year 2018 (8,760 h). "Statistical model" is dedicated to the regression analysis of the output data (ARIMA/SARIMA model).

Market simulation
The increase in costs and therefore in the price required by the CO 2 emitting technologies originates a new supply curve that allows technologies with low or no emission rates to be matched and enter the energy mix. In this way, the energy supplied to the market will be "cleaner" and the amount of total emissions will be reduced. Keeping the electricity demand constant, we will obtain, for each scenario of the CO 2 price, a new list of individual electricity offers (in MWh) that, ordered from lowest to highest willingness to charge, will give us a new accumulative curve of electricity supply.
As an example, Fig. 3 shows the comparative static of a specific time of day: February 17 2018 at 11 p.m. In our simulation, we maintain the amounts of electricity offered by each generator, but increase their willingness to charge in accordance with the rise in their costs as a consequence of the increase in the CO 2 price; remember that the higher price required for the electricity supply may end up driving the company out of the market. An upward shift in the real aggregate supply curve (the green one in Fig. 3) is obtained for each scenario of an increasing cost of emissions. The price (€ per MWh) increases from 54.94 € to 57.85 € (5.3%), to 59.59 € (8.46%) and to 60.07 € (9.34%) if the price of the one-ton emission allowance is increased by 10 €, 20 € and 30 €, respectively.
The previous hourly example must be reproduced for each hour of the year 2018. Table 2 describes the average results observed for the hours of the year in which the price of electricity has increased as a consequence of the increase in the price of CO 2 . As can be seen, the price of electricity increases more than 1 €/MWh when CO 2 becomes 10 €/t more expensive, and said price increments are 2.5 and  3.14 €/MWh when the cost of CO 2 rises to 20 and 30 €/t, respectively. Likewise, the emissions are reduced by an average of 46.3 tons per hour when CO 2 becomes 10 €/t more expensive, a reduction that reaches 70.4 and 80.9 tons per hour when CO 2 becomes 20 and 30 €/t more expensive, respectively. These data determine, for example, that CO 2 emissions are reduced 355,740 tons in year 2018 (less than 1%) as a consequence of the increase of 10 €/t in the CO 2 price; a figure that amounts to 541,562.6 € (624,209 €) if the CO 2 price variation is that of 20 €/t (30 €/t).

Statistical model
The rest of this section focuses on the scenario where the price of CO 2 becomes 10 €/t more expensive. Thus, Fig. 4 crosses the monthly averages of the variations in the price of electricity and the variations in CO 2 emissions as a consequence of that increase in the price of CO 2 . The graph shows a clear seasonal component in the data, with the hottest and coldest months being the most affected by the increase in the emission cost. For example, in February, emissions drop an average of 93 tons per hour (62,884.4 tons in the whole month), while the average price variation is 1.15 €/MWh. The regression line represented in the graph allows us to propose a simple seasonal pattern within the year: each euro per MWh that the price variation increases (as a consequence of the 10 €/t increase in the CO 2 price) corresponds to a reduction of 57 tons in the CO 2 variation. Our empirical analysis concludes with the estimation of two separate ARIMA/SARIMA models for the variations in the electricity hourly price ( ΔP ) and CO 2 emissions ( ΔTn ), respectively, due to the 10 €/t increase in the CO 2 price. Although ARIMA/SARIMA models are usually used to make predictions about the endogenous variable, in this study we are more interested in the interpretation of the model parameters; we are especially interested in the estimated parameter that relates the marginal technology of the market with the endogenous variables of the model ( ΔP and ΔTn ). Our hypothesis is that the rise in generation costs caused by the rise in the price of CO 2 affects the price of electricity and the level of CO 2 emissions more significantly when the generators that set hourly prices in the electricity market are polluting.
In our data, the augmented Dickey-Fuller unit-root test allows us to accept the stationary of the two variations analysed (variations in electricity price and emissions) -the results of the tests are shown in Table 3-, while the autocorrelations and partial autocorrelations tables shown in Fig. 5 point out an autoregressive structure of order 3 to the price variation and of order 2 for the CO 2 variation. In both models, a seasonal component SARIMA(1,0,0,24) (or SARIMA(1,0,0) 24 ) has been included to take into account the effect of the hour of day.
The     where ΔP and ΔTn, respectively, represent the electricity price and CO 2 variations due to the increase in CO 2 price, Technology refers to marginal technology in every hour: {Hydraulic Generation, Hydraulic Pumping, Special Regimes (Wind and PV, mainly), Combined Cycle, or Coal}, TDV includes exogenous dummy variables to control by the time of the day, the moment of the week and the season of the year, and u t and v t are the error terms (white-noise disturbances). Table 4 shows the estimation of both models. 1 The first estimate corresponds to the model of the variation in the electricity price. The series is highly auto-correlated, that is, the price variation of the previous hour and the price variation of the same hour in the previous day have a positive influence ( 1 = 0.62 and 24 = 0.15, respectively) on the contemporaneous variation -the influence of 2nd and 3rd order lags is more discrete. These results are reasonable if we take into account that the structure of the energy supply curve between two consecutive hours or between the same hours of two consecutive days remains relatively stable. In the hours where the marginal technology is thermal (coal), the model intercept increases by 0.63 €/MWh, an expected result if we consider that thermal is the most polluting technology; the technology represented in the constant term (0.57 €/MWh) is that of hydraulic generation. The effect on the electricity price of an increase of 10 €/t in the CO 2 price is 0.57 €/MWh (the model intercept) when the marginal technology is that of hydraulic generation (the reference category in the estimate). This effect increases to 1.2 €/MWh (0.57 + 0.63) when the marginal technology, instead of hydraulic generation, is that of thermal (coal), and increases to 0.94 €/MWh (0.57 + 0.37) if the marginal technology is that of combined cycle. These results suggest that in those hours where the marginal or price-setting technology is polluting, the effect of increasing CO 2 prices is significantly greater.
Regarding the dummy temporal variables, it is observed that being in any season other than spring, being in the working week, and being at night significantly increases the price variation as a consequence of the higher cost of polluting. For example, during the morning and in the afternoon, where photovoltaic generators can operate, the effect on 1 − 1 L − 2 L 2 1 − 24 L 24 ΔTn = 1 L + 2 L 2 ΔP + Technology + TDV + v t → → ΔTn = 1 ΔTn t−1 + 2 ΔTn t−2 + 24,1 ΔTn t−24 + 1 24,1 ΔTn t−25 + 2 24,1 price variation of the higher cost of CO 2 decreases by more than 0.30 €/MWh, when comparing both times with night hours, where polluting technologies have a greater share in the supply mix. Finally, the variations in CO 2 emissions (as a consequence of the increase in the cost of CO 2 , in the previous two hours) have a negative but negligible effect on the variation in the price of electricity -the relationship between these two variables is weak because the CO 2 variations are more closely related to the energy variations than to the price variations in the market equilibrium.
Observe that the uncertainty about the estimated parameters is reflected in their standard errors and confidence intervals, which are shown in the estimation table. Standard errors (together with the estimated coefficients) allow us to create the Z-tests on the significance of the coefficients (the null hypothesis is H 0 : β = 0; Z is the test statistic and follows a N(0,1) distribution). Thus, a p-value (p = P(|Z|≥ z)) less than a certain level of significance α (P(|Z|> z ∕2 ) = α) will allow us to reject the null hypothesis that the corresponding estimated coefficient is null. The confidence levels (1α) of the estimated coefficients are expressed by stars in Table 4: one star (*) means a p-value p < α = 0.1 (i.e. the corresponding coefficient is significantly different from zero at a confidence level of 90%); two stars (**) represent a p-value p < 0.05 (confidence level of 95%); and three stars (***) represent a p-value p < 0.01 (confidence level of 99%). For its part, a confidence interval offers a range of estimates for an unknown parameter. For example, the point estimate of the coefficient corresponding to the combined cycle technology in Table 4 is worth β = 0.37, but it is also true that the unknown population β-coefficient is in the interval [0.318, 0.414] with 95% confidence.
The second estimate corresponds to the model of variations in CO 2 emissions. Again, there is autocorrelation in the model ( 1 = 0.27, 2 = 0.11, 24 = 0.05 ), although more moderate than in the case of the price model. The fact that the value of the regress and at time t is predicted from the values at times t-1, t-2 and t-24 is an expected result, since polluting technologies usually offer several hours in a row and do not alter their operation too much between two consecutive days. In the hours where the marginal technology is coal, the variation in CO 2 (as a consequence of the rising cost of CO 2 ) decreases by 195 tons. This effect drops to -39.7 tons when the marginal generator is a combined cycle station. Therefore, in the hours in which the pricesetting technology is polluting, the effect of the increase in the price of CO 2 on the reduction of emissions is greater. It must be taken into account that when marginal technology at a certain hour is polluting, it is more likely that there are more sales offers in the day-ahead market that come from polluting generators, which explains the greater effect on emissions of the increase in the price of CO 2 . Regarding the dummy temporal variables, it can be observed that being in autumn or winter contributes to reducing the variation of hourly emissions by 12 and 16.5 tons, respectively, while being in the morning or afternoon increases this variation to 15.2 and 13.9 tons, respectively; in other words, during the night the emission reduction effect is more noticeable. These results are in line with those obtained by Tan-Soo et al. (2019) for China. It should be taken into account that during the cold seasons of the year and at night, the presence of polluting technologies increases in the energy supply curve. Finally, the variations in the electricity price, as a consequence of the increase in the cost of CO 2 , in the previous two hours have a negative effect on the variation in the CO 2 emission; indeed, when the electricity market is in a dynamic of rising prices (as a consequence of the rising cost of CO 2 ), it is expected that CO 2 emissions will be reduced. For example, when the electricity price variation at hour t-1 increases by 1 €/MWh (as a consequence of the rise in CO 2 ), the market is in such a dynamic that CO 2 emissions are expected to fall by 5.88 tons at time t. Indeed, when the electricity market is in a dynamic of rising price variations (as a consequence of the rising cost of CO 2 ), it is because polluting technologies are leaving the supply curve (because they are less competitive), with the corresponding reduction in emissions that this entails.
Overall, our results reveal that an increase in the carbon price causes (in the short term) an increase in the electricity price and a reduction in the electricity production and its emission levels. This slight contraction of the electricity market would indicate that the more expensive polluting units would no longer participate in the market. Moreover, our results show that the effect of carbon pricing is more significant when the marginal technology in the electricity market pollutes. Likewise, there is seasonality in the response variables, with the CO 2 and electricity price variations being smaller during spring, variations that are negatively related. These results are, in general, in line with those observed in the literature, although it should be noted that the different contributions differ in methodologies, time horizons, and markets. In general, the different authors have studied the short-and long-term (mainly long term) effects of carbon pricing using cost-based parametric models that allow substitution between polluting and non-polluting technologies. We, on the other hand, adopt a short-term approach where all the companies in the electricity market remain but have to face (the polluters) the rising cost of carbon. We can generate this short-term scenario because we have the purchase and sale offers of all market agents for each hour of the year.

Conclusions
The objective of this research was to develop an empirical model to calculate the short-term effects of an increase in CO 2 prices both on the electricity market price and on the volume of CO 2 emissions produced in this market. There are other studies in the literature that try to measure these effects, but in general they do not adopt a pure shortterm approach and/or do not use real market microdata. We mainly address three research questions: How do CO 2 price increases impact on generators' bids? What would be the effects of CO 2 price increases on the Spanish electricity market? What are the main determinants of variations in hourly energy prices and carbon emissions?.
In this regard, a comparative statics methodology has been proposed to estimate the impact that an increase in the price of CO 2 emissions could have on the electricity supply agents and the wholesale electricity market (thus answering the first two research questions). The short-term simulation has been applied to the Spanish case for the year 2018. For that purpose, it was necessary to process the microdata of the Spanish daily electricity market (individual offers for the purchase and sale of electricity) for the 8,760 h of year 2018 and to simulate three possible new equilibriums in the electricity market linked to increments of 10 €, 20 €, and 30 € in the price of the emission allowance of one ton of CO 2 . Our results reveal that for every 10€ increase in the price of a ton of CO 2 , electricity prices will increase by approximately 1 €/MWh, while simultaneously reducing emissions and demand of the system (by around 1% for emissions and 0.5% for demand). Therefore, in order to contribute significantly to the objectives set by the Spanish government, the price of emissions would have to be increased considerably, which would have a pernicious effect on the competitiveness of companies and on the country's economic growth. In our opinion, other complementary mechanisms to reduce emissions that might have a lower social cost, such as planting forests or electrifying transport, should be explored.
The third research question is addressed by estimating a time series model. According to the ARIMA-SARIMA analyses proposed, one of the main determinants of variations in hourly energy prices and carbon emissions is the type of technology of the marginal supplier in the daily electricity market; this is, the magnitude of these variations is greater, as would be expected, in those periods (hours) in which the share of fossil fuel-based power plants is greater.
The results of this analysis can be useful both for regulators and academics, since they will provide a basis for analysing the impact of policy and regulatory decisions on the market and emissions. Further research could be extended by analysing the impact of these CO 2 price variations on GDP, social welfare, and producer and consumer surplus. Furthermore, the cost to society of reducing emissions could be studied and compared with other abatement, capture, or reduction alternatives. Another interesting topic would be to study the dynamics of technological substitution linked to the evolution of CO 2 prices. Finally, the existence of strategic behaviours in the electricity market could be modelled once the offers corresponding to manageable technologies can be identified in the market data.

Background of the Spanish electricity market
In July 2007, the Iberian Electricity Market (MIBEL) was formed as a result of the integration of the Spanish electricity system with the Portuguese. This market performs the matching using the EUPHEMIA algorithm. In turn, MIBEL is coupled with the central-north European markets and its interconnections allow energy to flow to where it is most expensive from where it is cheapest. The transmission network is operated by Red Eléctrica de España (REE) in Spain and REN in Portugal, which manages and guarantees the operation. Regarding the management of the wholesale spot market, the responsible authority is the Iberian Energy Market Operator-Spanish Pole (OMIE).
The Iberian market is made up of three market sequences: Forward market, daily or spot market, and Short-term or intraday market. As for the daily market, an hourly price is determined, i.e. there are 24 prices for each day. This market is managed by Spain through OMIE. With the data received from buyers and sellers, OMIE can generate the hourly supply and demand curves for the next day and obtain the equilibrium price. This is a marginal and perfectly competitive market, where matched producers, having offered the minimum price, will receive the same price for their offers. In Fig. 6 the monthly prices of electricity for the year 2018 are shown.
The Integrated National Energy and Climate Plan (Ministry for Ecological Transition, 2019a) for 2021-2030 establishes the milestones of a set of changes in the Spanish electricity sector, including an increase of up to 42% of the share of renewables (incorporating 30,000 MW power). In 2017, the authorization for the construction of 3,909 MW of new photovoltaic power and 1,128 MW of wind power shifted the hourly supply curve, reducing equilibrium prices (by displacing conventional technologies) and CO 2 emissions. As seen in Table 5, renewables comprise more than 40% of the energy mix in 2018.

Spain and the European emission trading scheme
As a consequence of the Kyoto protocol, the European Union implemented the first large trading system for carbon dioxide emissions and, in January 2005, introduced emission allowances (EUA). As seen in Fig. 7, a limited amount of emission permits sets the quantity of emissions, and together with the demand curve of emission allowances determine the price of emissions. The Emissions Trading System (ETS) provides an incentive for nations in the EU to reduce their emissions efficiently and is a significant pillar of EU climate policy. The total volume of emissions is capped each year, and companies within the system can trade their allowances.
The price drop in mid-2008 is due to the global financial crisis, a situation that slowly recovers in mid-2009. It falls again in 2011 due to the euro crisis, as seen in Fig. 8. The Trade Association (IETA) has conducted a study entitled "GHG Market Sentiment Survey 2019" (IETA, 2020) which analyses carbon price forecasts, concluding that they must undergo significant increases in order to be in line with the Paris Agreement objective of limiting warming to less  than 2 °C. The survey also indicates the price that would be necessary in order to be effective for the system and not to be unprofitable for the owners of the polluting plants. The global price of carbon needed to meet the Paris targets is estimated to be as high as 50 €/tCO 2 . One of the most important sectors covered in the EU ETS, the electricity industry accounts for 42% of global CO 2 emissions (Da Silva et al. 2016). In the case of Spain, in 2018, 20% of CO 2 emissions were contributed by the electric power generation sector (Ministry for Ecological Transition, 2019c), see Table 6.
According to the European Commission (2017), between 1990 and 2018, even with EU economic growth of 61%, greenhouse gases were reduced by 23%. More specifically, between 2017 and 2018 the reduction was 2%, mainly due to the better performance of the EU's power generation sectors under the ETS regime. Likewise, for this same period, after three years on the rise, a 0.9% reduction was achieved by facilities that are not under the regime; these include the activities of transportation, agriculture, waste, etc. These sectors are addressed by the "effort sharing" legislation that establishes annual objectives for most of the activities that are not considered in the ETS. The same cannot be said for the aviation sector, whose emissions have been on the rise, reaching a 19% increase between 2013 and 2018.
Regarding Spain, according to the Ministry for Ecological Transition (MITECO), in 2018 the emissions were 332.8 million tons, which means a 2.2% decrease compared to 2017. This decrease is mainly due to the increase in the production of hydro and wind energy (with growths of 84.9% and 3.5%, respectively). In the electricity generation sector, more specifically, emissions decreased by 15.7% due to the increase in these renewable sources.
In the energy sector, emissions depend on the fuel used. As shown in Table 7, coal power plants are the highest energy-emitting generating companies with 33.5 million tons of carbon dioxide emitted in 2018.