The exact contents of citations.db main_text.text for this paper — one flattened LaTeX string, title through conclusion, appendix excluded, unmodified except for removing email addresses. This is what our citation measures are computed over.
91,792 characters
Identifying Elasticities in Autocorrelated Time Series Using Causal Graphs
\maketitle
\pagestyle{fancy}
\fancyhf{}
\fancyhead[C]{ELASTICITIES WITH GRAPHS}
\fancyfoot[C]{\thepage}
\thispagestyle{empty}
\begin{abstract}
The price elasticity of demand can be estimated from observational data using instrumental variables (IV).
However, naive IV estimators may be inconsistent in settings with autocorrelated time series.
We argue that
causal
time graphs can simplify IV identification and help select consistent estimators.
To do so, we propose to first model the equilibrium condition by an unobserved confounder, deriving a directed acyclic graph (DAG) while maintaining the assumption of a simultaneous determination of prices and quantities.
We then exploit recent advances in graphical inference to derive valid IV estimators, including estimators that achieve consistency by simultaneously estimating nuisance effects.
We further argue that observing significant differences between the estimates of presumably valid estimators can help to reject false model assumptions, thereby improving our understanding of underlying economic dynamics.
We apply this approach to the German electricity market, estimating the price elasticity of demand on simulated and real-world data. The findings underscore the importance of accounting for structural autocorrelation in IV-based analysis.
\end{abstract}
\noindent \textbf{Keywords:} instrumental variables; elasticity of demand; directed acyclic graphs; simultaneous equation; structural causal model; autocorrelation; causal inference
\footnotetext[1]{Replication code available at \url{https://github.com/jscanales/elasticities_with_graphs}}
\newpage
\tableofcontents
\thispagestyle{empty}
\newpage
\setcounter{page}{1}
\section{Introduction}\label{sec:intro}
Estimating the price elasticity of demand from observational time series is a fundamental problem in econometrics.
Observable prices and quantities are determined simultaneously based on the underlying economic primitives, the demand and supply equations.
Identifying the price elasticity of demand from data, therefore, requires non-trivial methodology, such as using credible supply-shifting instrumental variables (IVs) \citep{wright_tariff_1928, tinbergen_econometric_1940, angrist_interpretation_2000}.
Even simple time dependencies in the economic relationships that cause the data to be autocorrelated, however, may make naive IV estimators inconsistent \citep[e.g.,][]{thams_identifying_2022}.
For simulated data (with known ground truth), Figure~\ref{fig:intro} shows the importance of appropriately considering time dynamics.
Here, demand structurally depends on its past, and an IV estimator that neglects these time dependencies overestimates the elasticity by up to an order of magnitude.
The figure also shows other IV estimators that are consistent despite the time dependence.
So, how do we determine the consistency of IV estimators when time series are autocorrelated?
\begin{figure}[ht!]
\centering
\includegraphics[width=0.99\linewidth]{plots/EXP_v108_punchline_plot_5_years_20_runs_21_linspace.pdf}
\caption{
The effect of time dynamics on the validity of IV estimators. The left column shows the causal full time graphs of two underlying data-generating processes;
the causal effect of interest is $P_t \to D_t$ (red edge).
Top. In Model~I, demand
is inertial as $D_t$ structurally depends on $D_{t-1}$. The blue path is unblocked if $W_t$ is used as an instrument without additional controls. The naive IV estimator is, therefore, generally biased.
The right column shows the corresponding estimates $\hat{\beta}^P$ for varying strength of structural autocorrelation in demand.
Bottom. In Model~II, the price-responsive part of demand is not autocorrelated; only the residual demand is. The orange path is now blocked given $\emptyset$ but unblocked given $D_{t-1}$: $D_{t-1}$ is a collider in the terminology of causal graphs. Here, the naive IV estimator is consistent.
The nuisance IV estimator introduced in this paper (shown in green) is valid under both models. }
\label{fig:intro}
\end{figure}
To find consistent estimators for causal effects, the statistics and computer science communities have developed a framework based on structural and graphical causal models \citep{pearl_causality_2009, spirtes_causation_2000}.
In these models, each node represents a variable, and a directed edge indicates a direct causal influence.
Assuming the Markov condition \citep{Lauritzen1996}, graphical criteria such as d-separation can be employed to determine conditional independencies \citep{Brito2002generalized,henckel_graphical_2023}.
Checking d-separation between two nodes works by assessing whether all paths between these nodes are blocked by a conditioning set and can be used to aid in the identification of valid adjustment sets or conditional instruments.
For example, an IV estimator may be inconsistent if an unblocked path exists between the instrument and the dependent variable that does not go via the endogenous variable (see Section~\ref{sec:conditionsIV} for details).
Recently, \citet{thams_identifying_2022} have extended the graphical criteria for valid conditional IV estimators to infinite causal time series graphs \citep{peters_causal_2013}, enabling the identification of valid conditional IV estimators in settings with time dependence.
To exploit the power of inference via causal time graphs for estimating the price elasticity of demand, we need to find an acyclic representation of a system at equilibrium.
In Section~\ref{sec:graphical_representation}, we do so by representing the equilibrium condition using an unobserved error term, which leads to a model with unobserved confounding. We then apply the graphical reasoning to three different demand dynamics and, based on their corresponding causal time series graphs,
argue under which circumstances the naive IV estimator fails to be consistent.
In Section~\ref{sec:consistent_estimators}, we use the graph-based criteria to derive valid conditional IV estimators for each model.
These estimators are based on two different ideas. First, blocking paths via conditioning: Here, the estimators achieve consistency by including lagged terms in the conditioning set; this approach leads to a class of estimators, which includes, for example, the lag-augmented local projection IV estimator \citep{stock_identification_2018, montiel_olea_local_2021, montiel_olea_double_2024} which is commonly used in macro-economics.
Second, estimating nuisance effects: This approach, developed by \citet{thams_identifying_2022}, simultaneously estimates effects that are not of primary interest and whose estimates are afterward disregarded.
The proposed graphical approach allows us to systematically analyze the validity of several estimators. We further argue that observing significant differences between the estimates of presumably valid estimators can help to reject false model assumptions,
thereby improving our understanding of economic dynamics.
If the researcher's assumptions encoded in the structural model are correct, two valid estimators should yield comparable results (up to finite sample errors). We argue that a statistically significant difference (i.e., non-overlapping confidence intervals) between two estimates that were considered valid ex-ante should lead the researcher to reject her model assumptions.
This may be seen as an alternative approach to model validation using the reductionist approach \citep{hendry_dynamic_1995}.
The above findings allow us to study the problem of estimating the price elasticity of demand in the electricity market using weather-derived instruments, both on simulated data (Section~\ref{sec:Simulation}) and on real-world data (Section~\ref{sec:application}).
Estimating the price elasticity of electricity demand is important to manage the transition towards a carbon-neutral economy. Weather-dependent supply by renewables replaces flexible fossil fuel-based power plants. The price of electricity becomes highly dependent on the weather and more volatile. If demand reacts to this high-frequency price signal, less (fossil fuel-based) capacity is needed as backup facilities, and, therefore, the overall system cost decreases. Hence, getting a reliable estimate for the elasticity of demand is essential for efficient and reliable system planning.
Furthermore, the application models data using high-frequency time series, increasingly available for economic studies \citep{webel_review_2022}. These data differ from classical macroeconomic time series by exhibiting high autocorrelation and seasonal correlation, making it crucial to consider dynamic effects, and allowing numerous lagged terms to be included in the conditioning set without sacrificing analytical robustness.
\paragraph*{Related literature.}
There is an ongoing discussion about whether (and if so, how) causal graphs can help to solve problems in economics.
Proponents argue that causal graphs representing structural causal models (SCMs) allow for the derivation of valid non-parametric estimators in a transparent and straightforward manner \citep{spirtes_causation_2000, pearl_causality_2009, pearl_book_2020, hunermund_causal_2023}, as exemplified by the derivation of the instrumental variable estimator by \citet{wright_tariff_1928} for the price elasticity of demand for vegetable oil via graph-based path analysis.\footnote{See \citet{cunningham_causal_2021} for a historical account of the derivation of the estimator.}
Opponents point out that their utility is limited to problems that can be expressed in terms of acyclic graphs and argue that this precludes a broad class of econometric problems represented by simultaneous equations such as textbook examples of supply and demand.
They further argue \citep[see, e.g.,][]{imbens_potential_2020} that using causal graphs does not solve problems that could not be solved using alternative frameworks such as the potential outcomes framework \citep{neyman_application_1923,holland_statistics_1986, angrist_interpretation_2000, rubin_causal_2005,angrist_mostly_2009}.
Despite the debate, graphs representing structural equations are not alien to econometrics, especially not to identification in time series. For example, \citet{tinbergen_econometric_1940} and \citet{wold_econometric_1964} have graphically represented causal dependencies between variables in economic models over time, using what they call `arrow scheme'.
Arguably, they have not been widely adopted, as they were inherently tied to what \citet{wold_econometric_1964} coined the `causal chain model', which posits that economic processes are recursive. In this context, recursive means that each variable of the system depends unidirectionally on the preceding variables in a sequential manner. The arrow schemes thus conflict with the prevailing notion that economic systems are generally in equilibrium and should be modeled using simultaneous equations \citep[see, e.g.,][]{christ_cowles_1994}, where variables are determined jointly and can influence each other simultaneously.
Our approach is different as it proposes an acyclic representation of a system at equilibrium.
Causal time graphs also speak to the literature on identifying dynamic causal effects in macroeconomic time series. Macroeconomic applications focus on estimating dynamic causal effects, known as impulse response functions at different horizons $h$, that is, the response of a (macro)economic system at time $t+h$ to a shock at time $t$. A recent and popular approach for identification is to use a local projection IV estimator \citep{jorda_betting_2015, ramey_government_2018, stock_identification_2018}, which is essentially a sequential multivariate IV regression to identify the effect of price on demand at different time horizons, i.e., of $P_t \to D_t$, $P_t \to D_{t+1}$, $\cdots$, $P_t \to D_{t+h}$.
The lag-augmented local projection IV estimator \citep{plagborg-moller_local_2021, montiel_olea_double_2024} can be represented in the CIV-notation (see estimator $\#4$ in Section~\ref{sec:CIV-estimation}). The conditional IV criteria provide a means to decide its validity: they offer a non-parametric proof in settings where local projection IV is consistent and motivate an example in which it is not (see~Section~\ref{sec:consistent_estimators}). Furthermore, the graph-based analysis provides a straightforward explanation for recent findings in this literature, such as the relevance of the lead-lag exogeneity of the instrument \citep{stock_identification_2018}, and the robustness to model misspecification \citep{plagborg-moller_local_2021, montiel_olea_double_2024}.
Hence, formulating the problem of estimating the elasticity of demand using causal time graphs allows us to use simple, graphical criteria to determine which IV-based estimators are generally consistent and to avoid biases introduced by neglecting the time dependencies.
Thus, we believe that this paper demonstrates the value of using graphs in econometrics.
\section{
Causal Representation of
Autocorrelated Equilibrium Systems
}\label{sec:graphical_representation}
This section links the economic equilibrium model of autocorrelated price and demand with structural causal models \citep{spirtes_causation_2000,pearl_causality_2009,peters_elements_2017} and (causal) graphical models \citep{Lauritzen1996, spirtes_causation_2000, pearl_causality_2009} in the context of time series data \citep[e.g.,][]{peters_causal_2022}.
We propose a formalization of the equilibrium relationship that models the system of simultaneous equations as a system with time-instantaneous hidden confounding between price and demand.
It serves both as an observational model and as an interventional model \citep{peters_causal_2016} considering interventions on the instrument (here wind) and price but not on demand. The formalization allows for a straightforward representation as a marginalized graph without cycles, a directed acyclic graph (DAG).
Section~\ref{sec:demand_autocorrelated} introduces the general procedure by applying it to a model that postulates that demand is generated by an autoregressive process in which the current demand structurally depends on current prices and the immediate past of demand, i.e., demand features a direct structural autocorrelation (see Equation~\eqref{eq:demand_autocorrelated}). In Section~\ref{sec:demand_alternatives} we introduce two alternative models with different assumptions on the intertemporal structural relations.
Each model generates a time series of autocorrelated demand (see the simulations in Section~\ref{sec:Simulation}), but they have different implications for the validity of conditional instrumental variable estimators (see Section~\ref{sec:CIV-estimation}).
While we do not claim that these three models are an exhaustive representation of possible demand structures \citep[see][chapter 7
]{hendry_dynamic_1995}, each of them builds on plausible assumptions (see, for example, the discussion on electricity markets in Section~\ref{sec:application}).
\subsection{Equilibrium System with Inertial Demand (Model~I)}\label{sec:demand_autocorrelated}
We first model demand as a structural equation, where current demand $D_t$ depends structurally on the price $P_t$, past demand $D_{t-1}$
(we refer to this dependence as
\emph{direct structural autocorrelation}
or simply
\emph{structural autocorrelation}),
and an i.i.d.\
error term $U_t^D$.
Assuming linearity, the demand equation then reads
\begin{equation}\label{eq:demand_autocorrelated}
\textit{Model~I:} \qquad D_t \coloneqq D_0 + \beta^P P_t + \beta^{D1} D_{t-1} + U^D_t.
\end{equation}
Here, $\beta^P$ is the slope of the demand equation and the causal (or structural) parameter of interest.
Similarly, for all $t \in \mathbb{Z}$ we assume for supply $S_t$:
\begin{equation}\label{eq:supply}
S_t \coloneqq S_0 +\gamma^P P_{t} + \gamma^W W_t + U^S_t,
\end{equation}
where $W_t$ is exogenous, $U_t^S$ is an i.i.d.\ error term, and $\gamma^P$ is the slope of the supply equation. The structural equation of $W_t$ does not depend on $P_t$ and is independent of $U_t^S$ and $U_t^D$.
At equilibrium, demand equals supply, and the equilibrium price clears the market.
This yields a structural constraint, the equilibrium condition for $P_t$:
for all $t$ we have
\begin{equation}\label{eq:equilibrium}
S_t = D_t.
\end{equation}
The demand and supply equations~\eqref{eq:demand_autocorrelated} and \eqref{eq:supply} are structural in $(P_t, D_{t-1})$ and $(P_t,W_t)$, respectively, in that they hold under interventions on these variables.
Using the notation of potential outcomes \citep{neyman_application_1923,rubin_causal_2005, imbens_causal_2015, hernan_causal_2020} we can equivalently write them in the form $D_t(p) \coloneqq D_0 + \beta^P p + \beta^{D1} D_{t-1} + U^D_t$ and
$S_t(p,w) \coloneqq S_0 +\gamma^P p + \gamma^W w + U^S_t$,
where for fixed realisations of $U^S_t$ and $U^D_t$, the quantities $D_t (p)$ and $S_t (p,w)$ denote the potential outcomes of demand and supply at time $t$ for $p$ and $p$ and $w$, respectively.
From the structural equations for demand~\eqref{eq:demand_autocorrelated} and supply~\eqref{eq:supply}, and the equilibrium constraint~\eqref{eq:equilibrium} we get the following expression for prices at equilibrium:
\begin{equation}\label{eq:price_autocorrelated}
\textit{Model~I:} \qquad P_t =
\frac{S_0-D_0}{\beta^P - \gamma^P}+
\frac{\gamma^W}{\beta^P- \gamma^P}W_t -
\frac{\beta^{D1} }{\beta^P - \gamma^P}D_{t-1} +
\frac{U^S_t - U^D_t}{\beta^P- \gamma^P},
\end{equation}
where we assume that $\beta^P-\gamma^P \neq 0$,
a prerequisite of market clearing.
To construct estimators for $\beta^P$, we exploit that the equations for demand and price, together with
the equations for $W_t$ and $U_t^D$
form a
structural causal model (SCM) \citep{pearl_causality_2009, bongers_foundations_2021} or, more precisely, an
adaption of an SCM
which allows for time series models \citep{peters_causal_2013, peters_causal_2022}.
(As an SCM, the system then allows for a graphical representation,
with respect to which the distribution satisfies the Markov condition \citep{pearl_causality_2009, Lauritzen1990}.)
In short, here, an SCM is a set of structural equations
$X^j_t \coloneqq f^j(\mathrm{PA}(j,t), \epsilon^j_t))$, $j \in \{1, \ldots, d\}$,
where $\mathrm{PA}(j,t)$ are the parents of $X^j_t$ and
$\epsilon^j_t$, $t \in \mathbb{Z}, j \in \{1, \ldots, d\}$, are jointly independent random error variables.
In the example of Model~I, when choosing $D_t$ to be $X^1_t$,
we have $\mathrm{PA}(1,t) = (P_t, D_{t-1}, U^D_t)$ and,
when choosing $P_t$ to be $X^2_t$,
we get $\mathrm{PA}(2,t) = (W_t, U^D_t, D_{t-1})$.
We provide a formal mathematical introduction to structural causal models for time series in Appendix~\ref{sec:appendix_scm}.
The SCM models the observed distribution and intervention distributions, where we intervene on $W_t$ and $P_t$;
interventions on $D_t$ are not modelled even though $D_{t-1}$ appears in the price Equation~\eqref{eq:price_autocorrelated}
-- the reason is that we have used~\eqref{eq:demand_autocorrelated} in deriving~\eqref{eq:price_autocorrelated}.\footnote{For example,
if we were to
consider an intervention on $D_t$
and set it to $x$, we would
obtain
the price equation
$P_t = (x-S_0 - \gamma^W W_t - U_t^S)/\gamma^P$.
}
In this sense, the price equation is not structural in $D_{t}$.
Thus, here, we use SCMs to construct consistent estimators and not to model all causal relationships.
Using an SCM to model interventions on some but not all variables
is similar in spirit to the decision-theoretic framework by
\citet{Dawid2021}.
Importantly, as a result of the equilibrium constraint,
the variable $U_t^D$ appears in both the demand and price equations,
yielding a confounder between price and demand.
Since $U_t^D$ is unobserved in practice, we have thus transformed a system of equilibrium relationships into a system with a hidden confounder $U_t^D$ between $P_t$ and $D_t$.
We now represent the structure of the SCM as a directed acyclic graph (DAG) $\mathcal{G}$; each variable in the SCM corresponds to a vertex in the graph, and vertices in the graph are connected by directed edges.
More precisely, we connect two nodes $u$ and $v$ by a directed edge from $u$ to $v$ if $u$ is a causal parent of $v$.
When we construct a graph of a time series, we obtain a full time graph $\mathcal{G}_{FT}$.\footnote{ Appendix~\ref{sec:appendix_graphs} formally introduces directed acyclic graphs for time series.}
Connecting the different steps above,
the structural causal model defined by the equations~\eqref{eq:demand_autocorrelated}--\eqref{eq:price_autocorrelated} and $W_t = \beta^W W_{t-1} + U_t^W$
induces the marginalized\footnote{To simplify visualization, the marginalized DAG omits unobserved variables. Figure~\ref{fig:DAG_without_time} in Appendix~\ref{sec:marginalization} shows the non-marginalized graph without any dependencies in time.
With respect to the operations we perform in this work,
both versions of the graphs are equivalent; see also \citet{richardson2003markov}.} DAG shown in Figure~\ref{fig:DAG_autocorrelated}.
\begin{figure}
\centering
\includegraphics[width=0.45\linewidth]{plots/EXP_v108_figure_2_main_model.pdf}
\caption{
(Marginalized) graphical representation of Model~I representing an inertial demand equation given by the structural equations~\eqref{eq:demand_autocorrelated} and~\eqref{eq:price_autocorrelated}. The causal effect of interest is highlighted in red: the effect of price on demand $P_t \to D_t$. The equilibrium constraint that supply equals demand results in bidirected edges $P_t \leftrightarrow D_t$. The blue path highlights why a naive~IV estimator using $W_t$ as an instrument generally fails to estimate the magnitude of $P_t \to D_t$ consistently: it does not account for the confounding $W_t \leftarrow W_{t-1} \to P_{t-1} \to D_{t-1} \to D_t $ (see also Section~\ref{sec:CIV-estimation}).}
\label{fig:DAG_autocorrelated}
\end{figure}
\subsection{Alternative Demand Equations}\label{sec:demand_alternatives}
We now present two alternative models that can also generate autocorrelated time series but with different structural dependencies in time.
First, Model~II (heterogeneous demand) assumes that aggregate demand consists of two types: the first, $A_t$, is price-sensitive but not directly structurally dependent on its own past, and the second, $B_t$, is price-insensitive and exhibits a direct structural dependency in time.
In the case of electricity markets, this distinction by price sensitivity can be motivated by the fact that a part of demand is not exposed to high-frequency price fluctuations, such as retail consumers without real-time pricing.
The corresponding structural equations read
\begin{equation}\label{eq:quantities_partially_unexposed}
\begin{split}
\textit{Model~II:} \qquad D_t
& \coloneqq A_{t} + B_{t}
= (A_0 + \beta^P P_t + U^{A}_t) + (B_0+ \beta^{B1} B_{t-1} + U^B_t)\\
&= D_0 + \beta^P P_t + \beta^{B1} B_{t-1} + U_t^{D},
\end{split}
\end{equation}
where
$D_0 \coloneqq A_0 + B_0$
and $U_t^{D} \coloneqq U_t^A + U_t^B$.
The price equation becomes
\begin{equation}
\label{eq:price_partially_responsive}
\textit{Model~II:} \qquad P_t
= \frac
{S_0 - D_0}
{ \beta^P - \gamma^P}
+\frac
{\gamma^W}
{\beta^P - \gamma^P}
W_t
+ \frac{\beta^{B1} }
{\beta^P- \gamma^P}B_{t-1}
+ \frac{ U^S_t - U^D_{t} }
{ \beta^P - \gamma^P}.
\end{equation}
Figure~\ref{fig:DAG_demand_variants} (left) depicts the corresponding graph.
\begin{figure}
\centering
\includegraphics[width=0.9\linewidth]{plots/EXP_v108_figure_3_alternative_models.pdf}
\caption{
(Marginalized) graphical representation of alternative demand equations. Left: Model~II~(Partially Responsive Demand): Aggregate demand can be divided into two types as in~\eqref{eq:quantities_partially_unexposed}, one being price-exposed and not autocorrelated, one not exposed to prices and with inertia.
Richt: Model~III~(Demand~shifting): Demand depends on the price in two time steps, current and lagged, as in~\eqref{eq:quantities_cross}. Thus, the model assumes that processes or systems can be shifted in time, similar to a simplified representation of a cross-price response. The blue path highlights why a naive~IV estimator fails to estimate the causal effect from price on demand in the presence of cross-price elasticity (CIV1) is violated, see Section~\ref{sec:CIV-estimation}); by contrast, the orange path does not yield a similar violation.}
\label{fig:DAG_demand_variants}
\end{figure}
Second, Model~III introduces another type of time dependence. In a high-frequency time series, we expect a potential for demand optimization over time because consumption shortly before $t$ may be a substitute for consumption at time $t$. Consumers may respond to price differentials and shift their demand over time, such as deferring charging an electric vehicle. Figure \ref{fig:DAG_demand_variants} (right) shows a simplified cross-price elasticity in response to the realization of the price at time $t-1 $. The corresponding equations are
\begin{equation}\label{eq:quantities_cross}
\textit{Model~III:} \qquad D_t \coloneqq D_0 + \beta^P P_t + \beta^{P1} P_{t-1} + U^D_t
\end{equation}
and
\begin{equation}
\label{eq:price_cross}
\textit{Model~III:} \qquad P_t
= \frac
{S_0 - D_0}
{ \beta^P - \gamma^P}
+\frac
{\gamma^W}
{\beta^P - \gamma^P}
W_t
+ \frac{\beta^{P1}}{\beta^P- \gamma^P}P_{t-1}
+ \frac{ U^S_t - U^{D}_{t} }
{ \beta^P - \gamma^P}.
\end{equation}
\section{Graph-based IV Estimation
in Equilibrium Models
} \label{sec:CIV-estimation}
Next, we discuss sufficient conditions for valid instrumental variable (IV) estimation in equilibrium systems with a time series structure (Section~\ref{sec:conditionsIV}).
To do so, we exploit graphical conditions for validity of conditional IV (CIV) estimators \citep{Brito2002generalized,henckel_graphical_2023}, which have
recently been extended to time series settings \citep{thams_identifying_2022}.
In Section~\ref{sec:consistent_estimators} we
apply these CIV principles to the three models introduced in Section~\ref{sec:graphical_representation} and present several valid CIV estimators. We argue that discrepancies between them can inform researchers about the validity of the underlying models and assumptions.
\subsection{Conditional IV Estimation in Time Series}\label{sec:conditionsIV}
For constructing valid estimators
we make use of
the concept of d-separation (short for directed separation) \citep{pearl_causality_2009}.
D-separation is a purely graphical criterion connected to conditional independences of random variables via the Markov condition \citep{Lauritzen1996}.
\citet{pearl_causality_2009}'s original formulation considers finite graphs; here, we use a version that is adapted
to (marginalized) infinite time series graphs.
\begin{definition}[Pearl's d-separation \citep{pearl_causality_2009}]
Let $\mathcal{G}$ be the marginalized
version of an acyclic directed full time graph \citep{peters_causal_2013},
which contains a node for each variable and time point,
with vertices\footnote{Here the $\mathbb{Z}$ component encodes time, e.g., $D_t$ is a vertex denoted as $(t,1)$.}
$V = \mathbb{Z} \times \{1,\dots,d\}$,
and let $i_1, \dots, i_m$ be a path between vertices $i_1$ and $ i_m $ in $\mathcal{G}$. We say that the path $i_1, \dots, i_m$ is \textit{blocked by the set of variables} $ S \subseteq V \setminus \{i_1, i_m\}$ if there exists $k \in \{2,\dots, m-1\}$
such that either
\begin{enumerate}
\item[(i)] $i_k \in S$ and $ i_k $ is not a collider on the path $i_1, \dots, i_m$, or
\item[(ii)] $ i_k $ is a collider\footnote{Let $\mathcal{G}$ be a marginalized version of an acyclic directed full time graph with vertices $V$. For such graphs we define $v$ to be a \emph{collider} on a path whenever two consecutive edges have arrowheads at $v$ (for example, $u_1 \leftrightarrow v \leftarrow u_2$).} on the path and
$(\{i_k\} \cup \mathrm{DE}(i_k)) \cap S = \emptyset$, where $\mathrm{DE}(i_k)$ are the descendants of $i_k$;
\end{enumerate}
if a path is not blocked by $S$, we say it is \emph{unblocked, given $S$}.
For three mutually disjoint sets of vertices $ A, B, S \subset V$, we say that $A$ and $B$ are \emph{d-separated by $ S $} if all paths between $ A $ and $ B $ are blocked by $ S $. If this is the case, we write
\begin{equation*}
A \perp\!\!\!\perp_{\mathcal{G}} B \mid S.
\end{equation*}
\end{definition}
The concept of d-separation helps us to construct valid IV estimators in time series. The following statement is an adapted version of Theorems~5~and~8 of \cite{thams_identifying_2022}.
Let $d,d' \in \mathbb{N}$, $d \leq d'$ and let $V' = \mathbb{Z}\times\{1,\dots,d'\}$. Consider a linear SCM for time series
over variables $X_{V'}$ and let $\mathcal{G}$ be the induced marginalized version of an acyclic directed full time graph with vertices $V = \mathbb{Z} \times \{1,\dots,d\}$.
Let\footnote{Depending on the context, and slightly overloading notation, $X_S$ for $S \subseteq V$ is either the set random variables $\{X_s \ \vert \ s \in S\}$ or the random vector $(X_{s_1}, \dots, X_{s_n})$, where $s_i$ are in lexicographic order.} $\mathcal{I}, \mathcal{X}, \mathcal{B}, \{Y\} \subseteq V$
have zero means and finite second moments and let $\beta \in \mathbb{R}^{|\mathcal{X}|}$ be the causal coefficient with which $X_\mathcal{X}$ enters the structural equation for $X_Y$, that is,
\begin{equation}
X_Y = \beta^T X_\mathcal{X} + \gamma^T X_K + \epsilon^Y,
\end{equation}
for some variables
$X_K \subseteq X_V \setminus X_\mathcal{X}$
(some of the components of $\beta$ can be zero, so not all variables in $X_\mathcal{X}$ have to be parents of $X_Y$).
One then considers the following three requirements on $\mathcal{I}, \mathcal{X}, {\mathcal{B}}$ and $Y$, the CIV criteria:
\begin{itemize}
\item[(CIV1)] $\mathcal{I}$ and $Y$ are d-separated given $\mathcal{B}$ in the graph $\mathcal{G}_{\mathcal{X} \not\rightarrow Y}$, which denotes the graph obtained when removing all direct edges from $\mathcal{X}$ to $Y$ from $\mathcal{G}$.
\item[(CIV2)] $\mathcal{B}$ is not a descendant of $\mathcal{X} \cup \{Y\}$ in $\mathcal{G}$.
\item[(CIV3)] the matrix $\mathbb{E}[\text{cov}(X_{\mathcal{X}}, X_\mathcal{I}|X_\mathcal{B})]$ has rank $|\mathcal{X}|$, that is, full row rank.
\end{itemize}
(CIV1) and (CIV2) are properties of the underlying causal graph, (CIV3) is a property of the induced distribution.
Assume we have observations at time points $1, \ldots, T$.
If
an estimator is based on
$\mathcal{I}, \mathcal{X}, {\mathcal{B}}$
such that
requirements (CIV1), (CIV2) and (CIV3) are met,
we call it a \emph{valid} CIV estimator.
In this case,
\begin{equation}
\label{eq:civ}
\hat{\beta} \coloneqq \arg\min_{b} \|\hat{\text{cov}}(X_Y - b^TX_\mathcal{X}, X_\mathcal{I}|X_\mathcal{B})\|,
\end{equation}
is a consistent estimator for $\beta$ if $T \to \infty$ (for a detailed definition of $\hat{\beta}$ and its closed form solution see Appendix~\ref{app:tsls}). We call $\hat{\beta}$ the \emph{conditional instrumental variable (CIV)} estimator and denote it by $\mathrm{CIV}(\mathcal{I} \mid \mathcal{X} \to Y \mid \mathcal{B})$.
If at least one of the conditions is not met,
then we call the estimator invalid and, in general, it may not be consistent \citep{henckel_graphical_2023} (but exceptions exist).
In the special case, however, that (CIV1) and (CIV2) are satisfied but (CIV3) is not (this is related to weak instrument settings), any estimation technique that comes with valid inference yields unbounded confidence sets containing the true causal effect with large probability. In this sense, it is therefore not necessary to test for the validity of (CIV3).
\subsection{
Consistent Estimation of Price Elasticities
}\label{sec:consistent_estimators}
We now apply the CIV criteria to derive valid estimators for the Models~I--III presented in Section~\ref{sec:graphical_representation}. For example, consider Model~I from Section~\ref{sec:demand_autocorrelated}.
The model is
described
by
Equations~\eqref{eq:demand_autocorrelated}~and~\eqref{eq:price_autocorrelated}, and the corresponding marginalized time graph in Figure~\ref{fig:DAG_autocorrelated}. The naive~IV estimator $\#1$ that neglects time dependencies can be written as $\mathrm{CIV}(W_t \mid P_t \to D_t \mid \emptyset)$, that is, we set $X_{\mathcal{X}} = (P_t)$, $X_{Y} = \{D_t\}$, $X_{\mathcal{B}} = \emptyset$ and $X_{\mathcal{I}} = (W_t)$. We see that (CIV1) is not satisfied: After removing the edge $P_t \to D_t$ in Figure~\ref{fig:DAG_autocorrelated}, we obtain the graph $ \mathcal{G}_{P_t \not\rightarrow D_t}$. In this graph, there are several unblocked paths given $\emptyset$ through $W_{t-1}$ that connect the instrument $W_t$ to the dependent variable $D_t$. An example is the blue path in Figure~\ref{fig:DAG_autocorrelated}, $W_t \leftarrow W_{t-1} \to P_t \to D_{t-1} \to D_t$, given $X_{\mathcal{B}} = \emptyset$. $W_t$ is therefore not d-separated from $D_t$.
We provide an overview of some available estimators and their validity in Table~\ref{tab:estimators}. We group CIV estimators along two main concepts.
The first approach uses a selection of path-blocking variables as the conditioning set. Such a conditioning set can contain past realizations of the instrument $W_t$, the endogenous variable $P_t$, or the outcome variable $D_t$. For example, the estimator $\#3$ $\mathrm{CIV}(W_t \mid P_t \to D_t \mid D_{t-1})$ contains only one lag of the outcome variable; it is valid for Model~I. The estimator $\#2$, $\mathrm{CIV}(W_t \mid P_t \to D_t \mid \{W_{t-s}\}_{s=1}^L)$, contains $L$ lags of the instrument and is valid for Models~I--III.
Intuitively, by including the past realizations of the instrument in the conditioning set, we block the path starting with $W_t \leftarrow W_{t-k}$ for some $k\geq 1$.
The estimator $\#2$ is valid under a strictly more general model class: for example, it is even valid for any model yielding a (marginalized) graph, in which $P_t \rightarrow D_t$ is the only directed path between $P_t$ and $D_t$, and the set of parents of $W_t$ is a subset of $\{W_{t-1}, \ldots, W_{t-L}\}$. This model class contains Models~I,~II, and~III. We therefore consider $\#2$ our benchmark estimator.
The second approach relies on the concept of simultaneously estimating nuisance effects. Estimator $\#8$, $\mathrm{CIV}(\{W_{t-s}\}_{s=0}^L \mid (P_t, P_{t-1},D_{t-1}) \to D_t \mid \emptyset)$, for example,
adds two additional nuisance covariates to $\mathcal{X}$. It estimates
a three-dimensional effect and later ignores two of its components.
\begin{table}[ht]
\centering
\begin{tabular}{ p{0.2cm} p{8cm}||p{1.5cm}|p{1.5cm}|p{1.5cm} }
& Estimator &
Model~I
Figure~\ref{fig:DAG_autocorrelated}
&
Model~II
Figure~\ref{fig:DAG_demand_variants} (left)
&
Model~III
Figure~\ref{fig:DAG_demand_variants} (right)
\\
\hline
& Naive~IV &&& \\
$\#1$& $\mathrm{CIV}(W_t \mid P_t \to D_t \mid \emptyset)$
&\ding{55}&\ding{51}&\ding{55}\\
\hline
&Conditional IV & &&\\
$\#2$& $\mathrm{CIV}(W_t \mid P_t \to D_t \mid \{W_{t-s}\}_{s=1}^L)$
& \ding{51} & \ding{51} & \ding{51}\\
$\#3$&$\mathrm{CIV}(W_t \mid P_t \to D_t \mid D_{t-1})$
& \ding{51} & \ding{55} & \ding{55} \\
$\#4$&$\mathrm{CIV}(W_t\mid P_t \to D_t \mid \{W_{t-s}, P_{t-s}, D_{t-s}\}_{s=1}^{L}$)
& \ding{51} & \ding{51} & \ding{51} \\
\hline
& Nuisance IV &&&\\
$\#5$&$\mathrm{CIV}(\{W_{t-s}\}_{s=0}^L\mid (P_t, D_{t-1}) \to D_t \mid \emptyset)$
& \ding{51} & \ding{51} &\ding{55}\\
$\#6$&$\mathrm{CIV}(\{W_{t-s}\}_{s=0}^L \mid (P_t, P_{t-1}) \to D_t \mid \emptyset)$
& \ding{55} &\ding{51} &\ding{51} \\
$\#7$&$\mathrm{CIV}(\{W_{t-s}\}_{s=0}^L \mid (P_t, P_{t-1}) \to D_t \mid D_{t-1})$
& \ding{51} & \ding{55}
&\ding{51} \\
$\#8$&$\mathrm{CIV}(\{W_{t-s}\}_{s=0}^L\mid (P_t, P_{t-1}, D_{t-1}) \to D_t \mid \emptyset)$
& \ding{51} & \ding{51} &\ding{51}\\
\end{tabular}
\caption{
Estimators and their validity for the causal effect $\beta^P$ from $P_t \to D_t$ for Models~I--III
}
\label{tab:estimators}
\end{table}
\paragraph*{Special cases for a valid naive IV estimator.}
Even though the naive~IV estimator does not necessarily satisfy (CIV1), there are special cases in which the naive estimator is valid, as visualized in Figure~\ref{fig:DAG_special_cases}.
These occur i) when the instrumental time series is i.i.d., or
ii) when demand is not directly affected by its past realizations, or iii) when there is no response to prices, i.e., $\beta = 0$.
In all three cases, no unblocked path exists (given $\emptyset$) from $W_t$ to $D_t$ through the past.
\begin{figure}
\centering
\includegraphics[width=1\linewidth]{plots/EXP_v108_figure_4_variant_DAGs.pdf}
\caption{
Graphical representation of special cases of Model~I, for which naive~IV is a valid estimator. Left: The instrument is i.i.d.\, i.e., not autocorrelated. Middle: The demand function is not autocorrelated. Right: The demand is not responsive to prices.}
\label{fig:DAG_special_cases}
\end{figure}
\paragraph*{Local Projection IV Estimator.}\label{par:lp}
Estimator $\#4$ in Table~\ref{tab:estimators} is the lag-augmented local projection IV estimator\footnote{The general formulation of the local projection IV estimator includes lags up to infinity \citep[see e.g.,][chap. 3.3]{montiel_olea_local_2021}, which in practice translates into a 'large number of lags`, which we represent by $L$.} from the macroeconomic literature on identifying impulse response functions \citep{stock_identification_2018, montiel_olea_local_2021}. In CIV notation, the local projection IV estimator for the time horizon $h=0$, i.e., the effect of $P_t \to D_t$, can be written as $\mathrm{CIV}(W_t\mid P_t \to D_t \mid \{W_{t-s}, P_{t-s}, D_{t-s}\}_{s=1}^L) $; thus, the local projection IV estimator is a special case of a CIV estimator with lags of the instrumental, endogenous, and dependent variable in the conditioning set, since it also relies on the concept of blocking path to achieve validity. To achieve validity, however, including the lags of the instrument would be sufficient (see estimator $\#2$). If, however, in Model I, there is additional hidden confounding between $W_t$ and $P_{t-1}$, and $D_t$ and $P_{t-1}$, $\#4$ is invalid, while $\#2$ would still be valid. Estimator $\#2$ is valid across a larger model class.
\paragraph*{Model validation.} The existence of several valid IV estimators
allows us to learn about the structure of the demand response.
We can assume a particular structure of the demand equation, but we do not know ex-ante whether this assumption holds. The ability to derive multiple supposedly valid estimators for a structural model can be used to test this assumption.
For example, if Model~II describes the true time dependencies, the confidence intervals of all estimators but number $\#3$ in Table~\ref{tab:estimators} should overlap with high probability. This can be tested from observational data. If the confidence intervals do not overlap, one should reject Model~II.
\section{Simulating electricity market data
}\label{sec:Simulation}
We now evaluate the CIV estimators of Section~\ref{sec:consistent_estimators} in a controlled environment motivated by the German electricity market (see Section~\ref{sec:application}).
We empirically quantify the bias that arises when using invalid estimators and compare the empirical performances of the CIV estimators (including nuisance IV estimators). We also show that
the autocorrelation of the response time series does not suffice to correct for the bias of invalid estimators.
\paragraph*{Data generation.}
We generate multiple datasets containing three hourly time series: a supply-shifting instrumental time series, wind generation\footnote{For a discussion on wind generation being a valid instrument see Section~\ref{sec:application}.}, the equilibrium electricity demand,\footnote{In the electricity market, equilibrium demand is also referred to as load or electricity consumption.} and the equilibrium electricity price. We model wind generation as an AR$(L)$ process with autocorrelation coefficients derived from observed wind generation data in Germany in 2019 (see Appendix~\ref{app:data} for data sources).
The supply equation corresponds to Equation~\eqref{eq:supply} with $\gamma^P = + 500$ MW/(EUR/MWh). It is parameterized so that every unit of generated wind electricity is immediately offered to the market $(\gamma^W = 1)$. The constant $S_0 = 25,000$ MWh/h implies that there is supply even if prices drop below zero, a typical characteristic of real-world electricity markets. The errors $U_t^S$ are i.i.d.\ $\mathcal{N}(0, 1)$.
Finally, we equate the supply and the model-specific demand equation (Equation~\eqref{eq:demand_autocorrelated}, \eqref{eq:quantities_partially_unexposed} or \eqref{eq:quantities_cross}) to obtain hourly equilibrium prices and quantities. Unless otherwise specified, the demand equation is parameterized as follows: the own price elasticity is $\beta^P = -100 $ MW/(EUR/MWh), the error terms of the demand equation are i.i.d.\ $\mathcal{N}(0,2000)$, and the constant of the demand series $D_0$ is chosen so that the resulting demand is stationary around the mean value of German electricity load (approximately $60$ GWh/h).
\paragraph*{CIV estimation.}
All CIV estimators are calculated with the Python package linearmodels \citep{kevin_sheppard_bashtagelinearmodels_2024}, using the kernel correction for heteroscedasticity and autocorrelation robust errors (HAC).
\paragraph*{Validity of estimators.}
We validate the theoretical findings of Section~\ref{sec:CIV-estimation}. In Figure~\ref{fig:simulation_autocorrelated}, we apply the CIV estimators specified in Table~\ref{tab:estimators} to the data simulated from Model~I.\footnote{Appendix~\ref{app:simulation} provides simulation results for Models~II in Figure~\ref{fig:simulation_two_demand_types} and for Model~III in Figure~\ref{fig:simulation_cross}.}
We find that the confidence sets of all valid estimators overlap (compare the overlap of the confidence intervals with the check marks for Model~III on the right of Figure~\ref{fig:simulation_autocorrelated}). Conversely, if one had assumed Model~II, one would be forced to reject the associated structural assumptions since estimators $\#1$ and $\#6$ deviate from other valid estimators (e.g., $\#2$ and $\#8)$.
The simulation thus underscores our argument that comparing the overlap of several presumably valid estimators provides a means of rejecting incorrect structural assumptions.
\begin{figure}[ht]
\centering
\includegraphics[width=.9\linewidth]{plots/EXP_v108_model_I_application_figure.pdf}
\caption{
CIV estimates $\hat{\beta}^P$ of the true demand response $\beta^P = -100$ MW/(EUR/MWh) when data is simulated based on Model~I (Figure \ref{fig:DAG_autocorrelated}). The structural autocorrelation of demand is $\beta^{D1} = 0.7$. The columns on the right indicate the validity according to the CIV criteria (see Table~\ref{tab:estimators}).}
\label{fig:simulation_autocorrelated}
\end{figure}
\paragraph*{Magnitude of bias.}
We quantify the bias caused by ignoring any direct structural autocorrelation. In linear SCMs, the bias (explicitly computed by \citet[][Prop.~17, for a special case]{thams_identifying_2022}) depends on the path coefficients along unblocked paths (which may be unblocked due to wrongfully including descendants of colliders in the conditioning set).
Figure~\ref{fig:heatmap} shows the empirical percentage error of the naive~IV estimator $\#1$ applied to estimate the demand response for data generated from Model~I. We vary the direct structural autocorrelations of the instrumental time series $(\beta^W)$ and the demand series $(\beta^{D1})$.
For low levels of instrument autocorrelation $(\beta^W<0.2)$, ignoring time dependencies leads to a moderate bias $(< 20\%)$.
However, the resulting bias is substantial for high-frequency time series. For example, in real-world data (see Section~\ref{sec:application}), the autocorrelation of wind generation (at lag 1) can have values above 0.9. Hence, even for small levels of direct structural autocorrelation of demand, this could lead to a bias of more than $25\%$.
We observe the same pattern for other combinations of models and invalid estimators (see Figure~\ref{fig:heatmap_appendix}).
\begin{figure}
\centering
\includegraphics[width=0.5\linewidth]{plots/EXP_v108_heatmap_5_years_20_runs_10_linspace_1_windlags_single.pdf}\caption{
Isolines showing the average absolute percentage error of the point estimate as a function of the structural autocorrelation of wind (instrument) and the structural autocorrelation of demand (dependent variable).
For the simulations, we divide both axes into ten equidistantly spaced autocorrelation coefficients between 0 and 1 each, based on which we run $20$ simulations with five years of data $(T = 43,800)$.
}
\label{fig:heatmap}
\end{figure}
\paragraph*{Structural vs. observed autocorrelation.}
Knowing
the observed autocorrelation of the demand is
not sufficient for correcting for the bias of the naive~IV estimator $\#1$.
In Figure~\ref{fig:observed_ar}, we plot the percentage error of
estimator $\#1$ against the observed autocorrelation of demand (which we denote by $\alpha^{D1}$ to distinguish it from the structural autocorrelation denoted by $\beta^{D1})$.
The intensity of the color indicates the value of the respective structural coefficients. The figure shows that the same level of observed autocorrelation (at lag one) can result from different structural dependencies, yielding different estimation errors. Low levels of observed autocorrelation can result in a substantial bias of $100\%$ (e.g., Model~III at $\alpha^{D1} \approx 0.2)$, and observed autocorrelation up to $\alpha^{D1} \approx 0.9$ can be associated with no bias at all if the data is generated by a different model (e.g., Model~II).
Consequently, knowing the observed autocorrelation of demand (at lag one) is insufficient for deriving a structural model or predicting a bias.
\begin{figure}
\centering
\includegraphics[width=0.5\linewidth]{plots/EXP_v108_observed_ar_5_years_4_runs_100_linspace_REGULAR.pdf}\caption{
The percentage error of the naive~IV estimator $\#1$ is shown as a function of the observed autocorrelation of demand $(\alpha^{D1})$.
In each simulation we vary the structural dependencies: In Models~I and II, the strengths of the structural autocorrelations, $\beta^{D1}$ and $\beta^{B1}$, are both varied between $-0.25$ and $0.99$.
In each simulation we vary the structural dependencies: In Models~I and II, the strengths of the structural autocorrelations, $\beta^{D1}$ and $\beta^{B1}$, are both varied between $-0.25$ and $0.99$.
In Model~III, $\beta^{P1}$ is varied between $-250$ MW/(EUR/MWh) and $+250$ MW/(EUR/MWh). The color intensity increases in tandem with the aforementioned ranges. For each model, we conduct $400$ simulations with a sample period of five years $(T = 43,800)$.
}
\label{fig:observed_ar}
\end{figure}
\paragraph*{Empirical performance of different CIV estimators.}
We analyze the empirical performance of the three CIV estimators that are valid across a wide class of models: the nuisance IV estimator $\#8$, the CIV estimator $\#2$, and the CIV estimator $\#4$, which corresponds to a lag-augmented local projection IV estimator.
We do so based on three indicators:
\emph{Coverage}, which indicates how often the $95\%$-confidence interval of $\hat\beta^P$ contains the true value $\beta^P$;
\emph{average absolute percentage error}, which averages
$100 \cdot |\hat{\beta}^P - \beta^P|/ |\beta^P|$
over different simulations;
and the \emph{length of the confidence interval}.
Figure \ref{fig:indicators_model_1} plots the indicators as a function of the sample size for data generated from Model~I. All estimators have coverage (left), confirming these approaches' validity. However, the nuisance IV estimator $\#8$ has a smaller average absolute percentage error (middle) and yields shorter confidence intervals at smaller sample sizes (right) than both the conditional IV estimators of the most general class, $\#2$, and the lag-augmented local projection IV estimator, $\#4$.
The benefit of having a large sample size becomes marginal beyond five years but holds regardless of the structural model (see Figure~\ref{fig:indicators_model_2} and Figure~\ref{fig:indicators_model_3}). Thus, while the estimators that rely on blocking the blue path in Figure~\ref{fig:DAG_autocorrelated} by conditioning, $\#2$ and $\#4$, are conceptually simple and retain validity across a large class of models,
the estimator that relies on estimating nuisance effects, $\#8$, in the above setting outperforms them, thereby providing a useful alternative for smaller sample sizes.
\begin{figure}
\centering
\includegraphics[width=1\linewidth]{plots/EXP_v108_goodness_plot_simple_model_21_years_50_runs_11_linspace.pdf}
\caption{Evaluation of the statistical performance of conditional vs. nuisance IV estimators for Model~I based on the performance indicators: (left) coverage, (middle) the average absolute percentage error, and (right) the length of the confidence interval. $(\beta^{D1} = 0.9$.) The shaded areas represent the 95\% confidence intervals. For each year, we run $ 50$ simulations.}
\label{fig:indicators_model_1}
\end{figure}
\section{Estimation of the Price Elasticity of Hourly German Electricity Demand}\label{sec:application}
We estimate the own-price elasticity of the aggregate German electricity demand using the CIV estimators derived in Section~\ref{sec:CIV-estimation}. Furthermore, we discuss what the divergence between the estimators can reveal about the structure of the dynamic response.
\paragraph*{Price elasticity of electricity demand.} Historically, electricity demand was considered inelastic, and power plants adjusted their supply according to whatever demand occurred \citep{borenstein_trouble_2002,cramton_capacity_2013}. Liberalization, digitalization, and decarbonization over the last three decades have started to change that. After liberalization, it soon became clear that a low elasticity of demand inflates the ability of producers to abuse market power, and policymakers took measures to promote more flexible customer behavior, e.g., by increasing the exposure of consumers to real-time pricing
\citep{borenstein_trouble_2002,fabra_estimating_2021}.
In addition, as the role of wind and solar expands globally, price volatility increases, and the benefits of flexible demand become larger
\citep{ciarreta_renewable_2020, maniatis_impact_2022, hosius_impact_2023}.
Policy scenario and system planning studies assume future demand to be increasingly price-elastic
\citep[e.g.,][]{acer_decision_2020}.
Therefore, an accurate estimate of the price elasticity of electricity demand is important for reliable system planning and appropriate policy decisions.
\paragraph*{The electricity market.} The electricity system must always be in balance for physical reasons. The primary mechanism to equalize demand and supply is the day-ahead auction of the wholesale market. This is where generators, retail suppliers, and large industrial consumers submit their price-volume bids for each hour of the following day.\footnote{The bid volume does not correspond to aggregate demand, and the bid curves do not correspond to the demand equation. This is because market participants can submit net bids (pool-based bidding) and have the option of trading on other marketplaces. Hence, the demand elasticity is not observable but must be estimated. However, the clearing price is informative about the equilibrium price \citep{knaut_when_2017}.} Because electricity storage is expensive and limited in capacity, wholesale electricity prices are much more volatile than other commodities \citep{ciarreta_renewable_2020, maniatis_impact_2022, hosius_impact_2023}.
\paragraph*{Data.} We estimate the own-price elasticity on electricity market data between October 23, 2017, and December 31, 2020 (see Table~\ref{tab:summary_stats} for summary statistics). Electricity demand in megawatt-hours per hour (MWh/h) is defined as consumption in the joint German-Luxembourg market. The electricity price in Euro per megawatt-hour (EUR/MWh) corresponds to the clearing price of the day-ahead auction on EPEX Spot, the largest marketplace for the market zone. Wind generation is in gigawatt-hours per hour (GWh/h). A detailed description of the data and sources can be found in Appendix~\ref{app:data}. Whenever we exclude hours and/or split the data set, we determine the relevant lags and then perform the split.
\begin{table}[htbp]
\centering
\begin{tabular}{p{4.5cm}|p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}}
& \textbf{Mean} & \textbf{Std. Dev.} & \textbf{Min} & \textbf{Median} & \textbf{Max} & \textbf{Skew-ness} & \textbf{Kurto-sis} \\
\hline
\textbf{Consumption [GWh]} & 59.9 & 11.3 & 34.0 & 59.5 & 91.7 & 0.16 & -0.7 \\
\textbf{Price [€/MWh]} & 38.0 & 17.6 & -90.0 & 38.0 & 200.0 & -0.35 & 3.8 \\
\textbf{Wind Generation [GWh]} & 14.1 & 10.1 & 0.1 & 11.6 & 46.1 & 0.87 & -0.1 \\
\end{tabular}
\caption{Summary Statistics; $T = 27,072$ after removing holidays.}
\label{tab:summary_stats}
\end{table}
\paragraph*{Identification.} To overcome the endogeneity problem induced by the equilibrium condition, we use wind power generation as an exogenous time series. Wind speed and wind power generation are commonly used as supply shifting instruments because they are relevant and credibly exogenous \citep{bonte_price_2015, knaut_when_2017, fabra_estimating_2021, hirth_how_2024}.
The assumption that the structural equation of wind power generation does not depend on the price of electricity is based on the argument that renewable generators have marginal costs close to zero. Additionally, most German wind power generators also receive a subsidy per unit of electricity produced, which induces an opportunity cost of not producing, even if prices are negative.\footnote{ Negative prices represent approximately $2.5$ percent of the observations. If wind generators stopped producing at negative prices, this would indicate that the instrument is not valid for that price range. However, we also observe wind generation at negative prices.}
We follow \citet{hirth_how_2024} in proposing that wind power is independent of the noise terms of demand and supply after conditioning on suitable covariates.
While it is reasonable to assume that wind power does not affect demand in any way other than through the price of electricity,
we expect the existence of common causes such as seasonality and weather events.
We therefore condition on the following covariates:
seasonal dummies (hour of the day, day of the week, and month of the year) and weather controls (sunlight, and heating and cooling degrees). Furthermore, we include other covariates to increase the precision of the estimate, namely commodity prices (natural gas, coal, and emission allowances), solar PV generation, and other calendar controls
(school vacations by state and a variable for the last week of the year).
In Models~I--III, we assume $W_t$ to have a structural autocorrelation of on lag, and in that case, for many of the estimators, including a single time lag suffices. However, observed wind power exhibits a higher degree of autocorrelation (see Figure~\ref{fig:autocorrelation}), which needs to be reflected in the construction of the different estimators (the argument remains the same).
Given the observed autocorrelation pattern, we include up to $50$ lags of wind power generation in the conditioning set of the CIV estimator $\#2$ and $\#4$, and as instruments for the nuisance IV estimators $\#4$ to $\#8$. We also observe a significant autocorrelation pattern in the demand time series (this is expected if there is indeed a causal effect from wind power generation on demand, but it may have other sources, too).
\paragraph*{Models of electricity demand.}
Electricity demand features two main mechanisms that can imply structural correlations in time (for a comprehensive classification of demand response in the electricity market, see \cite{albadi_summary_2008}). First, some electricity-consuming processes run for extended periods and cannot be switched on and off by the hour. This includes many industrial activities spanning an entire work shift and residential activities such as washing machines with multi-hour programs. Therefore, it is likely that the demand at time $t$ depends on the load of the previous hours, as in our Model~I.
Second, some electricity-consuming processes can be shifted in time to exploit power price differentials. Such `load shifting' may be done by scheduling industrial processes during low-price hours and by postponing charging electric vehicles, for example.
Model~III represents a simplified version of the shifting dynamic, where demand $D_t$ also depends on the lagged price $P_{t-1}$.
Our alternative demand Model~II assumes that processes or systems can be divided into two types: one that is price-exposed and reacts instantaneously and one that is inertial and not exposed to price variations. This model is motivated by the observation that most retail consumers are not exposed to real-time prices and that only the remaining consumers can respond to prices. For simplicity, we assume that these remaining consumers can regulate their processes individually for each hour.
\paragraph*{Additional assumptions about the demand equation.}
The models we consider make additional assumptions about the demand response. First, they posit that the functional form of the resulting demand equation depends linearly on price. To show that dynamics matter irrespective of the functional form, we include results for the assumption of an exponential relationship in Figure~\ref{fig:sensitivity_aggregated}\footnote{For the log-log transformation, we exclude prices of zero and below.}. Second, the models assume that the elasticity is constant across hours and seasons. This implies that consumers who are active during the day have, on average, the same elasticity as consumers who are active at night. We investigate the relevance of this assumption in more detail in a robustness analysis in Appendix~\ref{app:results_on_off_peak}.
\paragraph*{Quantitative results.}
Figure~\ref{fig:sensitivity_aggregated} gives the quantitative results.
The CIV estimators $\#2$ and $\#4$, and the nuisance IV estimator $\#8$, which are valid across a large model class, have overlapping confidence intervals. All three estimate a linear demand response $\hat{\beta}^D$ of approximately $-200$ MW/(EUR/MWh).\footnote{$\#2$ estimates a value of $-220$, $\#4$ of $-183$, and $\#8$ of $-181$. All estimates in MW/(EUR/MWh).} The log-log specification yields a unitless estimate of $-0.1$.\footnote{$\#2$ estimates a value of $-0.1$, $\#4$ of $-0.11$, and $\#8$ of $-0.08$. All estimates are unitless.} An intervention on supply by a quantity similar to the magnitude of one standard deviation of the instrument, $693$ MW,\footnote{The standard deviation is obtained from the residual time series of wind production, i.e., after being regressed on the whole conditioning set of estimator $\#2$.} leads to a predicted price change of EUR $-0.64$,\footnote{We obtain the price prediction by multiplying the standard deviation with the first stage coefficient $\hat{\pi} =-0.00096$ (EUR/MWh)/MW.} and thus an increases in the equilibrium quantities of $140$ MW.
\begin{figure}[ht]
\centering
\includegraphics[width=1\linewidth]{plots/EXP_v108_main.pdf}
\includegraphics[width=1\linewidth]{plots/EXP_v108_main_log_log.pdf}
\caption{
The own-price elasticity of aggregated German electricity demand, obtained by CIV estimators (top: linear specification; bottom: log-log specification). The highlighted area corresponds to the confidence interval of estimator $\#2$. The tables on the right are reproductions of Table~\ref{tab:estimators}, showing the validity of each strategy for the structural causal models described in Section~\ref{sec:graphical_representation}.}
\label{fig:sensitivity_aggregated}
\end{figure}
\paragraph*{Overlap pattern.}
We can also analyze the pattern of the different CIV estimators to learn about the real-world dynamics of electricity demand response. First, we can reject a linear model without relevant structural autocorrelation. Figure~\ref{fig:sensitivity_aggregated} shows that the pattern of estimators does not correspond to the pattern that we would expect if real-world dynamics would not bias a naive estimate: The confidence intervals of the benchmark estimator and the naive~IV estimator do not overlap, for example. Also, we can reject that the observed autocorrelation in the time series is only caused by an autocorrelation in the residual demand, as in Model~II: the estimators $\#1$ and $\#5$ yield smaller absolute values than estimators $\#2$ and $\#8$ for the own-price elasticity, with non-overlapping confidence sets.
Second, our results indicate that the dynamics of electricity markets are more complex than suggested by the simple Models~I,~II,~and~III because, taken in isolation, none of the models is sufficient to explain the disagreement between the estimators.
Our approach only allows us to falsify structural assumptions but not to confirm them.
\paragraph*{Robustness.}
As mentioned at the beginning of this section, we make the strong assumption that the demand elasticity is constant across hours. However, different consumers are active in the electricity market at other times of the day, resulting in a changing composition of consumer elasticities. To account for this temporal heterogeneity, \citet{knaut_when_2017} investigate the level of demand response by the hour of the day, and \citet{hirth_how_2024} additionally analyze heterogeneity by weekday and season. In Appendix~\ref{app:results_on_off_peak}, we provide a robustness analysis that divides the hours into on-peak and off-peak periods (with lags of the variables extending into the respective other phase as needed). The results show that the overlap pattern holds primarily for on-peak demand. This period is also when we would expect the highest demand response, and the quantitative results of the benchmark estimator $\#2$ are correspondingly higher. In contrast, the structural dynamics during off-peak periods (i.e., at night) suggest a different dynamic, which could be investigated further with our proposed method.
\paragraph*{Intervention.} Causal inference is concerned with predicting the effect of interventions on a system. $\hat{\beta}^D$ is an estimate of the structural coefficient $\beta^D$ of the demand equation. It can be interpreted as the demand response to a hypothetical intervention on the equilibrium price. If $\beta^D$ were indeed $-200$ MW/(EUR/MWh) and it were possible to reduce the price by EUR $1$, demand would increase by $200$ MWh/h (see Figure~\ref{fig:demand-supply-interventions} (middle)). We call this intervention hypothetical because a direct and isolated intervention on the price only would yield a market that is out of balance: If one were to set the price to $p_\mathrm{fix}$, not only would the quantity demanded change, but so would the quantity supplied, resulting in an imbalanced market $(S(p_\mathrm{fix}) \neq D(p_\mathrm{fix}))$.
One may also consider demand or supply shocks that shift or alter the demand or supply curve. For example, a supply shock that occurs regularly is changing weather conditions that affect the availability of renewable energy. Figure~\ref{fig:demand-supply-interventions} (right) illustrates a supply shock that leads to the equilibrium quantities $Q$. Unlike the example of a hypothetical intervention on the price, in this scenario, equilibrium quantity and price are endogenous, ensuring that the market clears.
\begin{figure}
\centering
\includegraphics[width=\linewidth]{plots/intervention_with_elastic_demand.png}
\caption{Illustrations of conceptually different interventions in a market at equilibrium. Left: Market at equilibrium, i.e., the state
without any intervention. Middle: Hypothetical intervention on the equilibrium price, fixing the equilibrium price at $P_\mathrm{fix}$. The demand elasticity is sufficient to calculate the effect of the intervention on the quantity demanded. However, the market does not clear because marginal cost is less than marginal willingness to pay. Richt: Factual intervention $X_{shift}$ that shifts the supply curve outward, leading to a new market equilibrium. }
\label{fig:demand-supply-interventions}
\end{figure}
\section{Conclusion}\label{sec:conclusion}
This paper demonstrates the advantages of using directed acyclic graphs to estimate the price elasticity of demand with autocorrelated instruments. While it is well known that autocorrelation can lead to biased estimates, relying solely on observed autocorrelation and statistical tests can mislead researchers seeking valid estimators. Causal graphs allow us to express structural assumptions transparently, understand biasing dynamics, derive multiple valid estimators, and ultimately test the validity of assumptions about structural dependencies over time. Suppose economists wish to benefit from causal time graphs. In that case, they can do so without abandoning the idea of simultaneous determination of supply and demand: equilibrium relationships can be represented in DAGs similarly to a time-instantaneous hidden confounding.
The graphical CIV criteria provide two different approaches to valid IV estimators. One approach blocks paths by including lagged terms in the conditioning set, and the other simultaneously estimates nuisance effects. While the former is more robust to model misspecification, the latter can be more powerful at small sample sizes.
We have applied the above to estimate the own-price elasticity of electricity demand under three competing structural assumptions: a model in which demand exhibits inertia, a model in which demand additionally depends on previous prices and a model of heterogeneous response. We have shown through simulations that each model can manifest identical levels of observed demand autocorrelation, illustrating that the observed correlation alone cannot predict potential bias. The estimates diverge when conditional IV estimators are applied to German electricity demand. This suggests that the widely used IV estimator, which ignores time dynamics, cannot identify the own-price elasticity without significant bias.
Looking ahead, the similarity between the CIV estimators derived from causal graphs and the lag-augmented local projection IV estimator calls for an extension of causal time graphs to estimate impulse response functions. Causal full time graphs can help strengthen the intuition behind recent results in this literature. To give just three examples: First, local projection IV estimators are found to identify the same impulse response function as a vector autoregressive model with the instrument ordered first~\citep{plagborg-moller_local_2021}~.
Second, local projection IV is found to be robust to misspecification \citep{montiel_olea_double_2024}, which could be related to the lag-augmented local projection IV estimator blocking the same unblocked path multiple times. Third, \citet{montiel_olea_local_2021} prove that for a local projection IV estimator, the use of Eicker-Huber-White heteroskedasticity-robust standard errors is sufficient without further needing to correct for autocorrelation. This result could be because the lagged terms in the conditioning set already sufficiently account for structural and, hence, bias-inducing autocorrelation. Going beyond recent findings, the graphical approach would further provide nonparametric proof, and the CIV criteria allow for a transparent analysis of the validity of the local projection IV estimator under hidden confounding.
Thus, as this paper has shown, the graphical approach is a powerful addition to the toolkit of every economist working with data structured as a time series, with many applications yet to be explored.
\section{Funding}
Researchers from the Hertie School gratefully acknowledge financial support from the German Federal Ministry of Education and Research through the ARIADNE Project (FKZ 03SFK5K0). Lion Hirth is owner and director of Neon Neue Energieökonomik GmbH, an energy economics consulting firm. Oliver Ruhnau is owner and director of tournesol energy GmbH, an energy consulting and software firm.
\newpage
\printbibliography
\newpage
\begin{appendix}
\section{Causal Models for Time Series}
This appendix provides a formal introduction to causal inference for time series. First, we give a formal definition of structural causal models (SCM), followed by an introduction to directed acyclic graphs (DAGs) for time series. Finally, we introduce the concept of marginalization, which is a way to simplify the representation of graphs.
\subsection{Structural Causal Models for Time Series}
\label{sec:appendix_scm}
Let $\{U_{t}^j\}_{t \in \mathbb{Z}, j \in \{1, \dots, d\}}$
be a set of $d$ jointly independent
random error variables.
The index $t$ encodes time, and the index $j$ is the time series component.
For all $j \in \{1, \dots, d\}$ let
$\mathrm{PA}(j) \subseteq \{(k,s) \ \vert \ k \in \{0, \dots, q\}, s \in \{1,\dots, d\}\}$ and $p_j \coloneqq |\mathrm{PA}(j)|$ be the number of elements in $\mathrm{PA}(j)$, and
let
$f^j: \mathbb{R}^{p_j} \times \mathbb{R} \to \mathbb{R}$ be a measurable function.
The sets $\mathrm{PA}(j)$ encode the (causal) parents of $X_t^j$, which we assume do not depend on $t$.
For all $j \in \{1, \dots, d\}$ and all $t \in \mathbb{Z}$ we consider the structural equations
\begin{equation}
\label{eq:scm}
X_t^j \coloneqq f^j\left(\mathrm{PA}(j, t), U_t^j\right),
\end{equation}
where the \emph{parents} of $X^j_{t}$ are defined by $\mathrm{PA}(j, t) \coloneqq (X^{s_1}_{t-k_1}, \dots, X^{s_{p_j}}_{t-k_{p_j}})$
with \linebreak
$\{(k_1, s_1), \ldots, (k_{p_j}, s_{p_j})\} = \mathrm{PA}(j)$,
where the $(k_i, s_i)$ are in lexicographic order.\footnote{This means $(k,s) < (v,g)$ if and only if $k<v$ or $(k=v$ and $s < g)$.}
We further assume that there is a unique solution\footnote{More precisely, we assume that
all solutions induce the same distribution.} to \eqref{eq:scm}
that is weakly stationary and that the process realization is covariance ergodic.
We further assume that the induced distribution
is Markov with respect to the induced graph (see Section~\ref{sec:appendix_graphs}).
For linear functions $f^1, \dots, f^d$, which we consider in this paper, these properties are well-studied
\citep[see, for example,][Theorem 1]{thams_identifying_2022}.
\subsection{Directed Acyclic Graphs for Time Series}\label{sec:appendix_graphs}
We now introduce some standard graph terminology \citep[e.g.,][]{Lauritzen1996, FriedmanKoller:MLJ03, pearl_causality_2009}, adapted to the case of infinitely many nodes.
Let $V \subseteq
\mathbb{Z} \times \{1,\dots,d\}$. A \emph{directed graph} $ \mathcal{G} = (V, E) $ is composed of nodes $V$ (also called vertices) and edges $ E \subseteq V \times V $ with the restriction that
for all $u,v \in V$ either $ (u, v) \not\in E $ or $ (v, u) \not\in E $ or both. We sometimes use the notation $v \to u$, meaning that $(v, u) \in E$.
A \emph{path} in
$\mathcal{G}$ is a sequence of distinct vertices $ v_1, \ldots, v_m $,
such that an edge connects each consecutive pair of vertices.
If $v_k \to v_{k+1}$ for all $k \in \{1,\dots, m-1\}$,
we say that the path is \emph{directed from $v_1 $ to $ v_m $}. A directed path $v_1 \to ... \to v_m$ such that $(v_m, v_1) \in E$ is called a \emph{cycle}.
A directed graph $\mathcal{G}$ is classified as a \emph{directed acyclic graph (DAG)} if it has no cycles.
Because we deal with time series, the structural equations induce a graph with infinitely many nodes, i.e., a \emph{full time graph} \citep{peters_causal_2013} $ \mathcal{G}_{\mathrm{FT}}$ over nodes $V = \{(t,s) \ \vert \ t \in \mathbb{Z}, s \in \{1, \dots, d\}\}$, where we draw an edge from $(t_1,s_1)$ to $(t_2,s_2)$ if $(t_1,s_1) \in \mathrm{PA}(t_2,s_2)$. We assume that the parent sets are such that $\mathcal{G}_{\mathrm{FT}}$ is directed and acyclic.
We say $v \in V$ is a \emph{descendant} of $u \in V$ if $v \neq u$, and there exists a directed path from $u$ to $v$. We denote the set of descendants of $u$ by $\mathrm{DE}(u) \coloneqq \{v \in V \ \vert \ \text{$v$ is a descendant of $u$}\}$.
\subsection{Graph marginalization}
\label{sec:marginalization}
Graph marginalization has been studied extensively
\citep[see, e.g.,][]{Verma1991}. The main idea of graph marginalization is to simplify the graph while keeping the same d-separation statements over the observed nodes. In the context of this paper, we marginalize out the unobserved error term, which causes the endogeneity of prices and quantities (see Figure~\ref{fig:DAG_without_time}).
\begin{figure}[ht]
\centering
\includegraphics[width=0.75\linewidth]{plots/DAG_demand_supply.png}
\caption{
Left: Snapshot of a full-time graph at time point $t$. Right: Marginalized version (see Definition~\ref{def:marginalzed_graph}), at time $t$. The resulting graphical object includes both directed ($\leftarrow$ or $\to$) and bidirected edges $(\leftrightarrow)$.}
\label{fig:DAG_without_time}
\end{figure}
A formal definition of a marginalized time graph is given in \citet{thams_identifying_2022}, which, too, consider graphs with infinitely many nodes.
\begin{definition}\label{def:marginalzed_graph}
Consider a
full time graph
$\mathcal{G}_{\mathrm{FT}}$ over nodes
$V = \{(t,s) \ \vert \ t \in \mathbb{Z}, s \in \{1, \dots, d\}\}$.
Let $M=\{(t_1,i_1), \ldots, (t_m,i_m)\}$ be a finite collection of nodes in $ \mathcal{G}_{\mathrm{FT}}$.
The \emph{marginalized time graph}, $\mathcal{G}_M$, is the graph over nodes $M$ where for all $i, j \in M$ there is:
\begin{enumerate}
\item a directed edge $i \rightarrow j$ if and only if $i \rightarrow j$ in $\mathcal{G}_{\mathrm{FT}}$ or
there exists $m_1 \in \mathbb{N}$, $v_1, \ldots, v_{m_1} \notin M$ and a directed path $i\rightarrow v_1 \rightarrow \cdots \rightarrow v_{m_1}\rightarrow j$ in $\mathcal{G}_{\mathrm{FT}}$, and
\item a bidirected edge $i \leftrightarrow j$ if and only if there exist $m_1, m_2 \in \mathbb{N}$, $v_1, \ldots, v_{m_1}$, $w_1, \ldots, w_{m_2}$, $U\notin M$ in $\mathcal{G}_{\mathrm{FT}}$ such that there exist directed paths $U\rightarrow v_1\rightarrow \cdots v_{m_1}\rightarrow i$ and $U\rightarrow w_1\rightarrow \cdots w_{m_2} \rightarrow j$.
\end{enumerate}
\end{definition}
\section{Details of the two-stage-least-squares estimator}
\label{app:tsls}
Let $T \in \mathbb{N}$ and let $\mathcal{B}, \mathcal{I}, \mathcal{X}$ and $Y$ satisfy (CIV1) to (CIV3). Assume that we have observations at time points $\{1, \dots, T\}$. Let $\{(t_1,s_1), \dots, (t_n,s_n)\} = \mathcal{B}$, where $(t_i,s_i)$ are in lexicographic order. Without loss of generality, assume that $T \in \{t_1, \dots, t_n\}$ and let $k \coloneqq \max \{|t_i - t_j| \ \vert \ i,j \in \{1,\dots, n\}\}$. Define
\begin{equation*}
\mathbf{B} \coloneqq
\begin{bmatrix}
X^{s_1}_{t_1} & \dots & X^{s_n}_{t_n}\\
X^{s_1}_{t_1-1} & \dots & X^{s_n}_{t_n-1}\\
\vdots & & \vdots \\
X^{s_1}_{t_1-T+k+1} & \dots & X^{s_n}_{t_n-T+k+1}
\end{bmatrix}
\end{equation*}
and define $\mathbf{X}, \mathbf{Y}$ and $ \mathbf{I}$ analogously.
Define $r_{\mathbf{I}}$ as the residuals of regressing $\mathbf{I}$ on $\mathbf{B}$ with ordinary least squares and define $r_{\mathbf{X}}$ and $ r_{\mathbf{Y}}$ analogously. Define $P_{\mathbf{I}} \coloneqq r_{\mathbf{I}}({r_{\mathbf{I}}}^{\top}r_{\mathbf{I}})^{-1} r_{\mathbf{I}}^{\top}$ and
\begin{equation*}
\hat{\beta} \coloneqq \left(r_{\mathbf{X}}^{\top} P_{\mathbf{I}} r_{\mathbf{X}} \right)^{-1} r_{\mathbf{X}}^{\top} P_{\mathbf{I}} r_{Y}.
\end{equation*}
This is the closed-form solution to \eqref{eq:civ}. By \citet[Theorem 5]{thams_identifying_2022} $\hat{\beta}$ is consistent for $T \to \infty$.
\section{Additional information on Section~\ref{sec:Simulation}}\label{app:simulation}
\subsection{Additional autocorrelation and error plots for conditional IV}
In Section~\ref{sec:Simulation}, we show that the absolute percentage error of the naive IV estimator $\text{CIV}(W_t|P_t \to D_t|\emptyset)$, which neglects time dependencies, depends on the structural autocorrelation present in both the instrument and the demand equation (see Figure~\ref{fig:heatmap} for empirical results for Model~I). Figure~\ref{fig:heatmap_appendix} shows the corresponding plot for Model~II, where the autocorrelation is induced by the autocorrelated error term with $\beta^{B1}$, and an estimator that conditions on the past of the dependent variable: $\text{CIV}(W_t| P_t \to D_t| D_{t-1})$ (estimator $\#3$). The results for Model~II are consistent with the general findings that the error depends on the underlying structural autocorrelation of both the instrument and the demand.
\begin{figure}[ht]
\centering
\includegraphics[width=0.5\linewidth]{plots/EXP_v108_heatmap_5_years_20_runs_10_linspace_1_windlags_single_appendix_version.pdf}\caption{
Isolines showing the average absolute percentage error of the point estimator as a function of the structural autocorrelation of wind (instrument) and the structural autocorrelation $\beta^{B1}$ of the price-insensitive demand (dependent variable) for estimator $\#3$.
For the simulations, we divide both axes into ten equidistantly spaced autocorrelation coefficients between 0 and 1 each, based on which we run $20$ simulations with five years of data $(T = 43,800)$.
}
\label{fig:heatmap_appendix}
\end{figure}
In Section~\ref{sec:Simulation}, we further argue that knowing the observed level of autocorrelation of demand, e.g., obtained by analyzing the (partial) autocorrelation function, does not suffice to correct the estimation bias: the observed autocorrelation of the demand function is associated with different levels of error for the naive IV estimator $\text{CIV}(W_t| P_t \to D_t| \emptyset)$ (see Figure~\ref{fig:observed_ar}).
Figure~\ref{fig:observed_ar_appendix} extends the same analysis to estimator $\#3$, which conditions on past demand. As expected from the theory, if the estimation model matches the data generation process,
the estimator is unbiased regardless of the observed level of autocorrelation. However, under model misspecification, the same observed level of autocorrelation can be associated with percentage errors ranging from $-300$ MW/(EUR/MWh) to $200$ MW/(EUR/MWh).
\begin{figure}[ht]
\centering
\includegraphics[width=0.5\linewidth]{plots/EXP_v108_observed_ar_5_years_4_runs_100_linspace_CONDITIONAL_DEMAND.pdf}\caption{
The percentage error of the CIV estimator $\#3$ is shown as a function of the observed autocorrelation of demand $\alpha^{D1}$.
In each simulation we vary the structural dependencies: In Models~I and II, the strengths of the structural autocorrelations, $\beta^{D1}$ and $\beta^{B1}$, are both varied between $-0.25$ and $0.99$.
In Model~III, $\beta^{P1}$ is varied between $-250$ MW/(EUR/MWh) and $250$ MW/(EUR/MWh). The color intensity increases in tandem with the aforementioned ranges. For each model, $400$ simulations were conducted, with a sample period of five years $(T = 43,800)$.
}
\label{fig:observed_ar_appendix}
\end{figure}
\subsection{Additional indicator plots for Model~II and Model~III}
In Section~\ref{sec:Simulation}, we have compared the statistical performance of estimators $\#2$,~$\#8$~and~$\#4$ on data generated from Model~I.
Figure~\ref{fig:indicators_model_2} and Figure~\ref{fig:indicators_model_3} compare the performances on data generated by Models~II and~III, respectively. As expected from theory, all estimators maintain coverage regardless of sample size. Estimator $\#8$ tends to have a smaller absolute percentage error and smaller confidence intervals.
\begin{figure}[ht]
\centering
\includegraphics[width=1\linewidth]{plots/EXP_v108_goodness_plot_autocorrelated_error_21_years_50_runs_11_linspace.pdf}
\caption{The performance of valid CIV estimators based on the indicators (a) coverage, (b) percentage error, and (c) length of the confidence interval for Model~II at different sample sizes. The shaded areas represent the $95\%$ confidence interval for the indicators. For each sample size, $ 50$ simulations were run. For data generation, the parameters of the demand equation~\eqref{eq:quantities_partially_unexposed} are set to $\beta^{P} = -100$ MW/(EUR/MWh) and $\beta^{B1} = 0.9$.}
\label{fig:indicators_model_2}
\end{figure}
\begin{figure}[ht]
\centering
\includegraphics[width=1\linewidth]{plots/EXP_v108_goodness_plot_cross_price_21_years_50_runs_11_linspace.pdf}
\caption{The performance of valid CIV estimators based on the indicators (a) coverage, (b) percentage error, and (c) length of the confidence interval for Model~III at different sample sizes. The shaded areas represent the 95\% confidence interval for the indicators. For each sample size, $ 50$ simulations were run. For data generation, the parameters of the demand equation~\eqref{eq:price_cross} are set to $\beta^{P} = -100$ MW/(EUR/MWh) and $\beta^{P1} = + 50$ MW/(EUR/MWh).}
\label{fig:indicators_model_3}
\end{figure}
\subsection{Divergence between CIV estimates for simulated data}
In Section~\ref{sec:CIV-estimation}, we have argued that non-overlapping confidence intervals of presumably valid estimators should lead to model rejection (see also Figure~\ref{fig:simulation_autocorrelated} for data from Model~I).
Figures~\ref{fig:simulation_two_demand_types}~and~\ref{fig:simulation_cross} show the corresponding patterns of CIV estimators for Model~II and Model~III, respectively. The table to the right of the figures shows which estimators are valid according to the CIV criteria.
For Model~II (Figure~\ref{fig:simulation_two_demand_types}), the estimators with a checkmark in column II are valid, and the confidence intervals of the corresponding estimators overlap.
As done by estimator $\#3$, conditioning on lagged demand generally induces a bias as the estimator conditions on a collider. For Model~II, the estimator $\#7$ is a special case: Based on the CIV criteria alone, the estimator is invalid. The estimated effect $P_t \to D_t$ is nevertheless close to the real effect.
\begin{figure}[ht]
\centering
\includegraphics[width=.9\linewidth]{plots/EXP_v108_model_II_application_figure.pdf}
\caption{
CIV estimates of the demand response $\hat{\beta}^P$ when the simulated data does not exhibit structural autocorrelation of demand (Model~II, see Figure~\ref{fig:DAG_demand_variants} (left)). The slope of the price-sensitive demand $\beta^P$ is set to $-100$ MW/(EUR/MWh), and the autocorrelation coefficient of the non-sensitive demand is set to $\beta^{B1}=0.9$.}
\label{fig:simulation_two_demand_types}
\end{figure}
The pattern of estimators we observed in Figure~\ref{fig:simulation_cross} is also consistent with the expectation given the Model~III assumption. If one were to assume Model~III, the researcher does not see much evidence of rejecting that model assumption. However, if, for example, she were to incorrectly assume Model~I, there is evidence that this assumption is false (see, e.g., estimators~$\#2$ and~$\#3$).
\begin{figure}[ht]
\centering
\includegraphics[width=.9\linewidth]{plots/EXP_v108_model_III_application_figure.pdf}
\caption{
CIV estimates of the demand response $\hat{\beta}^P$ when the simulated data represents a cross-price response (Model~III, see Figure~\ref{fig:DAG_demand_variants} (right)). The true effect is $\beta^P = -100$ MW/(EUR/MWh), and the cross-price elasticity is $\beta^{P1} = + 50$ MW/(EUR/MWh), representing substitution. According to theory (see Table~\ref{tab:estimators}), the estimators in column~III should be consistent, and the simulation results support this. In this model, the validity of the estimators extends to both effects: A valid strategy recovers both the own-price response $\hat{\beta}^P$ and the cross-price response $\hat{\beta}^{P1}$.}
\label{fig:simulation_cross}
\end{figure}
$\text{ }$
\section{Additional information on Section~\ref{sec:application}}
\subsection{Data}\label{app:data}
We now describe in more detail the data used in the application.
The main variables are electricity load (MW), electricity price (€/MWh), and, for the instrument, wind generation (MW, including both onshore and offshore generation), all obtained from \citet{entsoe_data}, the European Network of Transmission System Operators for Electricity. ENTSO-E's measurement and reporting of variables is bidding zone-specific. Since October 1, 2018, the bidding zone includes the territory of Germany and Luxembourg. Previously, it also included the territory of Austria.
The data used in our analysis spans from November 1st, 2017, to December 31st, 2020.
In addition to the main variables, several control series are incorporated into the analysis. If the data exists at a daily frequency, we assume the same value for every hour of the day.
\begin{itemize}
\item at hourly frequency:
\begin{itemize}
\item solar PV power generation (from \citet{entsoe_data})
\item surface temperature data for Germany from NASA's MERRA-2 \citep{global_modeling_and_assimilation_office_merra-2_2015}, transformed according to Eurostat's methodology \citep{eurostat_heating_nodate}.
\end{itemize}
\item at daily frequency, all from \citet{investing_commodities_2023}:
\begin{itemize}
\item price of emissions allowances (EUA yearly futures)
\item coal prices (API 2 CIF ARA ARGUS-McCloskey futures)
\item natural gas price (Dutch TTF futures)
\end{itemize}
\end{itemize}
Public holidays and school holidays are two variables constructed as indices based on the fraction of the German population affected by a holiday on a given day, using data from the Federal Statistical Office of Germany (Statistisches Bundesamt Deutschland) for the population by state \citep{destatistis_population_2023}, public holiday dates from Python's 'holidays` package \citep{montel_holidays_2023}, and school holiday dates from \citet{feiertagskalender_school_2023}. However, holidays common to the whole country and resulting in a value of holiday$_t = 1$ (e.g., Easter, Christmas, and the Day of German Unity on October 3rd) are dropped from the dataset. The largest observed value strictly smaller than one equals $0.644$ (three days) and $0.568$ (four days).
We also include the following covariates:
sunlight, indicating whether at a given hour of the year, it is day (1) or night (0) at the geographic center of Germany (at 51\degree09' N, 10\degree26' E) using Python's 'suntime` package \citep{stopa_suntime_2019};
hour of the week (one-hot encoding, 167 variables), month of the year (one-hot encoding, 11 variables), and year (one-hot encoding, four variables).
Figure~\ref{fig:autocorrelation} shows the autocorrelation and partial autocorrelation plots of the instrument and the electricity load after controlling for the control variables. We observe a significant autocorrelation, which is most pronounced for lags 1 and 2 but extends to up to 50 lags, corresponding to more than three days.
\begin{figure}[ht]
\centering
\includegraphics[width=0.8\linewidth]{plots/autocorrelation_plot.png}
\caption{
Autocorrelation function (above) and partial autocorrelation function ({below}) of the residuals of the instrumental time series wind power generation (left), and the residuals of the dependent variable German electricity demand (right). In all four cases, we first regress the original data on the covariates and then obtain the autocorrelation of the residual time series.}
\label{fig:autocorrelation}
\end{figure}
\subsection{Sensitivity analysis for the price elasticity of German electricity demand}\label{app:results_on_off_peak}
In Section~\ref{sec:application}, we assume a homogeneous elasticity across hours. However, structurally different consumers may be active across different hours of the day. In particular, one may expect different consumers during peak and off-peak hours. They could either have different elasticities, or they could also have different dynamic behavior.
We split the data into two periods and perform the same analysis as in Section~\ref{sec:application} on each of the splits: on-peak in Figure~\ref{fig:application_t-1} and off-peak in Figure~\ref{fig:sensitivity_20_to_8}.
The magnitudes of the elasticity estimates (log-log) and the demand response (linear) are comparable. However, the pattern of the estimates is different in the two different splits.
This suggests that nighttime consumption has different dynamics than daytime consumption. Given the observed pattern of estimators, we further have to reject all three proposed simple models.
This calls for carefully considering the model dynamics if one wants to delve deeper into how electricity consumers respond to a high-frequency price signal.
\begin{figure}[ht]
\centering
\includegraphics[width=1\linewidth]{plots/EXP_v108_8_to_20.pdf}
\includegraphics[width=1\linewidth]{plots/EXP_v108_8_to_20_log_log.pdf}
\caption{Own-price elasticity of on-peak German electricity demand, obtained from the CIV estimators given in Table~\ref{tab:estimators} in linear specification (top) and log-log specification (bottom). The highlighted area corresponds to the confidence interval of estimator $\#2$.
The tables on the right are reproductions of Table~\ref{tab:estimators}, showing the validity of each strategy under different structural model assumptions.
On-peak hours refer to the time between 8:00 and 19:59.}
\label{fig:application_t-1}
\end{figure}
\begin{figure}[ht]
\centering
\includegraphics[width=1\linewidth]{plots/EXP_v108_20_to_8.pdf}
\includegraphics[width=1\linewidth]{plots/EXP_v108_20_to_8_log_log.pdf}
\caption{Own-price elasticity of off-peak German electricity demand, obtained from the CIV estimators given in Table~\ref{tab:estimators} in the linear specification (top) and log-log specification (bottom). The highlighted area corresponds to the $95\%$ confidence interval of estimator $\#2$. The tables on the right are reproductions of Table~\ref{tab:estimators}, showing the validity of each strategy under different structural model assumptions.
Off-peak hours refer to the time between 20:00 and 7:59.
}
\label{fig:sensitivity_20_to_8}
\end{figure}
\thispagestyle{empty}
\end{appendix}