Manuscript Offprint
arXiv:2608.26234A causal graph-informed temporal convolution architecture for interpretable retail electricity price forecasting
Abstract
Retail electricity markets in deregulated systems face significant price volatility and complex interactions with forward and futures products, posing challenges for effective operational decision-making. This study introduces a Causal Graph-Informed Temporal Convolutional Network (CG-TCN), a forecasting architecture that integrates a learned causal graph into a temporal convolutional network via a graph-neural embedding to enhance both forecasting accuracy and interpretability of retail electricity price dynamics. The framework first applies a multi-resolution decomposition to isolate semiannual, quarterly, and monthly trends from high-frequency fluctuations. A causal graph is then discovered over these components and key covariates—including wholesale forward prices and retail contract attributes such as early termination fees—using NOTEARS, with domain constraints that preserve causal directionality and exogeneity. The learned causal structure is encoded as an adjacency embedding that conditions the TCN’s convolutions and attention, aligning representation learning with causal pathways. To better capture rare but impactful retail price surges, we use a spike-aware training algorithm that oversamples spike windows and up-weights their errors. Using ten years of daily 12-month fixed-price residential contracts from Ohio’s deregulated market, we find that wholesale forward prices primarily determine long-term retail price trends, whereas contract attributes influence short-term fluctuations. CG-TCN consistently outperforms benchmark models, achieving mean absolute percentage errors of 3.08%, 3.82%, and 5.43% for one-, ten-, and fifteen-step-ahead forecasts of daily retail electricity median prices, respectively. By combining predictive performance with interpretability, CG-TCN provides transparent, policy-relevant insight to support market analytics, consumer protection, regulatory oversight, risk assessment and procurement planning in competitive electricity markets.
Keywords: Electricity price forecasting, explainable artificial intelligence, causal inference, temporal convolutional network, time series decomposition
Preprint submitted to Elsevier
August 28, 2026
1. Introduction
Retail electricity prices play a critical role in shaping both consumer expenditures and supplier strategy in deregulated markets. For households and small businesses, these prices directly determine energy expenditures and influence adoption of efficiency measures, distributed generation, and demand-response programs [1, 2]. For suppliers and policymakers, retail prices serve as signals for market competitiveness, hedging strategies, and the integration of renewable resources [3]. Yet retail prices arise from shifting structural drivers—including wholesale forward prices, regulatory interventions, and evolving contract attributes—that generate pronounced volatility and occasional price spikes. Reliable retail price forecasts are therefore essential for regulators tasked with consumer protection and market participants requiring effective procurement planning and risk management. Equally important, models that uncover causal mechanisms behind price formation can inform robust market design, guide investment, and support a transparent energy transition.
Retail electricity prices in deregulated markets are jointly shaped by wholesale cost conditions and retail market design, yet existing studies largely examine these drivers in isolation rather than within a unified analytical framework. In deregulated retail electricity markets, consumers can choose among contracts offered by multiple competitive suppliers, each featuring different terms and conditions. In Ohio, for example, more than twenty suppliers collectively post nearly one hundred residential electricity contracts per day within each utility service territory, across six territories statewide [3]. Recent studies show that contract attributes such as early termination fees and monthly fixed charges are systematically related to offered prices—higher fees are often associated with lower per-kWh rates [4]. These contract-level features influence retail prices alongside other more structural wholesale market attributes in the broader market (e.g., NYMEX futures, implied volatility) [2]. Wholesale forward prices shape the costs of suppliers (or marketers) that supply competitive retail service and/or procurements through default service known as the “standard service offer” (SSO). The SSO is the default supply rate charged by suppliers and collected on distribution utility bills for non-shopping customers. The SSO often serves as a baseline reference for households evaluating contract options, and in most jurisdictions it is even referred to as a comparison price printed on customer bills. Incorporating both contract-level and market-level drivers is therefore essential for understanding how retail electricity prices are formed. This is of
This comparison price is commonly referred to as the “Price to Compare” (PTC) in Ohio, New York, Pennsylvania, and several other deregulated retail electricity markets.
critical importance in energy markets because there are very few studies of price formation in retail markets, and no present studies evaluating the combined (wholesale and retail) market attributes influencing retail price formation.
Although limited to wholesale markets, a growing body of research has advanced electricity price forecasting and explored linkages between market fundamentals and prices [5, 6, 7]. For example, Wang et al. developed a convolutional neural network–long short-term memory ensembles to forecast day-ahead prices in Japan [8]. Cerasa et al. proposed a filtering strategy to enhance forecasting accuracy in U.S. and European markets by systematically identifying and replacing extreme spikes [9]. Kohút et al. employed recurrent neural networks to forecast wholesale prices across European grids [10]. While these approaches achieve acceptable predictive accuracy, they remain largely “black-box” models, offering limited insight into the mechanisms driving price dynamics. This limits robustness under policy or regime changes and weakens their decision value for procurement and regulation.
As demand grows for interpretability and explainability in machine learning forecasts, researchers have begun to report additional details about model training and feature relevance [5, 11]. Yet much of the literature remains correlation-based, optimizing prediction error or reporting feature importance without establishing directional, invariant relationships among drivers. This limits their ability to generalize under regime shifts or policy shocks. Recent evidence shows that embedding causal structures into forecasting models can improve robustness and interpretability [12, 13]. Unlike feature importance, causal analysis can address confounding and distinguish mediators from true causes. To fill this gap, we propose a Causal-Graph-informed Temporal Convolutional Network (CG-TCN) for the more complicated and policy-relevant and consumer-relevant application of retail electricity price forecasting. Our approach first learns a directed causal graph, and then injects that graph into forecasting via a graph-neural embedding that conditions the TCN, aligning representation learning with hypothesized causal pathways.
A prominent method for causal graph discovery is NOTEARS (Non-combinatorial Optimization via Trace Exponential and Augmented lagRangian for Structure learning) [14]. Traditional approaches such as the Peter–Clark (PC) algorithm (constraint-based) [15] or the Greedy Equivalence Search (GES) algorithm (score-based) [16] often rely on combinatorial searches over graph structures, which scale poorly and can be sensitive to conditional independence tests or scoring heuristics. In contrast, NOTEARS learns a directed acyclic graph (DAG) by solving a smooth, continuous optimization with a differentiable acyclicity constraint, enabling efficient gradient-based optimization while guaranteeing a valid DAG. This property makes NOTEARS particularly attractive for high-dimensional forecasting problems, where correlated drivers and latent common shocks can obscure true directional relationships.
In this study, we employ NOTEARS to infer the causal graph among retail electricity price drivers while imposing economically motivated domain constraints. Specifically, the retail price target is restricted from acting as a parent node, preventing implausible feedback loops in which future prices influence upstream drivers. This restriction ensures that inferred relationships reflect economically meaningful drivers of price formation rather than reverse causation. In addition, exogenous variables—such as wholesale forward prices and time features—are constrained to remain exogenous, disallowing incoming edges from retail or contract-level variables. These constraints encode basic economic structure, reflecting the fact that wholesale market conditions and institutional calendars shape retail pricing decisions but are not themselves determined by individual retail contracts or observed price realizations. By incorporating such domain knowledge, the learned causal graph becomes more stable, interpretable, and economically coherent, filtering out spurious correlations that arise from shared trends or temporal persistence. The resulting structure then serves as an inductive bias for our CG-TCN, aligning temporal representation learning with hypothesized causal mechanisms underlying retail electricity price formation.
In parallel, time-series decomposition techniques have proven valuable for improving electricity price forecasts, though many applications treat decomposed components as purely statistical artifacts and do not explicitly link them to underlying economic mechanisms. In this study, we employ causal, one-sided multi-resolution decompositions based on Seasonal–Trend decomposition using Loess (STL) and a parametric filter-bank approach, which we refer to as a Temporal Smoothing Network (TSN)—a deterministic, multi-scale bank of causal smoothing filters rather than a learned neural network-to extract horizon-specific components from retail electricity prices in real time. Electricity prices are known to exhibit multi-scale seasonality and structural patterns that correspond to distinct economic drivers—for example, long-term seasonal and trend components have been shown to improve forecasting accuracy when modeled separately from stochastic fluctuations of the price series, capturing persistent economic forces beyond short-run noise [17]. These components correspond naturally to distinct economic processes operating at different temporal scales: longer-horizon trends (e.g., semiannual and quarterly) reflect supplier procurement cycles, forward contract rollovers, and regulatory adjustments, while shorter-horizon components capture contract price updates and adjustments, promotional behavior, intra-firm competition, and high-frequency variation in posted retail prices. By constructing these components using only past information and feeding them into the causal graph discovery stage, we explicitly disentangle price formation mechanisms across horizons, stabilize estimation under nonstationarity, and enable economically interpretable attribution alongside accurate forecasts.
Figure 1 presents an overview of the proposed CG-TCN framework. In the first module, the retail electricity price series is decomposed into multiple temporal components—including semiannual, quarterly, and monthly trends, as well as short-term fluctuations. Next, a causal graph is discovered over these components and related market and contract features using the NOTEARS algorithm, capturing directional dependencies as a learned adjacency embedding. Finally, the causal embedding conditions a TCN, which models temporal dynamics while respecting the causal structure. The result is a unified pipeline that couples multi-scale decomposition, causal discovery, and neural forecasting to achieve accurate and interpretable, mechanism-aware price predictions.
Specifically, the proposed framework contributes to the literature in four key ways:
(1) We introduce a flexible one-sided causal multi-resolution decomposition framework based on STL and TSN that extracts interpretable temporal components of retail electricity prices in real time, capturing the dominant temporal dynamics that drive forecasting performance.
(2) We develop a causal discovery stage that identifies directional relationships between contract attributes, market fundamentals, and decomposed price components, and leverages these causal links to enhance predictive performance.
(3) We introduce a novel approach, CG-TCN, that combines the predictive strength of neural networks with the interpretability of causal inference. To our knowledge, this is the first approach that injects a learned causal DAG into a TCN through a graph-neural embedding, aligning convolutional representations with causal pathways for applications in retail electricity price forecasting.
(4) We incorporate and tailor a spike-aware algorithm designed to improve the model's forecasting performance during extreme price spike periods. The algorithm increases the representation of spike windows during training and applies a higher loss penalty to errors within these intervals, ensuring the model learns to better capture abrupt price surges.
(5) We demonstrate the proposed method on a comprehensive database from Ohio containing every daily retail choice offer filed by every retail supplier in every service territory for a decade. This demonstrates state-of-the-art forecasting accuracy and interpretable attributions across multiple horizons.
The remainder of the paper is organized as follows. Section 2 introduces the proposed CG-TCN
Module 1: Causal Decomposition
Retail electricity prices
Semiannual trend
Quarterly trend
One-Sided causal decomposition
Monthly trend
Fluctuation
Related Factors
Wholesale electricity market prices
Retail contract information
Module 2: Structural Learning

• Casual graph discovery
• Domain constraints enforced
Module 4: Temporal Dynamics Modeling

Output
d = 4
Hidden
d = 2
Hidden
d = 1
Input
...
Forecasting Results
(a) Price Component
(b) Final Price

Module 3: Graph Embedding
GNN Learned Effective Adjacency Matrix

Target nodes
Causal Inference
(a) Causal DAG
(b) Temporal Causality

• Interpretability
• Mechanism-aware attributions
Fig. 1. Overview of the proposed CG-TCN framework. Module 1: One-sided decomposition framework first decomposes retail electricity prices into multi-resolution components. Module 2 & 3: NOTEARS then discovers a causal graph over these components and covariates, which is encoded as an adjacency embedding. Module 4: The learned causal structure guides the TCN to generate accurate forecasts and interpretable, mechanism-aware attributions.
architecture and training. Section 3 describes data and variables. Section 4 reports the empirical results and forecasting performance. Section 5 discusses the main findings, interpretability, and policy implications. Section 6 concludes with a summary of contributions and directions for future research.
The core methodological contribution is a DAG-conditioned temporal forecaster. We first estimate a sparse, directed causal graph over decomposed price components and covariates using a score-based discovery procedure with a differentiable acyclicity constraint. Domain rules are enforced so that targets do not act as parents and exogenous inputs remain exogenous, aligning the graph with economic directionality. This learned graph is then injected into the forecaster through a graph-neural embedding that aggregates information only along parent links and produces node-wise “causal features”. These causal features condition the temporal convolutions via feature fusion and channel-wise gating, so that signals arriving along plausible causal pathways receive higher gain during forecasting. The graph is fixed during training, but the conditioning is data-adaptive through learned weights.
To supply horizon-specific signals and reduce mode mixing, the observed retail price is decomposed into semiannual, quarterly, monthly, and high-frequency components, and these, together with market and contract covariates, enter both causal discovery and forecasting. A temporal convolutional backbone with dilated causal convolutions extracts long- and short-range lagged dependencies while preserving strict chronological order and using parameters efficiently at the available data scale. Fusing the graph-neural causal features with temporal features unifies structural and temporal causality in a single predictive representation.
Retail prices contain rare but consequential spikes. Training balances routine periods and stress periods through a spike-aware scheme that oversamples spike windows and increases their loss contribution while renormalizing batch weights for stability. The objective uses a robust pointwise discrepancy with component weights to emphasize accuracy on the most decision-relevant parts of the signal.
The framework yields decision-grade interpretability outputs: the learned causal graph that reflects cross-variable structure, the effective adjacency learned inside the forecaster that shows how the model actually routes information, and temporal saliency maps by target component and lag. Together, these interpretability outputs explain which drivers govern long-horizon trends versus short-term fluctuations and when those influences matter most, supporting procurement timing, hedging design, and policy evaluation in deregulated retail markets.
Figure 2 provides an overview of the proposed architecture, illustrating how each component contributes to interpretable and high-accuracy retail price forecasting.

Fig. 2. The framework of the proposed CG-TCN model.
The subsections that follow detail each stage in turn—multiscale decomposition of the price signal, domain-constrained causal graph discovery, graph-neural conditioning of the temporal convolutions, and the spike-aware training and interpretability outputs that complete the framework.
2.1. Causal multi-scale time series decomposition
Retail electricity markets in deregulated systems exhibit pronounced price volatility and complex interactions with wholesale forward and futures markets, resulting in nonstationary and nonlinear price behavior [18]. These characteristics make it difficult for a single forecasting model to capture all underlying temporal patterns effectively. To address this challenge, we decompose the original price series into interpretable subcomponents at multiple temporal scales and use these as structured inputs for causal graph discovery and forecasting.
A key requirement in our application is real-time implementability: at any time t, the decomposition must use only information available up to t (i.e., be one-sided or causal), rather than relying on future observations [19]. We therefore construct two alternative causal multi-scale decompositions of the daily retail price series, denoted : (i) a nonparametric method based on a trailing-window adaptation of STL [20], and (ii) a parametric method based on a bank of causal Butterworth low-pass filters, which we refer to as TSN [21, 22]. Both methods yield semiannual-, quarterly-, and monthly components, plus a high-frequency fluctuation term.
2.1.1. Causal STL-based multi-scale decomposition
Let denote the daily retail electricity price for a given utility region. For a given temporal scale with characteristic horizon H (e.g., long-, medium-, or short-horizon), we define a trailing window as:
where is a window length proportional to (e.g., ). Applying the classical Seasonal–Trend decomposition using Loess (STL) to yields:
where is a smooth trend component, is a seasonal component, and is the remainder. Because STL is applied only to past observations, the final trend estimate depends exclusively on and can therefore be interpreted as a causal low-frequency estimate at time .
To reduce computational cost and stabilize the estimated trend, we evaluate STL only at a sparse set of anchor times, defined as:
where denotes a fixed stride (e.g., weekly). At each anchor time , STL is applied to the trailing window , and the corresponding low-pass estimate is defined as:
For times between anchors, the full low-frequency series is obtained by linear interpolation between adjacent anchor values. This procedure yields a one-sided, real-time low-frequency component at scale while substantially reducing computational burden and preserving the interpretability of STL-based trend extraction.
In the empirical application, we consider three nested horizons , corresponding approximately to semiannual, quarterly, and monthly dynamics. The associated low-pass trends
are combined into band-limited components via differencing:
Quarterly component:
Short-horizon component:
High-frequency fluctuation:
This construction yields the additive decomposition:
where each component is updated in real time and depends only on information available up to time t. In the implementation, we set to correspond approximately to semiannual, quarterly, and monthly behavior, and use robust STL with linear trend and seasonal components.
2.1.2. Causal TSN decomposition
As a parametric benchmark, we implement an alternative causal multi-scale decomposition based on a bank of digital Butterworth low-pass filters. Let denote the daily retail electricity price series, sampled at frequency cycle per day. For each cutoff horizon , we design a th-order Butterworth low-pass filter with normalized cutoff frequency defined as:
corresponding to attenuation of fluctuations with characteristic periods shorter than H. Applying the filter in causal (forward) form yields the following recursion:
where denote the filter coefficients. Because the recursion involves only current and past observations, the resulting low-pass component is strictly one-sided and implementable in real time.
Using the same nested horizons as in the STL-based approach, we form band-limited components by differencing successive low-pass outputs:
Quarterly component:
Short-horizon component:
High-frequency fluctuation:
This yields the following additive decomposition:
which is linear and time-invariant. Unlike STL, this construction imposes an explicit frequency-domain structure and therefore provides a complementary, fully parametric perspective on multi-scale dynamics.
Together with the STL-based method, the TSN decomposition yields a collection of causal, horizon-specific components summarizing the retail electricity price series at semiannual, quarterly, monthly, and high-frequency scales. These representations are used as inputs for downstream causal graph discovery and forecasting.
To assess the impact of decomposition choices, we evaluate several combinations of horizon lengths. Because these window lengths affect the smoothness, phase lag, and predictive usefulness of the resulting components, we compare one-step-ahead forecasting performance across all settings. The full results are reported in Appendix D. The best-performing horizon settings are therefore used in all subsequent experiments.
2.2. Causal graph discovery
While the decomposition step effectively captures temporal heterogeneity, it does not explain why certain price movements occur or how different factors interact to generate them. To address this limitation, we incorporate a causal discovery stage that uncovers the structural dependencies among decomposed price components and exogenous covariates. Graph-based representations provide a natural framework for analyzing such complex systems: nodes denote variables, and directed edges represent potential causal influences. In particular, DAGs are well suited for modeling electricity market dynamics, as they encode directional and non-cyclic relationships consistent with economic causality (e.g., wholesale price shocks influencing retail contract adjustments). By learning the structure of a DAG directly from observational data, we can identify the underlying mechanistic pathways that drive retail price formation. This enables the model to move beyond correlation-based associations toward interpretable, causally grounded insights.
Formally, let denote the data matrix consisting of observations of -dimensional random vector . concatenates the multiscale price components (semiannual, quarterly, monthly, fluctuation) and covariates (e.g., forward price, SSO, contract fees, calendar dummies). Our objective is to learn a DAG , where is the space of DAGs with nodes, that best models the joint distribution [23]. To achieve this, we adopt a structural equation model (SEM) of the form:
where is the weight vector encoding the influence of parent variables on and is an independent noise term. Let denote the weighted adjacency matrix. The binary adjacency matrix is then defined as:
which induces a directed graph .
The goal is to estimate W such that the resulting graph lies in the DAG space D. This can be posed as the following optimization problem:
where is a score function defined by a least-squares loss and an -regularization term:
Here, denotes the least-squares loss, is the Frobenius norm, and encourages sparsity of the adjacency matrix.
The acyclicity constraint is enforced through a smooth continuous characterization, the NOTEARS algorithm [14], allowing the problem to be solved using gradient-based optimization rather than discrete search. To align the learned structure with economic directionality and reduce spurious links, we impose a fixed edge mask that prunes prohibited relationships during optimization: (i) forecasting targets are not permitted as parents; (ii) exogenous inputs (forward price, SSO, calendar dummies) are sources (no incoming edges); and (iii) redundant edges among purely time-index indicators are disallowed. The NOTEARS algorithm iteratively updates the weighted adjacency matrix W by computing the gradient of the objective function, applying a soft-thresholding operator to promote sparsity, and ensuring acyclicity through a differentiable penalty term. Convergence is determined when changes in either W or the objective function fall below a tolerance threshold. After convergence, a post-processing step is applied to prune weak edges by thresholding small weights to zero. This continuous optimization framework enables NOTEARS to efficiently learn DAG structures at scale, achieving accurate causal discovery without resorting to combinatorial search procedures. The resulting weighted, sparse adjacency serves as a causal prior that will be encoded in the forecasting model, enabling the downstream network to privilege information flow along discovered structural pathways.
2.3. Graph neural network with causal embedding
To capture the structural dependencies revealed by the causal graph, we incorporate a GNN layer that explicitly propagates information along the edges of the learned adjacency matrix [24, 25]. This design allows the temporal forecasting model not only to exploit time-series dynamics, but also to embed domain-specific causal relationships between variables- for example, allowing wholesale electricity prices to influence retail price components while preventing information flow in the reverse direction. This layer is the vehicle for our DAG-to-forecaster infusion: a graph learned in the discovery stage is converted into a direction-aware embedding that later conditions the temporal convolutions, thereby coupling structural and temporal causality inside a single predictor.
Let denote a batch of input time series with batch size , sequence length , and variables. From the causal discovery stage, we obtain a weighted adjacency matrix , where each entry is defined as:
representing the causal influence of variable j on variable i. To ensure that each node aggregates information evenly from its parents, we normalize the adjacency matrix as:
where is the in-degree diagonal matrix. This normalization ensures that the update for each node corresponds to an average over its causal parents. During training and evaluation, a fixed edge mask consistent with the discovery-stage domain rules is applied to A (and thus to ), guaranteeing that prohibited relations remain inactive and that information propagates only along economically admissible directions.
Given the normalized adjacency and hidden features H, the GNN layer first computes an intermediate update:
where and are learnable weight matrices for parent-aggregated and self-updates, respectively, b is a learnable bias, and are scalars learned during training that balance the contribution of parent and self-features. The final node representation is then obtained by applying a residual connection, nonlinearity, and normalization:
where is a leaky-ReLU activation and normalization is applied for stability.
To form a compact representation, we aggregate node-level embeddings into a causal embedding by averaging across variables:
where is the number of variables (nodes) and denotes the embedding of node . The resulting summarizes how each variable is influenced by its causal parents at time , with denoting the output feature dimension of the GNN layer. Because is computed from the current temporal context while the graph is fixed within a fold, is time-varying and reflects context-dependent amplification of parent signals consistent with the learned structure.
This causal embedding serves two critical roles in the overall framework. It injects the discovered causal structure into the latent representation, ensuring that information flow within the model respects domain-relevant directionality rather than arbitrary correlations. While the TCN captures sequential dependencies, the causal GNN captures cross-variable dependencies, producing an embedding that bridges structural and temporal learning. In the next subsection, this embedding is fused with temporal features and used to gate convolutional channels, so that features aligned with discovered structural pathways are given higher effective gain during forecasting. Together, these mechanisms allow the CG-TCN to learn representations that are not only predictive but also interpretable in terms of causal mechanisms, revealing how wholesale electricity market prices or retail contract information propagate through the price formation process.
2.4. Temporal convolutional network and feature fusion
The temporal convolutional network (TCN) is responsible for capturing sequential dependencies in the input series [26, 27]. Unlike standard convolutions, the TCN employs dilated causal convolutions, which expand the receptive field without increasing the number of parameters and ensure that predictions at time t depend only on information available up to t-1. The TCN consists of a stack of one-dimensional causal convolutional blocks with exponentially increasing dilation factors and residual connections. Each block applies convolution, nonlinearity, normalization, and dropout, yielding an effective receptive field that spans the longest decomposition horizon (semiannual) while maintaining sample efficiency.
Formally, given an input sequence , the TCN produces a sequence of temporal feature representations:
where denotes the stacked dilated causal convolutional operations and . We use the feature vector at the most recent time step, , as a summary of historical temporal patterns.
In parallel, a graph neural network (GNN) processes the learned causal adjacency matrix to produce a causal embedding that summarizes structural dependencies among decomposed price components and exogenous drivers at time . To integrate temporal and structural information, we fuse these representations through feature concatenation:
where combines temporal dynamics (“what happened”) with structural context (“why it happened”).
The fused representation is then passed to a forecasting head implemented as a two-layer multilayer perceptron (MLP) with a nonlinear activation and dropout regularization. This head projects the fused features onto the output space to produce multi-step forecasts of the decomposed price components:
where contains the predicted semiannual, quarterly, monthly, and high-frequency fluctuation components over horizon .
Finally, the overall retail electricity price forecast is reconstructed by summing the predicted components at each horizon:
This fusion strategy allows the model to jointly leverage temporal persistence captured by the TCN and structural dependencies encoded by the causal graph, without imposing additional parametric constraints on their interaction. Ablation results in Section 4.6 confirm that incorporating causal embeddings alongside temporal features substantially improves forecasting accuracy and stability compared to purely temporal baselines. Because the causal embedding encodes structural dependencies among decomposed price components and exogenous drivers, the component-level outputs yield actionable attributions—for example, wholesale market signals dominating long-horizon components and contract attributes shaping high-frequency behavior—thereby clarifying the mechanisms underlying each forecasted price movement.
2.5. Weighed loss function
Forecasting retail electricity prices is particularly challenging because forecast errors over time are highly asymmetric: most days exhibit relatively stable price patterns with small errors, while infrequent spike events generate disproportionately large errors and contribute outsized system risk and consumer costs. Standard loss functions that weight all samples equally tend to bias models toward fitting the majority of stable observations, at the expense of accuracy during these rare but consequential spike events. To address this imbalance, we design a weighted loss function that jointly accounts for multi-resolution price components and explicitly emphasizes spike windows during training.
Our objective couples a component-weighted, sample-weighted loss with a robust pointwise discrepancy. Let denote the model prediction and the ground truth. Each target is decomposed into components (semiannual trend, quarterly trend, monthly trend, fluctuation). For single-step forecasting, let and be the prediction and label of sample for component . For multi-step forecasting with horizon , we index the step by and write .
We use the Smooth L1 discrepancy with unit threshold [28],
This formulation is less sensitive to outliers than mean squared error (MSE) and more stable than mean absolute error (MAE). For small errors, the loss is quadratic, behaving like MSE and providing smooth gradients for stable convergence. For large errors, the loss is linear, behaving like MAE and making the model more robust to outliers such as extreme price spikes.
Let be learnable or user-set component weights. For single-step training, the per-sample component-weighted loss is defined as:
For multi-step training, we average across the horizon:
To further address the imbalance induced by rare but impactful price spikes, we incorporate a sample-weighting scheme that explicitly amplifies the contribution of spike windows during training. This issue has been widely documented in electricity price forecasting, where spikes are recognized as key drivers of financial risk and forecasting error [29, 30]. Implementation details of the spike-aware algorithm, including spike detection criteria, window construction, and diagnostics on spike frequency, are reported in Section Appendix C.
Specifically, each sample i receives a weight . Inside each batch, we normalize these weights to ensure scale-invariance:
where B is the batch size. The final batch loss is the weighted mean of per-sample losses:
This weighted loss design balances three objectives: (i) robustness, since the Smooth L1 loss adapts between MSE-like and MAE-like behavior; (ii) interpretability, by allowing component-specific weights to emphasize different decomposition modes; and (iii) event emphasis, by assigning higher weights to spike windows without destabilizing training through batch-wise normalization. Together, these elements yield more stable optimization and improved predictive accuracy, especially in the presence of volatility and price spikes.
3. Data
We evaluate the proposed CG-TCN framework using a newly constructed, comprehensive database of residential retail electricity contracts from Ohio's deregulated electricity market. All competitive retail electricity supply offers in Ohio are required to be filed by registered Competitive Retail Electric Service (CRES) suppliers with the Public Utilities Commission of Ohio (PUCO) through an official regulatory web portal and are made publicly available to consumers via a daily retail choice marketplace. Leveraging this regulatory requirement, we built a contract-level relational database containing the full universe of residential retail electricity offers filed with PUCO between January 2014 and December 2023. Unlike commonly used aggregated datasets (e.g., utility-level or EIA summaries), these data capture consumer-facing retail prices and contractual terms as they are posted in real time, enabling a detailed analysis of retail price formation and forecasting at a level of granularity that is rarely available in the literature.
From the perspective of residential energy affordability and social welfare, contract prices (cents per kWh) are the primary outcome of interest. In addition to posted prices, the database includes rich contract-level attributes such as fixed monthly fees, early termination fees, contract duration, rate structure, and renewable content where applicable, along with other retail design features. We further integrate market-level information, including wholesale forward electricity prices and default utility service rates. Combining these dimensions allows the model to jointly capture supplier pricing behavior, contractual heterogeneity, and broader market conditions, thereby enhancing both predictive accuracy and economic interpretability.
Ohio operates one of the largest and most robust deregulated retail electricity markets in the United States. Its retail choice operations are expansive, on par with or exceeding states like Texas and Pennsylvania. Over the past decade, approximately one hundred residential electricity offers with heterogeneous contract terms have been published daily by more than twenty competitive suppliers within each of the state's six electric distribution utility service territories. In this study, we focus on the Duke Energy Ohio service territory. This is the service area represented by the greater Cincinnati metro area and outlying regions. Prior work has indicated that retail supply offers in the Duke territory exhibit particularly pronounced pricing heterogeneity and strategic supplier behavior, making it a well-suited testbed for evaluating the proposed methodology. At the same time, the Duke territory provides a representative and policy-relevant empirical setting for studying retail price formation [3, 4]. Using Duke Energy Ohio data, we construct two daily price series for 12-month fixed residential contracts over the period from January 21, 2014, to December 31, 2023: the daily median price and the daily minimum price. The median price reflects the central tendency of available offers on a given day and serves as a representative measure of typical market pricing faced by residential consumers. In contrast, the daily minimum price captures the lowest available contract price observed each day, representing the best-case option accessible to price-sensitive consumers and providing insight into the lower bound of market competition.
Unless otherwise stated, the empirical analysis and results discussion primarily focus on the median price series, as it offers a representative and policy-relevant benchmark for assessing overall market dynamics and forecasting performance. The minimum price series is analyzed in parallel to evaluate model robustness under more volatile and extreme pricing conditions. Both series are independently divided into training (85%) and testing (15%) subsets. To preserve temporal ordering, time-series cross-validation is applied within the training period for model selection, and final model performance is evaluated on the held-out test set. Table 1 summarizes the sample periods and data splits, while Figure 3 and Table 2 present the corresponding time-series trajectories and descriptive statistics. Details of the time-series cross-validation procedure are provided in Appendix B.
Table 1: Description of daily aggregated retail electricity price series.
| Dataset | Subset | Period | # Days (aggregated) | Proportion |
|---|---|---|---|---|
| MinPrice | Training set | 2014-01-21 – 2022-07-15 | 3088 | 85% |
| Test set | 2022-07-16 – 2023-12-31 | 534 | 15% | |
| All | 2014-01-21 – 2023-12-31 | 3622 | 100% | |
| MedianPrice | Training set | 2014-01-21 – 2022-07-15 | 3088 | 85% |
| Test set | 2022-07-16 – 2023-12-31 | 534 | 15% | |
| All | 2014-01-21 – 2023-12-31 | 3622 | 100% |
Note: Each daily observation corresponds to a median or minimum price computed from multiple underlying residential retail electricity contract offers. The full dataset contains over two million individual contract observations.

Fig. 3. Time series of daily median and minimum retail electricity prices.
Building on this framework, we operationalize the covariates using two groups of price-relevant factors: a) retail suppliers' individual contract attributes, and b) market conditions. These are also combined with calendar-based time features, as summarized in Appendix A. Contract attributes include the fixed monthly fee (USD) and the early termination fee (USD). Market variables comprise two key explanatory features. First, we use the power forward (or futures) price that clears on the very same day as each contract's date of origination. These data come from S&P Market Intelligence, and we utilize power forwards for PJM's West Hub, which is the proximate power trading hub for the wholesale market for the Duke service territory and the most liquid trading hub in PJM. The wholesale forward strips are aligned to the 12-month delivery horizon of each
Table 2: Statistical information of the daily retail electricity prices.
| Dataset | Subset | Mean | Standard deviation | Minimum | Median | Maximum | Range | Skewness | Kurtosis |
|---|---|---|---|---|---|---|---|---|---|
| MinPrice | Training set | 5.0407 | 1.0035 | 3.4900 | 4.9900 | 10.0900 | 6.6000 | 1.4879 | 5.8515 |
| Test set | 6.7210 | 2.1125 | 0.0000 | 5.7900 | 10.0900 | 10.0900 | -0.2667 | 0.4037 | |
| All | 5.2643 | 1.3953 | 0.0000 | 5.0900 | 10.0900 | 10.0900 | 1.1261 | 3.8409 | |
| MedianPrice | Training set | 6.4306 | 1.0942 | 5.1900 | 6.2300 | 13.1900 | 8.0000 | 3.7000 | 18.4269 |
| Test set | 8.5989 | 2.0257 | 6.5350 | 7.2900 | 12.0900 | 5.5550 | 0.6055 | -1.3759 | |
| All | 6.7438 | 1.4795 | 5.1900 | 6.2900 | 13.1900 | 8.0000 | 2.4910 | 6.3449 |
Note: Price statistics are reported in cents per kilowatt-hour ($¢/kWh). Each daily observation corresponds to an aggregated retail price (median or minimum) computed from multiple underlying residential contract offers.
day's offers and converted from dollars per megawatt hour to cents per kWh (see Appendix A.1 for strip definitions, averaging rules, and unit conversions). Additionally, calendar indicators capture day-of-week effects, monthly seasonality, and U.S. federal holidays. All covariates are aligned at a daily frequency and merged with the corresponding price aggregates.
4. Results and Discussions
4.1. Experimental design
4.1.1. Evaluation metrics
To evaluate forecasting performance, we use a set of widely adopted error and fit metrics, including mean absolute error (MAE), mean squared error (MSE), root mean squared error (RMSE), mean absolute percentage error (MAPE), normalized root mean squared error (NRMSE), and , which are defined as:
where is the predicted value of the actual value , and T is the time scope of the test set. The model performs better when MAE, MSE, RMSE, MAPE, and NRMSE are lower, and is higher.
4.1.2. Baseline methods
For comparison, we introduce several candidate models to evaluate the performance of the proposed CG-TCN.
(1) RF: Random Forest is an ensemble learning method that constructs multiple decision trees and aggregates their outputs to improve predictive accuracy. For time series forecasting, it requires reframing the sequential data as a supervised learning task [31].
(2) XGB: XGBoost (eXtreme Gradient Boosting) is a scalable and efficient implementation of gradient boosting. It builds trees sequentially, where each tree corrects the errors of the previous ones, resulting in strong predictive performance and robustness [32].
(3) AR: The Autoregressive (AR) model predicts the current value of a time series using a linear combination of its past values, making it a simple yet effective baseline for temporal dependence [33].
(4) LSTM: Long Short-Term Memory (LSTM) is a recurrent neural network architecture designed to capture both short- and long-term dependencies in sequential data. It employs memory cells with input, output, and forget gates to regulate the flow of information, enabling accurate time series forecasting [34].
(5) TCN: The Temporal Convolutional Network (TCN) is a deep learning architecture for sequential data that applies causal and dilated convolutions to capture long-range dependencies. By preserving the temporal order and enabling parallel computation, TCNs provide efficient and accurate time series forecasting [35]. This baseline receives the same inputs as CG-TCN but without any causal graph conditioning.
(6) MTGNN: The Multivariate Time Series Graph Neural Network (MTGNN) integrates graph learning, graph convolution, and temporal convolution to jointly model spatial and temporal dependencies in multivariate time series [36]. We use its built-in graph learning; no external DAG is injected, ensuring a clean contrast with our DAG-conditioned approach.
(7) Autoformer: Autoformer is a Transformer-based forecasting model that introduces a decomposition architecture and an Auto-Correlation mechanism, enabling it to capture both seasonal-trend components and long-range temporal dependencies effectively [37]. Encoder-decoder depths and moving-average factors in this model are tuned via Optuna.
(8) CTCN: The Causal Temporal Convolutional Network (CTCN) extends the Temporal Convolutional Network by embedding causal inference into its structure. Using dilated causal convolutions, it ensures predictions rely only on past information, while adaptive group LASSO penalties on input weights identify nonlinear Granger causal relationships among variables. This design enables CTCN to achieve both accurate time series forecasting and interpretable causal discovery [38]. CTCN receives the same inputs but does not use a pre-learned, domain-constrained DAG; this serves as the closest causal baseline to isolate the incremental value of our DAG-to-TCN conditioning.
4.2. Time series decomposition results
An appropriate decomposition of retail electricity price series is essential for forecasting applications, as prices exhibit strong nonstationarity, nonlinear dynamics, and scale-dependent variability. To address these features, we apply causal multi-scale time series decomposition directly to the observed price data, separating long-run trends from intermediate cycles and short-term fluctuations.
Figure 4 presents the causal STL-based decomposition of daily retail electricity median prices, using trailing windows of 180 days for the semiannual trend, 60 days for the quarterly component, and 20 days for the monthly component. The extracted semiannual trend captures gradual market-wide price movements, while the quarterly and monthly components reflect evolving seasonal patterns and transient deviations. The high-frequency fluctuation term isolates short-lived shocks and noise, demonstrating the ability of the STL-based approach to flexibly represent nonlinear dynamics in median retail prices.
Figure 5 shows the corresponding causal TSN decomposition applied to daily retail electricity minimum prices, using comparable cutoff horizons of 180, 60, and 10 days. The semiannual component highlights persistent low-price regimes, whereas the quarterly and monthly components capture more abrupt cyclical movements and rapid adjustments that are characteristic of minimum-price series. The fluctuation component reveals sharp, short-lived price drops and spikes, which are more pronounced for minimum prices due to competitive pricing behavior and promotional offers.
Overall, the two decompositions illustrate that retail electricity prices exhibit distinct dynamics across temporal scales and price definitions. The resulting multi-scale components are interpretable in the sense that each corresponds to a clearly defined time horizon and contributes additively to observed prices, allowing variation to be directly attributed to long-run trends, intermediate cycles,

Fig. 4. Causal multi-scale decomposition of retail electricity daily MEDIAN prices using STL (180-60-20 windows).

Fig. 5. Causal multi-scale decomposition of retail electricity daily MINIMUM prices using TSN (180-60-10 windows).
or short-term fluctuations. These horizon-specific features are therefore well suited for downstream forecasting and causal analysis in retail electricity markets.
4.3. Forecast accuracy and stability
Table 3 reports the forecast performance of alternative models for retail electricity daily median prices. Overall, the proposed CG-TCN model achieves strong and consistent performance across all evaluation metrics, with low MAE (0.2685), MSE (0.1302), and RMSE (0.3609), as well as a small NRMSE (6.49%) and a high coefficient of determination (). Among the benchmark models, Autoformer delivers slightly lower MAE and MAPE, but exhibits higher RMSE and lower overall stability. MTGNN also performs competitively, though with larger errors across all metrics. In contrast, conventional machine-learning models such as RF and XGB exhibit substantially higher forecast errors and limited explanatory power, while the classical AR model performs poorly with a negative . Deep learning baselines including LSTM, TCN, and CTCN improve upon the machine-learning approaches but remain less accurate than CG-TCN. Overall, these results indicate that incorporating causal graph information into temporal convolutional networks yields robust gains in forecasting median retail electricity prices. Details of the hyperparameter optimization procedure and the selected configurations for CG-TCN and baseline deep-learning models are provided in Appendix E.
Table 3: Forecast results of retail electricity daily MEDIAN prices.
| Model | MAE | MSE | RMSE | MAPE | NRMSE | |||
|---|---|---|---|---|---|---|---|---|
| CG-TCN | 0.2685 | 0.1302 | 0.3609 | 3.08 | % | 6.49 | % | 0.9648 |
| Autoformer | 0.2437 | 0.1710 | 0.4135 | 2.53 | % | 6.21 | % | 0.9627 |
| MTGNN | 0.3196 | 0.2743 | 0.5238 | 3.33 | % | 7.87 | % | 0.9402 |
| RF | 0.7761 | 1.3439 | 1.1593 | 117.32 | % | 10.97 | % | 0.3536 |
| XGB | 0.7947 | 1.3842 | 1.1765 | 138.52 | % | 11.13 | % | 0.3343 |
| AR | 1.3265 | 2.9334 | 1.7127 | 170.01 | % | 16.21 | % | -0.4108 |
| LSTM | 1.0135 | 1.8168 | 1.3479 | 183.31 | % | 12.75 | % | 0.1313 |
| TCN | 0.8620 | 1.2352 | 1.1114 | 177.73 | % | 10.52 | % | 0.4094 |
| CTCN | 0.5935 | 0.7305 | 0.8547 | 250.51 | % | 8.09 | % | 0.6877 |
Table 4 summarizes the corresponding forecast results for retail electricity daily minimum prices.
Because the minimum-price series contains zero values, the MAPE is not reported, as it becomes undefined or unstable in the presence of zeros. Focusing on scale-dependent metrics, CG-TCN again achieves the best overall performance, with the lowest MAE (0.2772), MSE (0.1534), RMSE (0.3917), and NRMSE (4.04%), together with the highest (0.9693). Competing deep learning models, including Autoformer and MTGNN, show reasonable accuracy but consistently underperform CG-TCN, particularly in terms of RMSE and explained variance. Traditional machine-learning methods and the AR benchmark exhibit markedly higher errors and lower explanatory power. These results suggest that the benefits of the proposed causal-graph-enhanced architecture extend to the more volatile and discontinuous minimum-price series, where short-horizon dynamics and abrupt price movements are especially pronounced.
Table 4: Forecast results of retail electricity daily MINIMUM prices.
| Model | MAE | MSE | RMSE | NRMSE | ||
|---|---|---|---|---|---|---|
| CG-TCN | 0.2772 | 0.1534 | 0.3917 | 4.04 | % | 0.9693 |
| Autoformer | 0.3126 | 0.2696 | 0.5192 | 7.80 | % | 0.9413 |
| MTGNN | 0.3094 | 0.2891 | 0.5377 | 8.08 | % | 0.9370 |
| RF | 0.6849 | 1.8430 | 1.3576 | 5.11 | % | 0.5329 |
| XGB | 0.7214 | 2.2044 | 1.4847 | 5.59 | % | 0.4413 |
| AR | 1.4962 | 4.7231 | 2.1733 | 8.18 | % | -0.1970 |
| LSTM | 0.9743 | 2.4621 | 1.5691 | 5.91 | % | 0.3793 |
| TCN | 0.85870 | 1.8145 | 1.3470 | 5.07 | % | 0.5426 |
| CTCN | 0.6231 | 1.2681 | 1.1261 | 4.24 | % | 0.6803 |
Figure 6 illustrates the out-of-sample test performance of the best-performing CG-TCN model by comparing the predicted daily retail electricity median prices with the observed values. The predicted trajectory closely follows the overall downward price movement during the test period and remains well aligned with both gradual regime shifts and pronounced price drops. While small discrepancies arise during periods of heightened short-term volatility, the model accurately reproduces the dominant price dynamics over the entire horizon.
To further examine the sources of predictive accuracy, Figure 7 presents the corresponding predictions for the decomposed multi-scale components. The semiannual component demonstrates that the model effectively captures the long-run downward trend in prices, while the quarterly component

Fig. 6. CG-TCN model predictions of daily median retail electricity prices during the test period.
closely tracks medium-term adjustments associated with evolving market conditions. The monthly component shows strong alignment between predicted and observed short-horizon oscillations, indicating the model's ability to adapt to shorter-term cyclical behavior. Finally, the fluctuation component reveals that the model is able to reproduce high-frequency variability, although extreme spikes are slightly attenuated, reflecting a modest smoothing effect. Taken together, these results indicate that the proposed CG-TCN framework not only achieves accurate aggregate price forecasts but also reliably represents price dynamics across multiple temporal scales.
4.4. Multi-step-ahead forecasting results
Table 5 reports the multi-step forecasting performance for daily median prices across horizons . Multi-step forecasting is particularly relevant in retail electricity markets, where pricing, procurement, and contract design decisions often rely on price expectations several days to weeks ahead rather than on one-step-ahead forecasts. Evaluating performance at longer horizons therefore provides a more stringent and operationally meaningful assessment of model robustness. For each horizon, models are evaluated using direct H-step-ahead forecasts, with predictions aligned to observed prices at and metrics computed on a held-out test set, thereby avoiding recursive error accumulation.
Across all horizons, CG-TCN consistently outperforms the benchmark models. For example, at the 5-day horizon, CG-TCN achieves an MAE of 0.404 and an of 0.935, compared with an MAE of 0.546 and of 0.840 for Autoformer. This performance gap persists and widens at longer horizons: at , CG-TCN maintains a low RMSE of 0.499 and , while competing

Quarterly Trend
Monthly Trend
Fluctuation
Fig. 7. CG-TCN predictions of multi-scale decomposition components of daily median retail electricity prices during the test period.
models exhibit substantially higher errors and lower explanatory power. At the 15-day horizon, although forecast errors increase for all approaches, CG-TCN continues to deliver the lowest MAE and RMSE and the highest , indicating greater robustness to error accumulation in multi-step forecasting.
Table 5: Multi-step forecasting for daily median price across horizons .
| Horizon | Model | MAE | MSE | RMSE | MAPE | NRMSE | |
|---|---|---|---|---|---|---|---|
| 5 | CG-TCN | ||||||
| Autoformer | |||||||
| MTGNN | |||||||
| 10 | CG-TCN | ||||||
| Autoformer | |||||||
| MTGNN | |||||||
| 15 | CG-TCN | ||||||
| Autoformer | |||||||
| MTGNN |
Autoformer and MTGNN are selected as baseline models because they represent state-of-the-art deep learning architectures for long-sequence and multivariate time-series forecasting and demonstrate strong one-step-ahead performance in prior studies and in our empirical setting. Limiting the comparison to these competitive baselines allows for a focused evaluation of multi-step performance without conflating results with models that already underperform in the short-horizon setting. In contrast to these benchmarks, CG-TCN maintains more stable accuracy as the prediction horizon increases, highlighting the advantages of its causal and multi-scale design for capturing persistent temporal structure in retail electricity prices.
4.5. Explainability result
4.5.1. Causal DAG
Beyond predictive accuracy, interpretability is a central requirement for critical applications, particularly in retail electricity markets where policy design, consumer protection, and regulatory oversight depend on understanding the mechanisms driving price formation. As discussed in Sections 1 and 2, much of the existing forecasting literature relies on black-box machine-learning models that deliver high predictive accuracy but provide limited insight into why prices evolve as they do, limiting their usefulness for economic interpretation and policy analysis.
In this context, causal graphs serve as a critical methodological bridge between predictive performance and economic explainability. By explicitly representing directed dependencies among decomposed price components, contract attributes, wholesale market conditions, and exogenous factors, causal DAGs allow us to assess whether learned relationships align with economic theory, institutional knowledge, and the unidirectional nature of price formation. This addresses a key gap in prior work on retail electricity price forecasting, which has rarely integrated formal causal discovery with interpretable multi-scale price decomposition.
Figures 8 and 9 compare the estimated causal structures among price components, contract attributes, covariates, and time features under unconstrained and constrained learning settings. In the unconstrained graph (Figure 8), dense interconnections emerge, particularly among monthly and daily time features, resulting in a highly entangled network. In this setting, price components at different temporal scales are simultaneously inferred to influence one another and to be influenced by other variables, creating feedback-like relationships with no clear causal ordering. Such structures complicate interpretation and are difficult to reconcile with the unidirectional and temporally ordered nature of causal price formation in retail electricity markets.
By contrast, the constrained graph (Figure 9) enforces two economically motivated structural realities: (1) forecasting targets cannot act as parent nodes, and (2) time features and wholesale forward prices cannot appear as causal child nodes. These constraints yield a sparser and more interpretable network, in which causal directions align more closely with theoretical expectations—price components depend on external covariates and market inputs, while exogenous features remain independent drivers. This comparison highlights the importance of incorporating domain knowledge into causal discovery to obtain graphs that are both statistically coherent and economically meaningful in retail electricity markets.
Importantly, this comparison is not merely descriptive. It demonstrates how unconstrained, purely data-driven causal discovery can produce statistically admissible but economically implausible structures, reinforcing concerns raised in the causal interpretability literature regarding spurious feedback loops and ambiguous causal ordering in high-dimensional time-series settings [39, 40]. By introducing economically motivated structural constraints, our approach embeds domain knowledge directly into the causal discovery process, yielding graphs that are not only statistically coherent but also economically interpretable. In this sense, the constrained DAG constitutes a substan-

Fig. 8. Estimated causal graph without structural constraints.

Fig. 9. Estimated causal graph with forecasting-target and exogenous-input constraints.
tive methodological contribution: it operationalizes explainability in causal forecasting by aligning learned structures with institutional and theoretical expectations rather than relying solely on post hoc interpretation.
The causal structures are estimated using the NOTEARS framework, which provides a differentiable approach to learning directed acyclic graphs (DAGs) by enforcing a smooth acyclicity constraint. In the linear NOTEARS formulation [14], each variable is modeled as a linear function of its potential parents, and the optimization jointly estimates regression coefficients while constraining the resulting adjacency matrix to be acyclic. This approach yields sparse and transparent causal graphs that are straightforward to interpret. The nonlinear extension of NOTEARS replaces linear regressions with neural networks at each node, allowing for flexible nonlinear dependencies while maintaining the same acyclicity constraint [41]. As a result, the two variants offer a natural trade-off between interpretability and expressive power.
Figures 9 and 10 illustrate the causal graphs learned by the linear and nonlinear NOTEARS algorithms under the constrained setting. The linear NOTEARS graph is relatively dense, with multiple connections among price components (red nodes), contract attributes and covariates (green nodes), and time features (blue nodes). This reflects the tendency of linear models to capture a broad set of associations, including weaker but potentially informative relationships. In contrast, the nonlinear NOTEARS graph is more selective and parsimonious, highlighting a smaller number of strong causal links—most notably between wholesale forward prices, contract fees, and key price trend components. This sparsity suggests that the nonlinear formulation is better able to focus on economically meaningful dependencies while filtering out weaker or spurious correlations.
Table 6 compares the forecasting performance for daily median prices of the CG-TCN model when using causal graphs derived from linear and nonlinear NOTEARS. Overall, the two variants achieve very similar predictive accuracy. The nonlinear NOTEARS graph yields marginal improvements in and RMSE/MSE on the test set, whereas the linear NOTEARS graph achieves slightly lower MAE and MAPE. This pattern reflects the balance between model flexibility and data availability. While the nonlinear NOTEARS formulation introduces additional parameters that can capture subtle nonlinear dependencies, the available sample size (approximately 3,600 daily observations) limits the extent to which this additional capacity translates into systematic gains. By contrast, the simpler linear NOTEARS approach provides a more stable, lower-variance representation under the current data regime. These results suggest that nonlinear NOTEARS may offer clearer advantages when larger datasets, stronger regularization, or more restrictive domain-

Fig. 10. Estimated causal graph from the nonlinear NOTEARS algorithm.
informed constraints are available. In this study, we adopt the linear NOTEARS formulation for causal graph discovery, using the nonlinear variant only for comparative and robustness analysis. A comparison between the saliency-based causal interpretation of the baseline CTCN and the explicit causal structure learned by CG-TCN is provided in Appendix F.
Table 6: Performance of CG-TCN using causal graphs learned from linear and nonlinear NOTEARS. The two variants exhibit comparable predictive accuracy.
| Model | MAE | MSE | RMSE | MAPE | NRMSE | |
|---|---|---|---|---|---|---|
| CG-TCN (Linear NOTEARS) | 0.2685 | 0.1302 | 0.3609 | 3.08% | 6.49% | 0.9648 |
| CG-TCN (Nonlinear NOTEARS) | 0.2841 | 0.1291 | 0.3212 | 3.61% | 5.06% | 0.9556 |
Although the causal graphs estimated using the NOTEARS framework uncover meaningful dependencies among contract attributes, wholesale price signals, and decomposed price components, some target components lack clearly identified explanatory parents in these static DAGs. This limitation stems from the sparsity-inducing nature of NOTEARS, which is designed to retain only statistically dominant direct edges while pruning weaker, indirect, or distributed relationships [42, 43]. While such sparsity enhances interpretability, it may omit pathways that are collectively important for prediction. To address this limitation and improve forecasting performance, we embed the discovered causal structure into a Graph Neural Network (GNN). The GNN allows each node to aggregate information not only from its direct parents but also from higher-order neighbors, thereby capturing distributed, nonlinear, and cross-component interactions that static causal graphs alone cannot represent. This causal-graph-informed embedding preserves the interpretable backbone provided by NOTEARS while extending it into a flexible representation optimized for temporal forecasting, effectively bridging causal discovery and predictive modeling.

Target Node (Influenced)
Fig. 11. GNN-learned effective adjacency matrix representing causal influences among price components, covariates, and time features.
Figure 11 presents the effective adjacency matrix learned by the GNN-based causal forecasting model. The matrix summarizes the learned directed influence strengths among all variables, with color intensity indicating the magnitude of each influence; diagonal entries are fixed at unity to reflect self-dependence. Several economically intuitive patterns emerge. The calculated wholesale forward price exhibits a strong directed influence on the long-horizon trend component (Trend_180), indicating that expectations embedded in forward markets play a central role in shaping persistent retail price movements. In contrast, the monthly contract fee primarily influences the high-frequency fluctuation component (IMF_sum), suggesting that supplier-specific pricing adjustments mainly affect short-term variability rather than long-run trends. The SSO price also appears as an important driver. Prior research has indicated that the SSO plays a key role as a price heuristic for the open market operations of retail suppliers, or CRES [3]. This plays a role in linking the default price offered by the distribution utility to both trend and fluctuation components. By comparison, daily calendar indicators and holiday effects exhibit relatively weak influence, consistent with their limited role in determining retail electricity prices. Overall, the learned adjacency structure reveals a hierarchical organization of causal influences, in which underlying structural market signals, such as wholesale forward prices and the SSO, govern long-term price evolution, while contract-level attributes primarily modulate short-term dynamics. These results further demonstrate how the GNN embedding translates economically meaningful causal relationships into improved forecasting performance.
This causal DAG analysis provides a structured and interpretable view of the mechanisms underlying retail electricity price formation. By explicitly modeling directed dependencies among decomposed price components, contract attributes, wholesale market signals, and time features, the DAG framework allows us to assess whether learned relationships align with economic intuition and institutional knowledge. Rather than treating price dynamics as a black box, the causal graphs clarify how long-term price trends are driven by persistent market fundamentals, while short-term fluctuations are shaped by contract-level pricing strategies and transient market conditions. Importantly, the use of causal discovery complements the forecasting task by constraining information flow to economically plausible pathways, thereby enhancing both interpretability and robustness. These insights motivate the subsequent integration of the learned causal structure into the forecasting model, where causal relationships serve not only as explanatory tools but also as inductive biases that improve predictive performance.
4.5.2. Temporal causality
While the causal DAG analysis in Section 4.5.1 identifies which variables are structurally connected in retail electricity price formation, temporal causality addresses a complementary question: when different inputs are most informative for forecasting price dynamics. Understanding the timing of explanatory influence is particularly important in retail electricity markets, where contract attributes, wholesale price signals, and exogenous factors operate over distinct temporal horizons.
This section therefore examines how the proposed CG-TCN model allocates explanatory importance across historical time lags, revealing the temporal scales at which different variables exert their predictive influence.
Figures 12 and 13 present normalized temporal saliency maps that visualize how the model allocates importance across historical time lags and input features when forming forecasts of the final retail electricity price and its decomposed components. Each heatmap visualizes how the model allocates importance across historical time lags and input features when forming predictions. The vertical axis corresponds to input time lags, ranging from recent observations (T−1) to longer-range dependencies (up to T−40), while the horizontal axis represents input features, including decomposed price components, contract attributes, and exogenous covariates. The first column (“All”) summarizes the average saliency across all input features at each time lag, providing an overall measure of temporal importance independent of feature type.

Input Features
Fig. 12. Normalized temporal causality in forecasting the final retail electricity price. Each saliency value is normalized by the maximum magnitude across all time lags and features for comparability. The first column (“All”) indicates the average saliency across all input features at each time lag.
To facilitate comparison across targets and features, all saliency values are normalized by the global maximum magnitude within each map, rescaling entries to the interval [0,1]. This normalization removes differences in absolute gradient scale and emphasizes relative temporal and feature-specific contributions within each forecasting task.

Input Features
(a) Semiannual trend

Input Features
(b) Quarterly trend
Fig. 13. Normalized temporal causality for decomposed components of retail electricity price. Each map is normalized to by its global maximum saliency. The first column (“All”) shows the average saliency across all input features for each time lag.

Input Features
(c) Monthly trend

Input Features
(d) Fluctuation
Fig. 13. (continued)
Across all targets, a consistent temporal pattern emerges: predictive influence is strongly concentrated in the most recent observations, particularly within lags T−1 to T−3, indicating that short-term dynamics play a dominant role in retail electricity price forecasting. Beyond these immediate lags, saliency rapidly attenuates, though select features retain moderate influence at longer horizons, reflecting persistent structural effects.
The distribution of saliency across features varies systematically by component. For the semi-annual trend, pronounced and persistent saliency is observed for the calculated wholesale forward price and the long-horizon price trend (Trend_180), consistent with their role as stabilizing long-term market signals. In contrast, the fluctuation component exhibits strong sensitivity to the monthly fee and the IMF_sum index, suggesting that supplier contract terms and broader market conditions primarily drive short-term price variability. The quarterly and monthly trends display more diffuse saliency patterns, reflecting mixed dependence on recent contract attributes, seasonal indicators, and intermediate-term price dynamics.
When interpreted alongside the NOTEARS-derived causal graphs and the GNN-learned adjacency embeddings, these temporal saliency maps provide a dynamic complement to static causal structure learning [44]. The causal DAGs identify which variables are structurally connected, while the GNN embedding refines these relationships into weighted directional links that govern information propagation. Temporal saliency further extends this framework by revealing when these causal relationships exert the greatest influence on forecasts. Together, the static causal structure, learned graph embedding, and temporal causality analysis demonstrate that retail electricity price dynamics are shaped by both persistent causal drivers and time-localized responses, enhancing the interpretability and credibility of the proposed forecasting framework.
4.5.3. Causality Examination in Autoformer
Section 4.5.1 establishes causal DAGs that encode economically plausible structural relationships among decomposed price components, contract attributes, and exogenous market signals. This learned causal structure provides a reference for distinguishing variables that exert structural influence on retail electricity prices from those that act as non-causal temporal descriptors. While the proposed CG-TCN explicitly embeds this causal graph into its forecasting architecture, Autoformer is a purely data-driven transformer model that neither imposes nor learns an explicit causal structure, yet achieves competitive predictive accuracy and serves as a strong baseline in our empirical evaluation. In this subsection, we conduct a causal robustness examination of Autoformer by evaluating whether its predictive performance is consistent with the causal relationships identified in Section 4.5.1, rather than being driven by non-causal temporal regularities.
Figures 8, 9, and 10 show that day-of-week indicators (Day 0–Day 6) do not appear as causal parents of any forecasting target in the learned DAG, indicating that these calendar variables function as descriptive time indices rather than structural drivers of price formation. If Autoformer's predictive accuracy were primarily grounded in causal relationships, perturbations to such non-causal calendar features would be expected to have limited impact on forecasting performance. To test this implication, we introduce a targeted calendar intervention that disrupts the alignment between day-of-week labels and observed prices and compare Autoformer's forecasting accuracy before and after this intervention.
Operationally, we implement a within-week calendar shuffle that preserves all economic information and long-run temporal structure while selectively breaking intra-week calendar alignment. Starting from the chronologically ordered dataset, observations are partitioned into calendar weeks, and the date labels within each week are randomly permuted using a fixed random seed for reproducibility. This procedure preserves the set of observations within each week and leaves all price realizations, market variables, and contract attributes unchanged, while disrupting the mapping between specific weekdays (e.g., Monday through Sunday) and price outcomes. After permuting dates within each week, the dataset is re-sorted chronologically and used for evaluation. Because the intervention operates strictly within weekly blocks, it preserves seasonal patterns, long-term trends, and cross-week dependencies, thereby isolating the predictive contribution of within-week calendar regularities without introducing information leakage or altering the underlying price distribution.
Table 7: Autoformer forecasting performance under within-week calendar intervention.
| Metric | Original data | Within-week calendar-intervened data | (%) |
|---|---|---|---|
| MAE | 0.266 | 0.346 | +30.1 |
| MSE | 0.177 | 0.299 | +68.9 |
| RMSE | 0.421 | 0.547 | +29.9 |
| MAPE | 2.813 | 3.698 | +31.5 |
| NRMSE | 6.322 | 8.216 | +29.9 |
| 0.961 | 0.934 | -2.8 |
Table 7 summarizes Autoformer's out-of-sample forecasting performance on the original dataset and under the within-week calendar intervention, together with the relative percentage change in each evaluation metric. The results show a substantial degradation in predictive accuracy following the intervention. Relative to the original evaluation, MAE increases by 30.1%, RMSE by 29.9%, and MAPE by 31.5%, while MSE increases by 68.9%. In parallel, declines from 0.961 to 0.934. Because the intervention disrupts only non-causal within-week calendar alignment while preserving all economic covariates, seasonal patterns, and long-run temporal structure, these performance losses indicate that a nontrivial portion of Autoformer's predictive accuracy is driven by calendar-based proxies rather than structurally causal relationships. As a result, the feature-target associations learned by Autoformer are not causally interpretable in the sense of Section 4.5.1 and are not invariant to interventions that alter non-causal temporal regularities. This lack of invariance suggests potential fragility under policy interventions or regime changes that modify calendar effects, in contrast to CG-TCN, which explicitly constrains information flow through the learned causal structure and is therefore less reliant on such non-causal temporal descriptors.
4.6. Ablation study
To further validate the effectiveness of our proposed CG-TCN framework, we conducted an ablation study to investigate the contribution of each individual module. Specifically, we created variations of the full model by removing one component at a time, leading to the following configurations:
• w/o causal graph module: The CG-TCN model without the causal graph discovery and graph neural network components. In this setup, the model only applies temporal convolution on the decomposed components, without incorporating causal relationships across variables.
• w/o TCN module: The CG-TCN model without the temporal convolutional network. Instead of extracting temporal patterns via dilated convolution, the model uses a graph neural network for causal embedding followed by a multi-layer perceptron (MLP), which only utilizes the most recent time step.
• Pure TCN (univariate forecasting): A simplified baseline model in which the temporal convolutional network is trained only on the raw retail electricity price series, without any causal graph inputs or decomposition features. In this setting, the TCN captures purely univariate temporal dependencies of the price signal. It differs from the TCN baseline used before in our study: the baseline TCN forecasts each of the four decomposed price components and then aggregates them, whereas the pure TCN here directly forecasts the overall price trajectory without decomposition.
- w/o spike-aware algorithm: The CG-TCN model trained without the spike-aware mechanism, i.e., spike windows are not oversampled and no additional loss weighting is applied to spike-related errors.
Table 8 reports the training and test performance of all ablation variants. Overall, the results highlight that each module contributes distinct and complementary benefits, and removing any single component leads to a measurable degradation in forecasting accuracy or generalization.
Removing the causal graph module leads to a clear decline in test performance, with MAE increasing to 0.5594 and decreasing to 0.8391. This indicates that explicitly modeling cross-variable causal relationships provides nontrivial predictive gains beyond temporal patterns alone, while also enhancing interpretability.
The absence of the temporal convolution module results in a more pronounced deterioration. Without the TCN's ability to capture long-range temporal dependencies, test MAE increases to 0.9489 and drops sharply to 0.6011. This confirms that temporal convolution is essential for learning the dynamic structure of retail electricity prices.
The Pure TCN model performs worst among all variants, yielding a test MAE of 1.4339 and a negative of -0.1885. This severe underperformance underscores the limitations of univariate forecasting in volatile retail electricity markets and highlights the importance of both multivariate causal information and decomposition-based feature representation.
Disabling the spike-aware algorithm still yields relatively strong average performance (test MAE = 0.2901, ), but performance is consistently inferior to the full CG-TCN model, particularly in terms of error metrics associated with high-volatility periods. This suggests that while the spike-aware mechanism is not the primary driver of baseline accuracy, it enhances robustness by improving sensitivity to rare but extreme price fluctuations.
In summary, the ablation study demonstrates that the causal graph module, temporal convolutional network, and spike-aware algorithm each play a critical and complementary role. Their integration enables CG-TCN to achieve accurate, stable, and volatility-aware forecasts, which is particularly important for decision-making in deregulated retail electricity markets.
Table 8: Ablation study results.
| Model | Training Results | Test Results | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MAE | MSE | RMSE | MAPE | NRMSE | MAE | MSE | RMSE | MAPE | NRMSE | |||
| w/o causal graph module | 0.1623 | 0.0572 | 0.2393 | 2.42% | 2.99% | 0.9573 | 0.5594 | 0.6189 | 0.7867 | 5.67% | 14.16% | 0.8391 |
| w/o TCN module | 0.3586 | 0.2742 | 0.5236 | 5.27% | 6.54% | 0.7956 | 0.9489 | 1.5342 | 1.2386 | 10.25% | 22.30% | 0.6011 |
| Pure TCN | 1.0367 | 1.6677 | 1.2914 | 16.44% | 16.14% | -0.2430 | 1.4339 | 4.5706 | 2.1379 | 13.94% | 38.49% | -0.1885 |
| w/o spike-aware algorithm | 0.0967 | 0.0548 | 0.2340 | 1.23% | 2.93% | 0.9624 | 0.2901 | 0.1448 | 0.3733 | 3.43% | 7.36% | 0.9463 |
4.7. Sensitivity analysis
Understanding how architectural choices affect forecasting performance is critical for deploying CG-TCN in practice, where model complexity, data availability, and computational cost must be carefully balanced. This sensitivity analysis systematically examines the impact of two key design parameters in the TCN module, the length of the historical input window and network depth, on predictive accuracy and generalization. Importantly, to isolate the effect of architecture alone, all models reported in this section are trained using the same fixed set of hyperparameters, without any additional hyperparameter optimization.
Table 9 presents the results of this sensitivity analysis, where the input sequence length (10, 25, or 40 past steps) and the depth of the TCN (2 or 5 layers) are varied. Three main observations emerge.
First, the length of the historical input sequence has a pronounced effect on predictive performance. Models trained with only 10 past steps (e.g., 10step-2layerTCN) exhibit substantially higher test errors (MAE = 0.5563, ) than those using longer input horizons. This suggests that retail electricity prices are influenced not only by short-term fluctuations but also by longer-term temporal dependencies. Extending the input window to 25 or 40 steps allows the model to better capture these slower-moving dynamics, resulting in more accurate forecasts.
Second, increasing network depth generally improves performance when sufficient historical context is available. For example, the 40step-2layerTCN achieves the best overall test performance, with the lowest MAE (0.3007), RMSE (0.4183), and MAPE (3.22%), along with the highest (0.9528). This indicates that deeper or wider receptive fields enable the TCN to learn richer multi-scale temporal representations, which are well suited to the combination of volatility and structural persistence observed in retail electricity prices.
Finally, performance gains from increasing model complexity are not monotonic. While deeper networks can enhance representational capacity, they also introduce additional parameters and a higher risk of overfitting. For instance, the 25step-2layerTCN achieves competitive accuracy () with substantially lower architectural complexity than deeper alternatives. This highlights a favorable trade-off between accuracy and efficiency, suggesting that moderate input lengths and depths may already capture most of the relevant temporal information.
Table 9: Sensitivity analysis of CG-TCN base models under different input window lengths and TCN depths (no hyperparameter optimization).
| Model | Training Results | Test Results | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MAE | MSE | RMSE | MAPE | NRMSE | MAE | MSE | RMSE | MAPE | NRMSE | |||
| 10step-2layerTCN | 0.1518 | 0.0455 | 0.2133 | 2.32% | 2.67% | 0.9618 | 0.5563 | 0.6347 | 0.7967 | 5.62% | 14.34% | 0.8447 |
| 10step-5layerTCN | 0.1465 | 0.0330 | 0.1817 | 2.31% | 2.27% | 0.9754 | 0.4158 | 0.3487 | 0.5905 | 4.25% | 10.63% | 0.9093 |
| 25step-2layerTCN | 0.1356 | 0.0414 | 0.2034 | 2.04% | 2.54% | 0.9692 | 0.3664 | 0.1981 | 0.4451 | 4.16% | 8.01% | 0.9485 |
| 25step-5layerTCN | 0.1480 | 0.0334 | 0.1828 | 2.34% | 2.28% | 0.9751 | 0.4189 | 0.3536 | 0.5946 | 4.28% | 10.70% | 0.9081 |
| 40step-2layerTCN | 0.1497 | 0.0437 | 0.2092 | 2.26% | 2.61% | 0.9700 | 0.3007 | 0.1750 | 0.4183 | 3.22% | 7.53% | 0.9528 |
| 40step-5layerTCN | 0.1281 | 0.0295 | 0.1717 | 1.97% | 2.15% | 0.9797 | 0.4002 | 0.2437 | 0.4936 | 4.56% | 8.89% | 0.9342 |
Overall, the sensitivity analysis demonstrates that both temporal window size and network depth are influential architectural parameters for TCN-based forecasting. Longer input sequences provide richer historical context, while appropriate depth enhances temporal feature extraction. These results motivate the architectural choices adopted in the full CG-TCN model and underscore the importance of careful, problem-specific calibration rather than relying solely on increased model complexity.
5. Discussion
This study provides empirical and methodological evidence that incorporating causal structure into deep-learning-based forecasting can substantially improve both predictive performance and interpretability in deregulated retail electricity markets. Several broader insights emerge from the results.
First, the strong performance gains from integrating causal graphs with temporal convolution highlight the limitations of purely correlation-driven forecasting approaches in retail pricing contexts. Retail electricity prices are shaped by a combination of wholesale cost pass-throughs, contract design features, and regulatory interventions, whose effects unfold across multiple temporal scales. By explicitly modeling these relationships, the CG-TCN framework is better able to distinguish structural price movements from short-term noise, resulting in improved generalization, particularly in retail markets defined by price variability or volatility.
Second, the decomposition-based architecture proves critical for isolating heterogeneous temporal dynamics. The sensitivity and ablation analyses show that different price components respond differently to market drivers and architectural choices. Longer input windows and deeper temporal representations are especially valuable for capturing slower-moving trends linked to forward prices and contract terms, while the spike-aware mechanism enhances responsiveness to rare but impactful price fluctuations. These findings underscore the importance of aligning model design with the multi-scale nature of retail electricity price formation.
Third, the learned causal graphs offer interpretable insights into retail price formation mechanisms that are difficult to obtain from standard black-box models. The results indicate that wholesale forward prices primarily shape long-horizon trend components, reflecting cost pass-through and expectations embedded in upstream markets, while contract attributes such as monthly fees and early termination fees exert a stronger influence on short-term price fluctuations and discrete price adjustments. This pattern suggests that suppliers do not rely solely on per-kWh price levels to recover costs or generate revenue, but instead use fee-based contract features to modulate consumer-facing prices over shorter horizons. In particular, monthly fees and termination penalties appear to function as flexible instruments that allow suppliers to respond to market conditions and manage risk exposure without uniformly raising headline energy prices. Such insights are especially relevant for regulators and consumer advocates, as they highlight how supplier pricing strategies—including fee structures that may be less salient to consumers—translate into observed retail price dynamics.
From a policy perspective, the framework provides a tool for anticipating periods of elevated price risk and assessing how market design features, such as default service rates or contract fee structures, may influence retail price magnitudes or volatility. While this study demonstrates this robust methodology by focusing on depth rather than breadth (that is, on a single utility territory rather than all territories in the state), the methodology is generalizable to other deregulated markets, offering a scalable approach for developing reliable forecasts. This has implications for consumer protection, market monitoring, competition enforcement, welfare economic analysis and affordability assessment, and other regulatory and public-sector functions. It also has considerable private-sector applications, as the methods can be utilized by the many retail supply firms operating in these markets across the 14 US retail restructured states, in other retail choice markets such as natural gas choice markets, and internationally in other retail choice jurisdictions, including the UK.
and Australia.
It is also important to note another key contribution of this paper. Most empirical studies of electricity markets rely upon data from wholesale markets. Wholesale market data are free, abundant, and considerably less important from a public policy standpoint. This study utilizes a database of every daily retail choice offer from every supplier in a utility service territory, for a decade, in one of the largest and most robust retail electricity markets in the US. The data are costly to obtain in terms of effort, but considerably richer in behavioral detail and product heterogeneity than wholesale market data, which are more mechanistic. In short, we use data that are harder to obtain, richer and more robust, and ultimately more important and more relevant to real households and businesses because they reflect the prices they ultimately have to pay.
There are also many possible extensions of this methodology, as the framework is general and extensible. It offers a blueprint for causal forecasting in other volatile and structurally complex energy markets. First, extending CG-TCN toward probabilistic forecasting would enable estimation of the full distribution of daily available retail prices, moving beyond point forecasts. Such distributional predictions could support risk-aware procurement, budget planning, and consumer protection (e.g., identification of high price or risky offers that may endanger consumer welfare or low information consumers, such as the elderly). It could also support the quantification of uncertainty and tail risk during extreme market conditions. Second, applying the proposed approach across multiple utility territories and contract types would enable cross-market generalization and comparative analysis, further strengthening the role of causal machine learning in energy system analytics.
6. Conclusion
Retail electricity markets are the final downstream stage of the complex energy supply chain. All other levels of energy production and operations, from resource recovery to upstream and midstream operations, to wholesale markets, all culminate in the final end-product offered to households and businesses at the retail level. Retail electricity markets are of critical public policy importance, as production, regulatory and operational changes at all other stages of the supply chain are viewed through the lens of the markets that deliver the final product to the final consumer—households and job creators.
Moreover, retail energy markets feature prominently in today's charged political and policy debates in the US and many other nations, where energy affordability ranks in the top three policy issues for voters. While historically the cost of utilities has been secondary or ancillary among public problems of concern, it has now risen to the third most highly cited affordability issue among Americans, surpassing even health care costs, and second only to housing and food. Consequently, methodological advancements in the prediction or forecasting of these important markets carry societal contributions above and beyond the empirical ones.
Retail electricity prices play a central role in shaping consumer decisions, supplier behavior, and overall market efficiency in deregulated retail energy markets. Accurately forecasting these prices requires models that go beyond short-term pattern recognition to capture the structural mechanisms underlying price formation. This paper introduced a causal-forecasting framework that integrates multi-resolution signal decomposition, causal graph discovery, and hybrid temporal deep learning for robust retail electricity price prediction.
By disentangling price dynamics across semiannual, quarterly, monthly, and high-frequency components and explicitly modeling their causal links with wholesale forward prices, contract attributes, and calendar effects, the proposed CG-TCN framework achieves superior forecasting accuracy relative to transformer-based and statistical benchmarks. Importantly, these gains are accompanied by improved interpretability, allowing the model to reveal how different market drivers propagate through distinct temporal layers of retail prices.
Beyond predictive performance, this study demonstrates the value of embedding causal reasoning within modern forecasting architectures. The learned causal structures provide economically meaningful insights into the interaction between wholesale markets and retail contract design, offering a methodology to improve the transparency of price formation in these behaviorally complex markets that have replaced a single regulated retail supplier with open market operations involving dozens of unregulated retail marketers or suppliers. Like other open market operations such as consumer credit, these marketers have a variety of contract attributes that serve as levers that they can modify or change (e.g., monthly fees, early termination fees, variable rates) to maximize profit beyond simply modifying the price or rate. Understanding how wholesale and retail market characteristics contribute to retail price formation informs key economic and regulatory questions. Advancements in interpretability are critical for regulators, policymakers, and market participants concerned with price stability, affordability, and consumer protection.
Overall, this research advances retail electricity market forecasting by bridging accuracy and
Boak, J. (2025, November 17). New analysis shows more US consumers are falling behind on their utility bills. AP News. https://apnews.com/article/trump-inflation-utility-bills-16cf846b44369b5b9660238be7112a4d interpretability, delivering models that are not only predictive but also transparent and policy-relevant—an essential step toward more efficient, resilient, and consumer-oriented retail electricity markets.
7. Acknowledgements
This work was supported in part by the Alfred P. Sloan Foundation under Grant No. G-2022-19460. Any opinions, findings, and conclusions expressed are those of the authors and do not necessarily reflect those of the sponsor.
References
[1] A. Faruqui, S. Sergici, L. Akaba, Dynamic pricing of electricity for residential customers: the evidence from michigan, Energy Efficiency 6 (3) (2013) 571–584.
[2] N. Dormady, A. Roa-Henriquez, M. Hoyt, M. Pesavento, G. Koenig, W. Welch, Z. Li, How are retail prices formed in restructured electricity markets?, Energy Economics 143 (2025) 108243.
[3] N. Dormady, W. Welch, Y. Ji, S. Pedron, A. Shafieezadeh, A. Lamadrid, M. Hoyt, S. Fox, Efficiency and consumer welfare under retail electricity deregulation: Analysis of ohio's retail choice markets, Journal of Critical Infrastructure Policy 6 (1) (2025) e12031.
[4] Y. Ji, N. Dormady, A. Shafieezadeh, K. Diana, M. Hoyt, A. Lamadrid, S. Fox, Marketers manage markups, consumers bear costs: An explainable machine learning analysis of retail renewable energy pricing, manuscript under review at Energy Economics (2025).
[5] A. Pesenti, A. O'Sullivan, Explaining deep neural network models for electricity price forecasting with xai, Energy and AI (2025) 100532.
[6] S. K. Aggarwal, L. M. Saini, A. Kumar, Electricity price forecasting in deregulated markets: A review and evaluation, International Journal of Electrical Power & Energy Systems 31 (1) (2009) 13–22.
[7] B. Vega-Márquez, C. Rubio-Escudero, I. A. Nepomuceno-Chamorro, Á. Arcos-Vargas, Use of deep learning architectures for day-ahead electricity price forecasting over different time periods in the spanish electricity market, Applied Sciences 11 (13) (2021) 6097.
[8] Z. Wang, M. Mae, T. Yamane, M. Ajisaka, T. Nakata, R. Matsuhashi, Novel custom loss functions and metrics for reinforced forecasting of high and low day-ahead electricity prices using convolutional neural network–long short-term memory (cnn-lstm) and ensemble learning, Energies 17 (19) (2024) 4885.
[9] A. Cerasa, A. Zani, Enhancing electricity price forecasting accuracy: A novel filtering strategy for improved out-of-sample predictions, Applied Energy 383 (2025) 125357.
[10] R. Kohút, M. Klaučo, M. Kvasnica, Unified carbon emissions and market prices forecasts of the power grid, Applied Energy 377 (2025) 124527.
[11] L. Heistrene, J. Belikov, D. Baimel, L. Katzir, R. Machlev, K. Levy, S. Mannor, Y. Levron, An improved and explainable electricity price forecasting model via shap-based error compensation approach, IEEE Transactions on Artificial Intelligence (2024).
[12] K. Ganesan, J. Tomé Saraiva, R. J. Bessa, On the use of causality inference in designing tariffs to implement more effective behavioral demand response programs, Energies 12 (14) (2019) 2666.
[13] A. Miraki, P. Parviainen, R. Arghandeh, Electricity demand forecasting at distribution and household levels using explainable causal graph neural network, Energy and AI 16 (2024) 100368.
[14] X. Zheng, B. Aragam, P. K. Ravikumar, E. P. Xing, Dags with no tears: Continuous optimization for structure learning, Advances in neural information processing systems 31 (2018).
[15] M. Kalisch, P. Bühlman, Estimating high-dimensional directed acyclic graphs with the pc-algorithm., Journal of Machine Learning Research 8 (3) (2007).
[16] D. M. Chickering, Optimal structure identification with greedy search, Journal of machine learning research 3 (Nov) (2002) 507–554.
[17] J. Nowotarski, R. Weron, On the importance of the long-term seasonal component in day-ahead electricity price forecasting, Energy Economics 57 (2016) 228–235.
[18] R. Weron, Electricity price forecasting: A review of the state-of-the-art with a look into the future, International journal of forecasting 30 (4) (2014) 1030–1081.
[19] J. D. Hamilton, Why you should never use the hodrick-prescott filter, Review of Economics and Statistics 100 (5) (2018) 831–843.
[20] R. B. Cleveland, W. S. Cleveland, J. E. McRae, I. Terpenning, et al., Stl: A seasonal-trend decomposition, J. off. Stat 6 (1) (1990) 3–73.
[21] D. B. Percival, A. T. Walden, Wavelet methods for time series analysis, Vol. 4, Cambridge university press, 2000.
[22] J. Chen, Y. Zhang, K. Liu, X. Hu, M. Xu, D. Wang, W. Yi, Filter bank convolutional network with dual channel attention for multi-class fine joint motor imagery decoding, Neurocomputing (2025) 131480.
[23] P. Spirtes, C. N. Glymour, R. Scheines, Causation, prediction, and search, MIT press, 2000.
[24] T. Kipf, Semi-supervised classification with graph convolutional networks, arXiv preprint arXiv:1609.02907 (2016).
[25] Z. Wu, S. Pan, F. Chen, G. Long, C. Zhang, P. S. Yu, A comprehensive survey on graph neural networks, IEEE transactions on neural networks and learning systems 32 (1) (2020) 4–24.
[26] C. Lea, M. D. Flynn, R. Vidal, A. Reiter, G. D. Hager, Temporal convolutional networks for action segmentation and detection, in: proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017, pp. 156–165.
[27] S. Bai, J. Z. Kolter, V. Koltun, An empirical evaluation of generic convolutional and recurrent networks for sequence modeling, arXiv preprint arXiv:1803.01271 (2018).
[28] P. J. Huber, Robust estimation of a location parameter, in: Breakthroughs in statistics: Methodology and distribution, Springer, 1992, pp. 492–518.
[29] B. Uniejewski, G. Marcjasz, R. Weron, On the importance of the long-term seasonal component in day-ahead electricity price forecasting: Part ii—probabilistic forecasting, Energy Economics 79 (2019) 171–182.
[30] H. S. Nygård, S. Grøtan, K. R. Kvisberg, L. R. Gorjao, T. Martinsen, Enhancing peak electricity demand forecasting for commercial buildings using novel lstm loss functions, Electric Power Systems Research 246 (2025) 111722.
[31] L. Breiman, Random forests, Machine learning 45 (1) (2001) 5–32.
[32] T. Chen, C. Guestrin, Xgboost: A scalable tree boosting system, in: Proceedings of the 22nd acm sigkdd international conference on knowledge discovery and data mining, 2016, pp. 785–794.
[33] G. E. Box, G. M. Jenkins, G. C. Reinsel, G. M. Ljung, Time series analysis: forecasting and control, John Wiley & Sons, 2015.
[34] S. Hochreiter, J. Schmidhuber, Long short-term memory, Neural computation 9 (8) (1997) 1735–1780.
[35] Y. Lin, I. Koprinska, M. Rana, Temporal convolutional attention neural networks for time series forecasting, in: 2021 International joint conference on neural networks (IJCNN), IEEE, 2021, pp. 1–8.
[36] Z. Wu, S. Pan, G. Long, J. Jiang, X. Chang, C. Zhang, Connecting the dots: Multivariate time series forecasting with graph neural networks, in: Proceedings of the 26th ACM SIGKDD international conference on knowledge discovery & data mining, 2020, pp. 753–763.
[37] H. Wu, J. Xu, J. Wang, M. Long, Autoformer: Decomposition transformers with auto-correlation for long-term series forecasting, Advances in neural information processing systems 34 (2021) 22419–22430.
[38] D. Li, Y. Li, C. Wang, M. Chen, Q. Wu, Forecasting carbon prices based on real-time decomposition and causal temporal convolutional networks, Applied Energy 331 (2023) 120452.
[39] N. Pfister, P. Bühlmann, B. Schölkopf, J. Peters, Kernel-based tests for joint independence, Journal of the Royal Statistical Society Series B: Statistical Methodology 80 (1) (2018) 5–31.
[40] B. Schölkopf, F. Locatello, S. Bauer, N. R. Ke, N. Kalchbrenner, A. Goyal, Y. Bengio, Toward causal representation learning, Proceedings of the IEEE 109 (5) (2021) 612–634.
[41] X. Zheng, C. Dan, B. Aragam, P. Ravikumar, E. Xing, Learning sparse nonparametric dags, in: International conference on artificial intelligence and statistics, Pmlr, 2020, pp. 3414–3425.
[42] I. Ng, A. Ghassami, K. Zhang, On the role of sparsity and dag constraints for learning linear dags, Advances in Neural Information Processing Systems 33 (2020) 17943–17954.
[43] K. Liu, L. Liu, K. Xiao, X. Li, H. Zhang, Y. Zhou, H. Huang, Cl-notears: Continuous optimization algorithm based on curriculum learning framework, Mathematics 12 (17) (2024) 2640.
[44] Q. Pan, W. Hu, J. Zhu, Series saliency: Temporal interpretation for multivariate time series forecasting, arXiv preprint arXiv:2012.09324 (2020).
[45] T. Akiba, S. Sano, T. Yanase, T. Ohta, M. Koyama, Optuna: A next-generation hyperparameter optimization framework, in: Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining, 2019, pp. 2623–2631.
[46] J. Bergstra, D. Yamins, D. Cox, Making a science of model search: Hyperparameter optimization in hundreds of dimensions for vision architectures, in: International conference on machine learning, PMLR, 2013, pp. 115–123.
[47] D. P. Kingma, J. Ba, Adam: A method for stochastic optimization, International Conference on Learning Representations (ICLR) (2015).
URL https://arxiv.org/abs/1412.6980
Appendix A. The Potential Factors
The potential factors are summarized in Tables A.1, A.2, and A.3.
Table A.1: The retail electricity contract group.
| Index | Variables | Implication |
|---|---|---|
| 1 | MonthlyFee | Fixed monthly fee included in the offer, in dollars. |
| 2 | EarlyTerminationFee | Fee charged for terminating the contract before it ends, in dollars. |
Table A.2: The energy market group.
| Index | Variables | Implication |
|---|---|---|
| 1 | CalculatedForwardPrice | Average forward wholesale electricity price for the forward maturity (delivery period) of a contract, using PJM West Hub prices |
| 2 | SSO | Value in dollars per kWh of the standard service offer (SSO) prices on the day of the offer. |
Table A.3: The time feature group.
| Index | Variables | Implication |
|---|---|---|
| 1 | Day_0-6 | Contract publish day, from the first day to the end of each week. |
| 2 | Month_1-12 | Contract publish month, from January to December each year. |
| 3 | Is_holiday | Contract publish date is a US holiday or not. |
Appendix A.1. Construction of Forward Wholesale Electricity Prices
To control for the underlying cost of supplying energy for each retail contract offer, we construct a forward-looking wholesale electricity price that reflects the cost a supplier would face when hedging the contract on the day of origination for its full delivery horizon. This forward wholesale price aligns the maturity of wholesale forward contracts with the duration of each retail offer.
Specifically, for each retail contract originating on day , with a contract length of months and a publication month in calendar year , we compute the average forward wholesale price as:
where denotes the monthly wholesale electricity forward price for delivery in month of year . The modulo operator ensures that contract months cycle correctly through the 12-month calendar, while the floor operator adjusts the delivery year when the contract horizon spans multiple calendar years.
This construction averages the sequence of monthly wholesale forward prices corresponding to the full delivery period of each retail contract, approximating the expected wholesale procurement cost that a supplier would incur if the contract were hedged at origination.
Wholesale forward prices are obtained from S&P Market Intelligence for PJM's West Hub, the most liquid trading hub in PJM and the proximate wholesale market for the Duke Energy Ohio service territory. Prices are expressed in cents per kilowatt-hour to maintain consistency with retail price outcomes and other market covariates.
Appendix B. Time-Series Cross-Validation Strategy
In time-dependent forecasting tasks, traditional k-fold cross-validation—which randomly partitions the dataset—can lead to information leakage by allowing future observations to influence the training process. This violates the causal structure of time-series data, where past information alone should determine future outcomes. To maintain temporal causality, all experiments in this study employ a time-series cross-validation (TSCV) framework.
In TSCV, data are split sequentially so that each fold preserves chronological order. At the i-th fold, the model is trained on observations up to time and validated on the subsequent interval . This ensures that the model only learns from historical data when forecasting unseen future values. The process is repeated by rolling or expanding the training window forward through time, as illustrated conceptually in Figure B.1.
This design offers two key advantages:
-
Causality preservation. By enforcing strict temporal order, the validation process respects real-world forecasting constraints, preventing the model from implicitly accessing future information.
-
Robustness assessment. By testing performance across multiple historical windows, TSCV evaluates how well the model generalizes under changing market regimes and volatility conditions—an essential property for electricity price forecasting.

Fig. B.1. Illustration of the time-series cross-validation (TSCV) process. Each fold trains on historical observations (dark blue) and validates on the next temporal segment (light blue), rolling forward sequentially through time.
Overall, the TSCV approach provides a more realistic and causally consistent evaluation of forecasting models compared to traditional random-split cross-validation, particularly in domains characterized by nonstationarity and regime shifts such as retail electricity pricing.
Appendix C. Spike-Aware Algorithm
This appendix details the spike-aware training mechanism used in the CG-TCN framework. The spike-aware algorithm is applied to the final reconstructed retail price series, rather than to individual decomposed components, ensuring that extreme price movements are identified and treated consistently at the consumer-facing price level.
Spikes are defined as large positive or negative deviations from a smoothed baseline that exceed a specified z-score threshold. These spike windows capture short-lived but economically significant episodes of market stress and heightened volatility. Once identified, spike windows are used to guide both the data sampling strategy and the loss function during model training.
Because spike events occur infrequently, a naive training procedure may underrepresent them, leading to poor performance during extreme price movements. To address this imbalance, the spike-aware sampler oversamples spike windows with replacement such that, in expectation, a fixed proportion of each mini-batch consists of spike observations. For example, when , approximately half of each training batch is expected to contain spike windows, even though spikes account for a much smaller fraction of the full dataset. In parallel, a higher loss weight is assigned to prediction errors within spike windows, amplifying their influence on the training objective and improving the model's responsiveness to abrupt price surges.
Table C.1: Number of spike windows identified in the final price series.
| Fold | Training Windows | Spike Windows (Train) | Spike Windows (Valid) |
|---|---|---|---|
| 1 | 598 | 123 / 598 | 92 / 597 |
| 2 | 1,195 | 215 / 1,195 | 106 / 597 |
| 3 | 1,792 | 321 / 1,792 | 120 / 597 |
| 4 | 2,389 | 441 / 2,389 | 117 / 597 |
| 5 | 2,986 | 558 / 2,986 | 109 / 597 |
| Total | 3,583 | 667 / 3,583 (18.62%) | — |
Table C.1 summarizes the number and proportion of spike windows identified across the full dataset and individual time-series cross-validation folds. This diagnostic serves as an important verification step, confirming that spike detection is neither overly aggressive nor overly conservative. By explicitly quantifying spike frequency, the spike-aware algorithm achieves a controlled balance.
between normal market conditions and extreme volatility episodes, improving robustness without distorting the underlying data distribution.
In total, 667 out of 3,583 windows (18.62%) are identified as spike windows. These flagged periods are leveraged by the spike-aware sampler to balance training batches and improve learning under extreme price volatility, without artificially altering the underlying data distribution.
Appendix D. Sensitivity of One-Sided Decomposition to Window Lengths
This appendix evaluates how the choice of decomposition window lengths affects downstream forecasting performance under one-sided STL and TSN decompositions. Because decomposition horizons directly control the smoothness, phase lag, and responsiveness of extracted components, their selection plays a critical role in balancing noise reduction against the preservation of predictive signals.
We consider multiple combinations of long-, medium-, and short-horizon windows,
and apply each configuration consistently to both STL- and TSN-based one-sided decompositions. All results reported below correspond to one-step-ahead out-of-sample forecasts using identical model architectures and training procedures.
Table D.1 summarizes the forecasting performance for daily median retail electricity prices. Among STL configurations, the (180, 60, 20) setting consistently achieves the best accuracy, yielding the lowest MAE (0.2685), lowest RMSE (0.3609), and highest (0.9648). For TSN, shorter short-horizon windows are more effective, with the (180, 60, 10) configuration providing the strongest overall performance ( ) and competitive error metrics. These results suggest that moderate medium-horizon smoothing combined with relatively short short-horizon components offers the best balance between stability and responsiveness for median price dynamics.
Table D.2 reports analogous results for daily minimum prices, which are more volatile and spike-prone. In this setting, the optimal window choices differ slightly. For STL, the (180, 90, 15) configuration performs best, indicating that a longer medium-term horizon helps stabilize extreme lower-bound price movements. For TSN, the (180, 60, 10) configuration again delivers the strongest performance, achieving the lowest MAE (0.2772) and the highest (0.9693). Overall, the minimum-price results reinforce the importance of shorter short-horizon windows for capturing abrupt price movements, while highlighting that optimal medium-horizon smoothing may differ across price aggregates.
Based on these findings, the best-performing decomposition settings for median and minimum prices are adopted in the forecasting experiments.
Table D.1: One-step-ahead forecasting performance for retail electricity daily MEDIAN prices under different STL and TSN decomposition window settings.
| Method / Window | MAE | MSE | RMSE | MAPE | NRMSE | |
|---|---|---|---|---|---|---|
| STL_180-90-30 | 0.3685 | 0.3051 | 0.5524 | 3.98% | 9.94% | 0.9176 |
| STL_180-60-20 | 0.2685 | 0.1302 | 0.3609 | 3.08% | 6.49% | 0.9648 |
| STL_180-60-10 | 0.6992 | 0.7170 | 0.8468 | 7.82% | 15.24% | 0.8063 |
| STL_180-90-15 | 0.8502 | 1.2869 | 1.1344 | 9.90% | 20.42% | 0.6525 |
| STL_240-60-20 | 0.8604 | 1.2138 | 1.1017 | 9.95% | 19.83% | 0.6722 |
| TSN_180-90-30 | 0.4850 | 0.3543 | 0.5952 | 5.84% | 10.71% | 0.9043 |
| TSN_180-60-20 | 0.5728 | 0.7569 | 6.3677 | 6.36% | 13.62% | 0.8453 |
| TSN_180-60-10 | 0.4202 | 0.2630 | 0.5129 | 5.01% | 9.23% | 0.9290 |
| TSN_180-90-15 | 0.4006 | 0.2639 | 0.5137 | 4.54% | 9.24% | 0.9287 |
| TSN_240-60-20 | 0.4899 | 0.3579 | 0.5982 | 5.68% | 10.76% | 0.9034 |
Table D.2: One-step-ahead forecasting performance for retail electricity daily MINIMUM prices under different STL and TSN decomposition window settings.
| Method / Window | MAE | MSE | RMSE | NRMSE | |
|---|---|---|---|---|---|
| STL_180-90-30 | 1.0907 | 2.2566 | 1.5022 | 15.50% | 0.5488 |
| STL_180-60-20 | 0.8240 | 1.3744 | 1.1723 | 12.09% | 0.7252 |
| STL_180-60-10 | 0.8700 | 1.9127 | 1.3830 | 14.27% | 0.6176 |
| STL_180-90-15 | 0.4871 | 0.4497 | 0.6706 | 6.92% | 0.9101 |
| STL_240-60-20 | 1.1898 | 2.2200 | 1.4900 | 12.88% | 0.5709 |
| TSN_180-90-30 | 0.4198 | 0.3961 | 0.6294 | 6.49% | 0.9208 |
| TSN_180-60-20 | 0.5492 | 0.4892 | 0.6994 | 7.21% | 0.9022 |
| TSN_180-60-10 | 0.2772 | 0.1534 | 0.3917 | 4.04% | 0.9693 |
| TSN_180-90-15 | 0.3567 | 0.3085 | 0.5554 | 5.73% | 0.9383 |
| TSN_240-60-20 | 0.4072 | 0.5831 | 0.7636 | 7.88% | 0.8834 |
Appendix E. Hyperparameter Optimization
This appendix describes the hyperparameter optimization procedure used for the proposed CG-TCN model and two strong deep-learning baselines—MTGNN and Autoformer. The goal of this procedure is to ensure a fair and systematic comparison by tuning each model within its standard architectural design while avoiding ad hoc manual calibration.
Appendix E.1. Optuna-based optimization framework
We employ Optuna [45], an open-source framework for automated hyperparameter optimization, to search the parameter spaces of CG-TCN, MTGNN, and Autoformer. Optuna adopts a define-by-run paradigm, allowing flexible specification of model-specific search spaces that include both architectural parameters (e.g., network depth and channel dimensions) and training-related parameters (e.g., learning rate, dropout, and weight decay).
The optimization process is guided by the Tree-structured Parzen Estimator (TPE) algorithm [46], which adaptively balances exploration and exploitation when sampling candidate configurations. To improve computational efficiency, Optuna's pruning mechanism is enabled to terminate unpromising trials early based on intermediate validation performance. This strategy substantially reduces training cost while mitigating overfitting to specific hyperparameter choices.
For each model, the objective function minimizes the validation loss computed on a held-out subset of the training data using time-series cross-validation. The best-performing configuration identified by Optuna is then retrained on the full training set and evaluated on the test set. The resulting optimal hyperparameters are reported in Tables E.1–E.3.
For the proposed CG-TCN model, the hyperparameter search spans learning rate, batch size, dropout rates for the TCN, GNN, and fusion layers, kernel size, number of TCN layers, channel widths, and GNN output dimensions. In addition, parameters specific to the spike-aware mechanism—such as the spike detection threshold, spike loss weight, and spike window sampling probability—are jointly optimized to ensure robust performance during extreme price events. The complete set of selected hyperparameters is reported in Table E.1.
For MTGNN, the search space includes architectural parameters governing temporal convolutions and graph learning, such as the number of layers, graph convolution depth, subgraph size, channel dimensions, and dilation factors. Training-related parameters, including learning rate, dropout, batch size, and gradient clipping, are also optimized. The optimal configuration identified by Optuna is summarized in Table E.2.
Table E.1: Optimal hyperparameters for CG-TCN.
| Parameter | Value |
|---|---|
| learning_rate | 0.000 231 537 954 901 644 3 |
| batch_size | 16 |
| dropout_tcn | 0.351 647 622 645 078 65 |
| dropout_gnn | 0.203 618 237 376 465 84 |
| dropout_fusion | 0.124 671 089 350 511 19 |
| kernel_size_tcn | 3 |
| num_tcn_layers | 2 |
| tcn_channels_10 | 16 |
| tcn_channels_11 | 32 |
| gnn_output_dim | 8 |
| weight_decay | 1.376 809 629 573 659 6 |
| noise_std | 0.040 450 432 581 941 684 |
| spike_z | 2.314 310 943 397 202 4 |
| loss_w_spike | 5.420 188 496 403 048 |
| sampling_p_spike | 0.486 202 545 907 950 26 |
| num_epochs_hpo | 122 |
| early_stopping_patience | 20 |
Table E.2: Optimal hyperparameters for MTGNN.
| Parameter | Value |
|---|---|
| learning_rate | 0.000 102 535 096 901 684 9 |
| weight_decay | 0.006 351 221 010 640 704 |
| dropout | 0.439 196 365 086 843 07 |
| batch_size | 16 |
| seq_in_len | 96 |
| layers | 8 |
| gcn_depth | 3 |
| subgraph_size | 12 |
| node_dim | 64 |
| dilation_exponential | 2 |
| conv_channels | 8 |
| residual_channels | 16 |
| skip_channels | 64 |
| end_channels | 96 |
| propalpha | 0.067 876 616 142 940 42 |
| tanhalpha | 1.488 360 570 031 919 3 |
| num_split | 1 |
| step_size | 200 |
| clip | 5 |
For Autoformer, hyperparameter optimization focuses on transformer-specific architectural choices, including embedding dimension, number of attention heads, encoder and decoder depths, feedforward network width, and moving-average window length used in the series decomposition module. Standard training parameters such as learning rate, dropout, and batch size are optimized jointly. The selected hyperparameters are reported in Table E.3.
Table E.3: Optimal hyperparameters for Autoformer.
| Parameter | Value |
|---|---|
| d_model | 256 |
| n_heads | 4 |
| e_layers | 3 |
| d_layers | 1 |
| d_ff | 512 |
| batch_size | 16 |
| learning_rate | 0.000 549 896 697 732 742 8 |
| dropout | 0.178 064 704 104 123 06 |
| moving_avg | 25 |
| factor | 3 |
| activation | relu |
Appendix E.2. The other baseline models
For the remaining baseline models—LSTM, TCN, and CTCN—we do not perform automated hyperparameter optimization. Instead, these models are trained using commonly adopted configurations from the literature to serve as reference benchmarks rather than fully optimized competitors. All baseline models are trained using the Adam optimizer [47], which combines adaptive learning rates with momentum-based updates.
Adam maintains exponential moving averages of the first- and second-order moments of the gradients to scale parameter updates adaptively, leading to faster convergence and improved stability compared to vanilla stochastic gradient descent. In our implementation, Adam is configured with weight decay for learning rate regularization, while all other optimizer settings follow the default values in PyTorch.
Appendix F. Comparison with the Causality from CTCN Model
This appendix contrasts the causal interpretation obtained from the baseline CTCN model with that of the proposed CG–TCN framework, highlighting fundamental differences in how predictive influence and causality are represented.
Causal Inference via Saliency Map (CTCN Model: baseline_ctcn)

Fig. F.1. Saliency-based causal inference results from the baseline CTCN model. The model places dominant emphasis on long-term trend components while underutilizing exogenous or calendar-based features.
Figure F.1 presents saliency-based attribution results for the baseline CTCN. The heatmap reports the relative importance of input features across historical lags, reflecting how the model assigns predictive influence through time. The CTCN places dominant emphasis on the long-horizon trend component (Trend_180), particularly at distant lags, suggesting that slowly evolving structural patterns account for most of the model's predictive power. In contrast, shorter-horizon components (Trend_60, Trend_20, and IMF_sum), contract attributes (MonthlyFee, EarlyTerminationFee), and calendar indicators (day-of-week, month, and holiday effects) receive comparatively little weight. While this behavior indicates that the CTCN effectively captures temporal persistence, the saliency patterns alone cannot distinguish true causal drivers from features that are merely correlated with long-term trends.
A comparison with the proposed CG–TCN framework reveals a key conceptual distinction. The CTCN adopts a flat attribution structure, in which all covariates directly contribute to the retail price prediction. Although this approach can capture strong statistical associations, it risks conflating correlation with causation, particularly in settings where multiple inputs share common temporal structure. By contrast, CG–TCN embeds an explicit causal graph that organizes dependencies hierarchically, routing the influence of exogenous variables through decomposed price trends before affecting the final retail price. This design redistributes attribution across interpretable causal pathways rather than concentrating weight on a small set of dominant predictors.


Fig. F.2. Conceptual comparison of causal structures. (a) The CG–TCN encodes a hierarchical causal graph that channels exogenous effects through decomposed price trends; (b) The baseline CTCN treats all inputs as direct predictors, potentially conflating correlations with true causal drivers.
Figure F.2 illustrates this difference schematically. In the CTCN representation (panel b), decomposed trends and exogenous variables are treated as independent predictors of retail electricity prices, without modeling their causal interdependencies. Such a structure may absorb exogenous effects into dominant trend components, obscuring the underlying price-formation mechanisms. In contrast, the CG–TCN (panel a) enforces a layered causal hierarchy: exogenous features first influence intermediate price trends through learned causal links, which then jointly determine the final retail price. This hierarchical formulation yields a more faithful and interpretable representation of retail electricity price dynamics, grounding predictive performance in structured causal reasoning rather than purely empirical correlations.