## 2 Causality Test Between Environmental Factors and Load Data
### Relationship Identification of Load and Influencing Factors Based on QGCT
The parametric model is applied to estimate the \(\tau\)-quantile of \(F_{Y}(\cdot\big{|}I_{t}^{Y},I_{t}^{Z})\) and to quantify the contribution of influencing factors to different quantiles of loads. Under the original assumptions of (8), the \(\tau\)-quantile \(Q_{\tau}^{Y}(\cdot\big{|}I_{t}^{Y})\) is correctly specified by the parametric quantile model of \(m\big{(}I_{t}^{Y},\theta_{0}(\tau)\big{)}\). The non-Granger causality null hypothesis and alternative hypothesis of (8) are rewritten as:  
\[ \begin{array}{l}H_{0}^{Z\to Y}:E\big{\{}f(Y_{t}\leq m(I_{t}^{Y}, \theta_{0}(\tau)))\big{|}I_{t}^{Y},I_{t}^{Z}\big{\}}=\tau,\ \tau\in T\\ H_{A}^{Z\to Y}:E\big{\{}f(Y_{t}\leq m(I_{t}^{Y},\theta_{0}(\tau)))\big{|}I_{t} ^{Y},I_{t}^{Z}\big{\}}\
eq\tau,\ \tau\in T\end{array}  \tag{9}\]  
where \(m\big{(}I_{t}^{Y},\theta_{0}(\tau)\big{)}\) correctly specifies the conditional quantile \(Q_{\tau}^{Y}\big{(}\cdot\big{|}I_{t}^{Y}\big{)}\). The null hypothetical equation can be characterized by a series of unconditional moment restrictions:  
\[E\Big{\{}\Big{[}f\Big{(}Y_{t}-m\Big{(}I_{t}^{Y},\theta_{0}(\tau)\Big{)}\leq 0 \Big{)}-\tau\Big{]}\exp\big{(}i\omega^{\prime}I_{t}\big{)}\Big{\}}=0,\tau\in T \tag{10}\]  
\[\exp\big{(}i\omega^{\prime}I_{t}\big{)}:=\exp[i(\omega_{1}(Y_{t-1},Z_{t-1})^{ \prime}+\ldots+\omega_{r}(Y_{t-r},Z_{t-r})^{\prime}) \tag{11}\]  
where \(\omega\in\mathbb{R}^{r}\), \(r\leq d\), and \(i=\sqrt{-1}\) is the imaginary root. The sample analog process for the test statistic is expressed as:\[\
u_{R}(\omega,\tau):=\frac{1}{\sqrt{R}}\sum_{t=1}^{R}\left[1\left(Y_{t}-m\left(I_{t }^{Y},\theta_{R}(\tau)\right)\leq 0\right)-\tau\right]\exp\left(i\omega^{ \prime}I_{t}\right) \tag{12}\]  
where \(\theta_{R}\) is the \(\sqrt{R}\)-consistent estimator of \(\theta_{0}(\tau)\). The test statistic can be expressed as:  
\[S_{R}:=\int_{T}\int_{\Omega}|\
u_{R}(\omega,\tau)|^{2}dF_{\omega}(\omega)dF_{ \tau}(\tau) \tag{13}\]  
where \(F_{\omega}(\cdot)\) is the conditional distribution function of the standard normal random vector, \(F_{\tau}(\cdot)\) follows a uniform discrete distribution over a \(T\)-network of \(n\) equally spaced points, and the weight vector \(\omega\in\mathbb{R}^{d}\) is derived from the standard normal distribution. The test statistic can be estimated from its sample simulation. Let \(\Psi\) be the \(T\times N\) matrix containing the elements \(\psi_{i,j}=\Psi_{\gamma_{j}}\left(Y_{i}-m\left(I_{i}^{Y},\theta_{R}\left(\tau _{j}\right)\right)\right)\), with \(\Psi_{\gamma}(\epsilon)=1(\epsilon\leq 0)-\tau_{j}\). The statistic can be tested as:  
\[S_{R}=\frac{1}{Rn}\sum_{j=1}^{n}\left|\psi^{\prime},j\Psi\psi_{j}\right| \tag{14}\]  
where \(w_{t,s}=\exp\left[-0.5(I_{t}-I_{s})^{2}\right]\in W\). When the value of \(S_{R}\) is large, the null hypothesis of Granger non-causality in (9) is rejected, that is there is Granger causality between the load and factors. Consequently, traditional Granger causality assesses average effects. However, electricity loads are often impacted differently under extreme weather conditions (e.g., extremely hot days). Quantile Granger causality allows modeling these effects at different points of the load distribution.