spb/qwhpi Public
QHPI — Quebec Housing Price Index: quality-adjusted, hierarchically pooled housing price indexes.
Python 63.9%
TypeScript 25.4%
CSS 5.5%
TeX 3.5%
SQL 0.8%
Makefile 0.5%
Dockerfile 0.5%
1% =============================================================================2% QWHPI — Quebec Weekly Housing Price Index3% Author : Simon-Pierre Boucher4% Contact : contact@spboucher.ai5% File : paper/qwhpi.tex6% Purpose : Methodology paper — A High-Frequency Hedonic Housing Price Index7% for Quebec.8% =============================================================================9\documentclass[11pt]{article}10\usepackage[margin=1.1in]{geometry}11\usepackage{amsmath, amssymb, booktabs, graphicx, natbib, hyperref}12\usepackage[utf8]{inputenc}13\usepackage[T1]{fontenc}1415\title{A High-Frequency Hedonic Housing Price Index for Quebec:\\16Weekly Measurement with Hierarchical Pooling}17\author{Simon-Pierre Boucher\thanks{Contact: contact@spboucher.ai. Code and18data pipeline: QWHPI platform repository.}}19\date{August 2026}2021\begin{document}22\maketitle2324\begin{abstract}25We construct quality-adjusted \emph{weekly} housing price indexes for Quebec26from roughly 745{,}000 geocoded residential transactions (2021--2026),27published for the province, its 17 administrative regions, and ten major28municipalities, by property type. The method combines a pooled hedonic29regression with week-by-type time effects (stage~1) and a hierarchical30state-space model that shrinks thin geography--type cells toward their parent31trends (stage~2). A repeat-sales benchmark, a downsampling experiment, and a32composition-shock simulation validate the design. Weekly measurement is33feasible far below conventional liquidity thresholds: with only 2534transactions per week the smoothed path deviates from the full-sample path by35under 0.8\% RMSE. All series carry calibrated uncertainty bands, reliability36grades, and a real-time (one-sided) variant that never uses future data.37\end{abstract}3839\section{Introduction}4041House price indexes are published monthly or quarterly almost everywhere,42yet the underlying transactions arrive continuously. The obstacle to weekly43measurement is not conceptual but statistical: weekly cells are thin, and44naive weekly averages confound price change with composition change. The45composition problem is classical \citep{court1939, rosen1974}; the thinness46problem is acute at weekly frequency for any geography below a large47metropolitan area. \citet{anenberg2017} demonstrate that timely house-price48measurement is feasible with appropriate pooling; we push frequency to the49week and geography to the municipality for a single Canadian province.5051Our contribution is a transparent two-stage architecture. Stage~1 is a52single pooled hedonic regression over the full sample in the time-dummy53tradition \citep{hill2013, handbook2013}: structural characteristics, fine54location fixed effects, and week$\times$type effects that constitute the55provincial weekly price paths. Stage~2 treats each sub-provincial cell's56weekly deviation from its parent path as a latent random walk observed57through the cell's weekly mean residual, estimated by Kalman filtering58\citep{kalman1960, durbin2012}. The observation variance scales inversely59with the week's transaction count, so liquid weeks speak for themselves60while thin weeks shrink toward the parent trend --- an empirical-Bayes61resolution of the thinness problem in the spirit of hierarchical modeling.6263\section{Data}6465The input is a registry extract of 745{,}119 residential transactions in661{,}100+ Quebec municipalities from January 2021 through July 2026, with67price, date, address, coordinates, property type (single-family, condominium,68plex, undetermined), floor area, year built, building type, and the municipal69assessment value. Coordinates are spatially joined to the official SDA701/20{,}000 administrative boundaries (100\% within-polygon match; 99.9\%71agreement with the raw city text field). The \emph{undetermined} type72(14.4\% of records, 95\%+ missing on all structural characteristics) never73enters any published index.7475Screens are economically motivated and fully tabulated: transfers priced76outside $[0.2, 5.0]$ times the municipal assessment (predominantly77non-arm's-length family transfers and estate settlements), conveyances above78\$10M (portfolio scale), and duplicate registrations --- 3.5\% of rows in79total, each flagged with a reason and never silently deleted. Implausible80characteristics (floor area outside $[20, 2000]$~m$^2$, year built after the81sale year) are nulled with indicators, not dropped. The research sample is82626{,}127 transactions across all 291 weeks.8384\section{Method}8586\subsection{Stage 1: pooled hedonic}8788For transaction $i$ in week $t(i)$, type $k(i)$, location $\ell(i)$:89\begin{equation}90\log P_i = \beta_1 \log \mathrm{FA}_i + \beta_2 \mathbb{1}[\mathrm{FA\ miss}]_i91+ f(\mathrm{age}_i) + \gamma_{b(i)} + \alpha_{\ell(i)} + \delta_{t(i),k(i)}92+ \varepsilon_i ,93\end{equation}94with age bins $f(\cdot)$, building-type effects $\gamma$, forward-sortation-area95fixed effects $\alpha$ (the postal-code level; finer than municipality),96and week$\times$type effects $\delta_{t,k}$. Missing floor areas are imputed by97conditional medians within type$\times$municipality and always flagged;98no future price information enters any imputation. The assessment value is99excluded from the headline model to avoid valuation feedback (it appears only100in a robustness specification and in the screens). Estimation is by101high-dimensional fixed-effects least squares on the full pooled sample102($R^2 = 0.60$); the paths $\delta_{\cdot,k}$, rebased so the 2021 average103equals 100, are the provincial indexes per type. Independent weekly104regressions are never run.105106\subsection{Stage 2: hierarchical weekly state}107108Let $e_i = \log P_i - \widehat{\log P_i}$ be stage-1 residuals. For a cell109$c$ (region$\times$type, then municipality$\times$type) define the weekly110mean $\bar e_{c,t}$ over $n_{c,t}$ transactions. The latent deviation111$d_{c,t}$ of the cell from its parent's path evolves as112\begin{equation}113\bar e_{c,t} = d_{c,t} + \epsilon_{c,t}, \quad114\epsilon_{c,t} \sim N(0, \sigma^2_c / n_{c,t}), \qquad115d_{c,t} = d_{c,t-1} + \eta_{c,t}, \quad \eta_{c,t} \sim N(0, \tau^2_c),116\end{equation}117with $\sigma^2_c$ the cell's residual variance and $\tau^2_c$ estimated by118maximum likelihood via the prediction-error decomposition. Zero-transaction119weeks are pure predictions --- the weekly grid is never broken. Municipality120deviations are estimated relative to the smoothed regional path, so the121published municipal index is122$\delta_{t,k} + \hat d^{\,\mathrm{region}}_{t} + \hat d^{\,\mathrm{city}}_{t}$.123The Kalman gain provides an interpretable shrinkage weight; the posterior124variance combines with the delta-method variance of $\delta_{t,k}$ into the125published 95\% band. Two variants ship for every series: the raw weekly126estimate and a strictly one-sided filtered path (\emph{no lookahead}) for127real-time use; a two-sided smoother is retained for research. The ``all128types'' series is a fixed-weight combination of the three type indexes with129full-sample transaction shares, in the stratification tradition of130\citet{handbook2013}.131132\section{Validation}133134\paragraph{Repeat sales.} A Bailey--Muth--Nourse index \citep{bailey1963,135caseshiller1989} on same-unit pairs (unit signature = address, floor area,136year built; 90-day minimum gap; 63k+ pairs) tracks the hedonic indexes'137relative paths closely: Montréal condominiums end 8.8\% below the provincial138condominium index by repeat sales versus 8.2\% by the hierarchical model.139Hedonic levels sit a few percent above repeat sales, consistent with the140well-documented depreciation/renovation bias of repeat-sales measures141\citep{goetzmann1992, bourassa2006}. Notably, a city-specific time-dummy142regression \emph{overstates} Montréal's divergence ($-14\%$) --- pooled143coefficients with local deviations are closer to the composition-free144benchmark than fully local estimation.145146\paragraph{Downsampling.} Using Montréal condominiums ($\sim$145/week) as a147laboratory, we thin each week to a target count and compare against the148full-sample path (20 replications): RMSE rises from 0.32\% (100/wk) to 0.64\%149(50/wk), 0.80\% (25/wk), 1.15\% (15/wk), 1.36\% (10/wk) and 1.63\% (5/wk);15095\% CI coverage stays above 0.97 down to 25/week and degrades to151$\sim$0.83 at 10/week. These results anchor the published A--E reliability152grades and the decision to publish (with warnings) rather than suppress thin153cells.154155\paragraph{Composition shock.} Removing 70\% of below-median floor-area156single-family sales for 26 weeks moves the raw median by $+11.7\%$ and the157hedonic index by $-0.7\%$: the index measures prices, not mix.158159\paragraph{Seasonality.} Annual harmonics on weekly log-changes are jointly160insignificant for all tested series ($p > 0.36$); all series are therefore161published NSA.162163\section{Findings}164165Between the 2021 base and July 2026 the provincial all-type index rises to166$\sim$156 ($+56\%$), with the 2022 spring boom, the 2022--23 rate-hike167correction, and a sustained 2024--26 expansion clearly timed at weekly168resolution. Regional heterogeneity is large: Montréal condominiums169appreciate roughly 27\% while several regions exceed 70\%. The weekly index170dates turning points 4--8 weeks earlier than the same methodology aggregated171to monthly frequency. The assessment-gap module (sale price / municipal172assessment) tracks the mechanical lag of triennial assessment rolls and is173published as a separate concept, never mixed with the price index.174175\section{Conclusion}176177Weekly, quality-adjusted, sub-provincial price measurement is practical with178transparent econometrics: one pooled hedonic regression plus one small179state-space model per cell, running end-to-end in under a minute on a laptop.180Honest uncertainty --- confidence bands, reliability grades, effective sample181sizes, partial-week flags, and preserved vintages --- is what makes182publication of thin cells defensible.183184\bibliographystyle{apalike}185\bibliography{references}186187\end{document}188