TeX 62.3%
Python 37.6%
1\FloatBarrier2\begin{appendices}34\section{Architectures: formal specification and diagrams}\label{app:arch}56This appendix gives the equations and block diagrams of the six proposed architectures as implemented in \texttt{src/wp23/models\_a\_torch.py}, \texttt{models\_b.py} and \texttt{models\_b\_torch.py}. Notation: $x$ standardised feature vector, $\mathbf{h}$ the thirteen-month relative history of the real-time index ($h_j = y^{\mathrm{rt}}_{o-12+j} - y^{\mathrm{rt}}_o$), $\tau \in \{0.05, 0.25, 0.5, 0.75, 0.95\}$ the quantile levels, $\ell_\tau(u) = \max(\tau u, (\tau-1)u)$ the pinball loss.78\paragraph{HSHN (Task A).} With $g_i = e_{\mathrm{reg}(i)} + e_{\mathrm{mrc}(i)} + e_{\mathrm{mun}(i)} \in \mathbb{R}^8$ and $e_{h} \in \mathbb{R}^4$,9\begin{equation}10z_i = \mathrm{GELU}\big(W_2\,\mathrm{GELU}(W_1 [x_i, g_i, e_{h_i}])\big),\quad v_i = \mathrm{GELU}\big(W_3 [z_i, g_i, e_{h_i}]\big),\quad \hat q_i = W_4 [z_i, v_i] \in \mathbb{R}^5,11\end{equation}12trained by $\min \sum_i \sum_\tau \ell_\tau(\log P_i - \hat q_{i,\tau}) + \lambda_{\mathrm{mun}} \|e_{\mathrm{mun}}\|^2 + \lambda \|\theta\|^2$ with $\lambda_{\mathrm{mun}} = 5\times10^{-3}$ (partial), $\lambda_{\mathrm{mun}} = 0$ (none) or $e_{\mathrm{mun}} \equiv 0$ (full).1314\paragraph{DSGFN (Task B).} Node encodings $z_u = \phi([x_u, \mathbf{h}_u])$; attention logits $a_{uv} = q_u^\top k_v / \sqrt{d} + \omega \log A_{uv}$ for $v \ne u$, $A_{uv} = \exp(-(d_{uv}/60\,\mathrm{km})^2)\,(\tfrac12 + \tfrac12 \rho_{uv})\,\mathbb{1}[\text{same level, class, origin}]$ with $\rho_{uv}$ the correlation of the two nodes' monthly real-time changes over the history; $n_u = \sum_v \mathrm{softmax}_v(a_{uv})\, V z_v$; $\hat q_u = \psi([z_u, n_u])$.1516\paragraph{RAREF (Task B).} Provincial real-time growth $g_1, \ldots, g_T$ (one per past origin, each from its own vintage); three-state Gaussian HMM $(\pi, A, \mu_k, \sigma_k)$ by Baum--Welch; filtered probabilities $p_{k,o} = P(s_o = k \mid g_{1:o})$; experts $\hat\beta_k = \argmin_\beta \sum_i p_{k,o(i)} (y_i - x_i^\top\beta)^2 + \alpha\|\beta\|^2$; forecast $\sum_k p_{k,o}\, x^\top \hat\beta_k$.1718\paragraph{BHPF (Task B).} $y = \beta_0 + x^\top\beta + u_{r} + u_{c} + \varepsilon$, $\beta \sim N(0, \tau_b^2 I)$, $u_r \sim N(0, \tau_r^2)$, $u_c \sim N(0, \tau_c^2)$, $\varepsilon \sim N(0, \sigma^2)$; posterior $N(\hat\theta, \Sigma)$ with $\Sigma = (D^\top D/\sigma^2 + \Lambda)^{-1}$, $\hat\theta = \Sigma D^\top y / \sigma^2$; variance components updated as $\tau_r^2 \leftarrow \mathrm{mean}(\hat u_r^2) + \mathrm{mean}(\mathrm{diag}\,\Sigma_{rr})$ (and likewise for $\tau_c^2$, $\sigma^2$) for fifteen iterations; predictive $N(d^\top\hat\theta, d^\top \Sigma d + \sigma^2)$.1920\paragraph{QANSS (Task B).} State at the origin $s_o = (\bar\Delta_3, \mathrm{sd}(\Delta), n\text{-ratio}-1, \Delta^{\mathrm{prov}}_3/3, \Delta^{\mathrm{reg}}_3/3, \Delta_{-1}, \Delta_{-2})$; network $(m(s), \log\varsigma(s)) = W_2 \tanh(W_1 s)$; forecast $h\, m(s_o)$ with predictive variance $\varsigma(s_o)^2 + \mathrm{se}_o^2$, estimated by maximising the Gaussian likelihood of the training targets.2122\paragraph{QREFA.} $\hat y = \sum_k w_k \hat y_k$ with $w = \argmin_{w \ge 0} \|y - F w\|^2$ on the training origins, normalised to sum to one; quantiles $\sum_k w_k \hat q_k$.2324\begin{figure}[H]\centering\footnotesize25\begin{tikzpicture}[node distance=5mm and 7mm, box/.style={draw, rounded corners=2pt, minimum height=6mm, minimum width=18mm, align=center, font=\footnotesize}, >={Stealth[length=2mm]}]26\node[box] (x) {hedonic + market\\features $x_i$};27\node[box, below=of x] (g) {geo embeddings\\$e_{\mathrm{reg}}+e_{\mathrm{mrc}}+e_{\mathrm{mun}}$};28\node[box, below=of g] (h) {horizon\\embedding $e_h$};29\node[box, right=of g, xshift=6mm] (enc) {encoder\\256--128 GELU};30\node[box, right=of enc] (int) {interaction\\block};31\node[box, right=of int] (head) {5 quantiles\\of $\log P$};32\draw[->] (x) -- (enc); \draw[->] (g) -- (enc); \draw[->] (h) -- (enc); \draw[->] (enc) -- (int); \draw[->] (g.east) to[out=-10,in=-120] (int.south); \draw[->] (int) -- (head); \draw[->] (enc.north) to[out=30,in=150] (head.north);33\node[above=1mm of int, font=\footnotesize\bfseries] {HSHN};34\begin{scope}[yshift=-52mm]35\node[box] (f) {node features\\$x_u$, history $\mathbf{h}_u$};36\node[box, right=of f] (ze) {node encoder\\$z_u$};37\node[box, right=of ze, xshift=4mm] (att) {graph attention\\prior $A$ (distance $\times$ co-movement)};38\node[box, right=of att] (hd) {head\\$[z_u, n_u] \to$ 5 quantiles};39\draw[->] (f) -- (ze); \draw[->] (ze) -- (att); \draw[->] (att) -- (hd); \draw[->] (ze) to[out=-20,in=-160] (hd);40\node[above=1mm of ze, font=\footnotesize\bfseries] {DSGFN};41\end{scope}42\begin{scope}[yshift=-76mm]43\node[box] (gs) {provincial growth\\$g_{1:o}$ (real-time)};44\node[box, right=of gs] (hmm) {3-state HMM\\filtered $p_{k,o}$};45\node[box, right=of hmm, xshift=4mm] (ex) {ridge experts\\$\hat\beta_1,\hat\beta_2,\hat\beta_3$};46\node[box, right=of ex] (mix) {$\sum_k p_{k,o}\,x^\top\hat\beta_k$};47\draw[->] (gs) -- (hmm); \draw[->] (hmm) -- (ex); \draw[->] (ex) -- (mix);48\node[above=1mm of hmm, font=\footnotesize\bfseries] {RAREF};49\end{scope}50\begin{scope}[yshift=-100mm]51\node[box] (st) {state $s_o$: drift, volatility,\\volume ratio, parent drifts};52\node[box, right=of st] (tr) {learned transition\\$W_2\tanh(W_1 s)$};53\node[box, right=of tr, xshift=4mm] (out) {$h\,m(s_o)$,\\ $\varsigma(s_o)^2 + \mathrm{se}_o^2$};54\draw[->] (st) -- (tr); \draw[->] (tr) -- (out);55\node[above=1mm of tr, font=\footnotesize\bfseries] {QANSS};56\node[box, right=of out, xshift=4mm] (q) {QREFA: NNLS stack of\\QANSS, BHPF, DSGFN, RAREF};57\end{scope}58\end{tikzpicture}59\caption{Block diagrams of the proposed architectures (BHPF is a conjugate linear-Gaussian hierarchy without a diagram).}\label{fig:diagrams}60\end{figure}6162\section{Hyper-parameters}\label{app:hyper}6364Table~\ref{tab:hyper} lists the hyper-parameters of every model. They were fixed before any test origin was evaluated and were not tuned; the seed variability of Section~\ref{sec:ablation} measures the uncertainty that tuning would have to overcome.6566\input{tables/tab_hyper}67\FloatBarrier6869\section{Leakage audit}\label{app:leakage}7071Table~\ref{tab:leakage} records, for each item of the protocol's audit list, where chronological separation is enforced in the code; the test suite (\texttt{tests/test\_wp23.py}) checks that the Task~A features of test sales are computed from sales dated on or before the origin.7273\input{tables/tab_leakage}74\FloatBarrier7576\section{Forecast comparison tests}\label{app:tests}7778Let $d_t = L_{A,t} - L_{B,t}$ be the difference of per-origin mean squared losses over $n$ origins. The Diebold--Mariano statistic is $\bar d / \sqrt{\hat\sigma^2_{\mathrm{HAC}}/n}$ with a Bartlett long-run variance of $h-1$ lags, multiplied by the Harvey--Leybourne--Newbold factor $\sqrt{(n + 1 - 2h + h(h-1)/n)/n}$ and compared with a $t_{n-1}$ distribution. The Giacomini--White statistic regresses $d_t$ on $z_{t-1} = (1, d_{t-1})$ and tests $\E[z_{t-1} d_t] = 0$ by a Wald statistic with the same HAC covariance, distributed $\chi^2_2$. The model confidence set starts from all models, computes $t_i = \bar d_{i\cdot}/\hat\sigma_i$ for the deviation of each model's mean loss from the cross-model mean, eliminates the model with the largest $t_i$ when the stationary-bootstrap $p$-value of $\max_i t_i$ (500 resamples, mean block length $\max(2,h)$) is below 10\%, and stops otherwise; reported $p$-values are the monotone MCS $p$-values of \citet{hansen2011mcs}. Holm step-down adjusted $p$-values of the Diebold--Mariano tests across the models of a horizon are given in Table~\ref{tab:tests_b}; Table~\ref{tab:gw_b} gives the unadjusted $p$-values and the Giacomini--White $p$-values.7980\input{tables/tab_tests_b}81\input{tables/tab_gw_b}82\FloatBarrier8384\section{Supplementary tables}\label{app:supp}8586Tables~\ref{tab:het_a_mun_size} to~\ref{tab:cost} supplement the main text: Task~A errors by municipality size and by price segment (the breakdown by class is Table~\ref{tab:het_a_property_class} in the main text); Task~B errors by cell size and level; the regional and provincial simulation tables of Section~\ref{sec:sim}; and the computational cost of every model, measured on one machine so that the accuracy gains of Section~\ref{sec:results} can be weighed against their price in computing time (the tree models cost seconds per fit, the neural models minutes, and BHPF, which solves a dense linear system, is the most expensive Task~B model).8788\input{tables/tab_het_a_mun_size}89\input{tables/tab_het_a_segment}90\input{tables/tab_het_b_size_level}91\input{tables/tab_sim_region}92\input{tables/tab_sim_province}93\input{tables/tab_cost}94\FloatBarrier9596\end{appendices}97