WP22: benchmarks complete, region/province comparison, revision pipeline with two modes
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
46 changed files +905 −54
modified
Makefile
+1 −1
@@ -8,7 +8,7 @@ benchmarks: | ||
| 8 | 8 | hmts: |
| 9 | 9 | $(PY) scripts/11_hmts.py |
| 10 | 10 | simulation: |
| 11 | − $(PY) scripts/20_simulation.py --reps 80 --workers 12 | |
| 11 | + $(PY) scripts/20_simulation.py --reps 80 --workers 12; $(PY) scripts/21_mc_summary.py | |
| 12 | 12 | panel: |
| 13 | 13 | $(PY) scripts/30_panel.py |
| 14 | 14 | vintages: |
added
data/processed/index_vintages_filtered_only.parquet
+0 −0
Binary file not shown.
modified
figures/fig_aggregation.pdf
+0 −0
Binary file not shown.
modified
figures/fig_arrival_profile.pdf
+0 −0
Binary file not shown.
modified
figures/fig_composition_shock.pdf
+0 −0
Binary file not shown.
modified
figures/fig_coverage_monthly.pdf
+0 −0
Binary file not shown.
modified
figures/fig_gain_vs_n.pdf
+0 −0
Binary file not shown.
modified
figures/fig_hedonic_profiles.pdf
+0 −0
Binary file not shown.
modified
figures/fig_map_municipal_house.pdf
+0 −0
Binary file not shown.
modified
figures/fig_moran.pdf
+0 −0
Binary file not shown.
modified
figures/fig_municipal_examples.pdf
+0 −0
Binary file not shown.
modified
figures/fig_municipal_examples.png
+0 −0
Binary file not shown.
modified
figures/fig_placebo.pdf
+0 −0
Binary file not shown.
modified
figures/fig_province_methods.pdf
+0 −0
Binary file not shown.
modified
figures/fig_province_methods.png
+0 −0
Binary file not shown.
modified
figures/fig_region_methods.pdf
+0 −0
Binary file not shown.
modified
figures/fig_region_methods.png
+0 −0
Binary file not shown.
modified
paper/figures/fig_aggregation.pdf
+0 −0
Binary file not shown.
modified
paper/figures/fig_arrival_profile.pdf
+0 −0
Binary file not shown.
modified
paper/figures/fig_composition_shock.pdf
+0 −0
Binary file not shown.
modified
paper/figures/fig_coverage_monthly.pdf
+0 −0
Binary file not shown.
modified
paper/figures/fig_gain_vs_n.pdf
+0 −0
Binary file not shown.
modified
paper/figures/fig_hedonic_profiles.pdf
+0 −0
Binary file not shown.
modified
paper/figures/fig_map_municipal_house.pdf
+0 −0
Binary file not shown.
modified
paper/figures/fig_moran.pdf
+0 −0
Binary file not shown.
modified
paper/figures/fig_municipal_examples.pdf
+0 −0
Binary file not shown.
modified
paper/figures/fig_placebo.pdf
+0 −0
Binary file not shown.
modified
paper/figures/fig_province_methods.pdf
+0 −0
Binary file not shown.
modified
paper/figures/fig_region_methods.pdf
+0 −0
Binary file not shown.
added
paper/main_anon.tex
+153 −0
@@ -0,0 +1,153 @@ | ||
| 1 | +% ============================================================================ | |
| 2 | +% UQO Working Paper Template — Economics / Finance | |
| 3 | +% ============================================================================ | |
| 4 | +\documentclass[12pt,letterpaper]{article} | |
| 5 | + | |
| 6 | +% --- Encoding & Language --- | |
| 7 | +\usepackage[utf8]{inputenc} | |
| 8 | +\usepackage[T1]{fontenc} | |
| 9 | +\usepackage[english]{babel} | |
| 10 | + | |
| 11 | +% --- Page Layout --- | |
| 12 | +\usepackage[ | |
| 13 | + letterpaper, | |
| 14 | + top=1in, | |
| 15 | + bottom=1in, | |
| 16 | + left=1in, | |
| 17 | + right=1in | |
| 18 | +]{geometry} | |
| 19 | + | |
| 20 | +% --- Typography --- | |
| 21 | +\usepackage{mathptmx} % Times-like font (text + math) | |
| 22 | +\usepackage{microtype} % Improved typographic refinements | |
| 23 | +\usepackage{setspace} | |
| 24 | +\onehalfspacing % 1.5 line spacing | |
| 25 | + | |
| 26 | +% --- Math --- | |
| 27 | +\usepackage{amsmath,amssymb,amsthm} | |
| 28 | + | |
| 29 | +% --- Tables --- | |
| 30 | +\usepackage{booktabs} | |
| 31 | +\usepackage{tabularx} | |
| 32 | +\usepackage{multirow} | |
| 33 | +\usepackage{threeparttable} | |
| 34 | +\usepackage{siunitx} | |
| 35 | +\sisetup{ | |
| 36 | + input-symbols = {()}, | |
| 37 | + table-format = -1.3, | |
| 38 | + parse-numbers = false | |
| 39 | +} | |
| 40 | + | |
| 41 | +% --- Figures --- | |
| 42 | +\usepackage{graphicx} | |
| 43 | +\usepackage{subcaption} | |
| 44 | +\usepackage{float} | |
| 45 | + | |
| 46 | +% --- Colors & Links --- | |
| 47 | +\usepackage[dvipsnames]{xcolor} | |
| 48 | +\usepackage[ | |
| 49 | + colorlinks = true, | |
| 50 | + linkcolor = NavyBlue, | |
| 51 | + citecolor = NavyBlue, | |
| 52 | + urlcolor = NavyBlue, | |
| 53 | + breaklinks = true | |
| 54 | +]{hyperref} | |
| 55 | +\hypersetup{pdftitle={SHARP-HPI: A Spatially Hierarchical, Adaptive and Robust Framework for Quality-Adjusted Housing Price Indices}, pdfauthor={}} | |
| 56 | + | |
| 57 | +% --- Bibliography --- | |
| 58 | +\usepackage[authoryear,round,semicolon]{natbib} | |
| 59 | +\bibliographystyle{aer} | |
| 60 | + | |
| 61 | +% --- Captions --- | |
| 62 | +\usepackage[ | |
| 63 | + font = small, | |
| 64 | + labelfont = bf, | |
| 65 | + labelsep = period, | |
| 66 | + justification = justified, | |
| 67 | + singlelinecheck = false | |
| 68 | +]{caption} | |
| 69 | + | |
| 70 | +% --- Headers & Footers --- | |
| 71 | +\usepackage{fancyhdr} | |
| 72 | +\pagestyle{fancy} | |
| 73 | +\fancyhf{} | |
| 74 | +\renewcommand{\headrulewidth}{0pt} | |
| 75 | +\fancyfoot[C]{\thepage} | |
| 76 | + | |
| 77 | +% --- Section Formatting --- | |
| 78 | +\usepackage{titlesec} | |
| 79 | +\titleformat{\section}{\large\bfseries}{\thesection.}{0.5em}{} | |
| 80 | +\titleformat{\subsection}{\normalsize\bfseries}{\thesubsection.}{0.5em}{} | |
| 81 | +\titleformat{\subsubsection}{\normalsize\itshape}{\thesubsubsection.}{0.5em}{} | |
| 82 | + | |
| 83 | +% --- Appendix Support --- | |
| 84 | +\usepackage[toc,page]{appendix} | |
| 85 | +\usepackage{longtable} | |
| 86 | +\usepackage{bm} | |
| 87 | +\input{tables/numbers} | |
| 88 | +\input{tables/numbers_missing} | |
| 89 | +\newtheorem{proposition}{Proposition} | |
| 90 | +\newtheorem{assumption}{Assumption} | |
| 91 | +\newtheorem{definition}{Definition} | |
| 92 | +\newcommand{\E}{\mathbb{E}} | |
| 93 | +\newcommand{\Var}{\mathrm{Var}} | |
| 94 | +\DeclareMathOperator*{\argmax}{arg\,max} | |
| 95 | + | |
| 96 | +% --- Misc --- | |
| 97 | +\usepackage{enumitem} | |
| 98 | +\setlist{nosep,leftmargin=*} | |
| 99 | + | |
| 100 | +% ============================================================================ | |
| 101 | +% METADATA — Edit these fields for each working paper | |
| 102 | +% ============================================================================ | |
| 103 | +\newcommand{\WPnumber}{22} | |
| 104 | +\newcommand{\WPtitle}{SHARP-HPI: A Spatially Hierarchical, Adaptive and Robust Framework for Quality-Adjusted Housing Price Indices} | |
| 105 | +\newcommand{\WPsubtitle}{Monthly municipal indices for Quebec from 770{,}000 registered sales, 2021--2026} | |
| 106 | +\newcommand{\WPdate}{October 2026} | |
| 107 | +\newcommand{\WPversion}{1.0} | |
| 108 | +\input{sections/abstract} | |
| 109 | +\newcommand{\WPkeywords}{house price index, hedonic regression, state-space model, small-area estimation, empirical Bayes, real-time data, Quebec} | |
| 110 | +\newcommand{\WPjel}{R31, C43, C11, C21, C55} | |
| 111 | + | |
| 112 | +% --- Author --- | |
| 113 | +\newcommand{\WPauthor}{Simon-Pierre Boucher} | |
| 114 | +\newcommand{\WPaffiliation}{% | |
| 115 | + Département des sciences administratives\\ | |
| 116 | + Université du Québec en Outaouais% | |
| 117 | +} | |
| 118 | +\newcommand{\WPemail}{simon-pierre.boucher@uqo.ca} | |
| 119 | +\newcommand{\WPaddress}{% | |
| 120 | + Gatineau -- Pavillon Alexandre-Taché\\ | |
| 121 | + 283, boulevard Alexandre-Taché\\ | |
| 122 | + Gatineau, Québec, Canada J9A 1L8% | |
| 123 | +} | |
| 124 | + | |
| 125 | +% ============================================================================ | |
| 126 | +% DOCUMENT | |
| 127 | +% ============================================================================ | |
| 128 | +\begin{document} | |
| 129 | + | |
| 130 | +% --- Title Page --- | |
| 131 | +\input{sections/titlepage_anon} | |
| 132 | + | |
| 133 | +% --- Main Body --- | |
| 134 | +\input{sections/introduction} | |
| 135 | +\input{sections/literature} | |
| 136 | +\input{sections/data} | |
| 137 | +\input{sections/estimand} | |
| 138 | +\input{sections/framework} | |
| 139 | +\input{sections/estimation} | |
| 140 | +\input{sections/simulation} | |
| 141 | +\input{sections/empirical} | |
| 142 | +\input{sections/validation} | |
| 143 | +\input{sections/implications} | |
| 144 | +\input{sections/conclusion} | |
| 145 | + | |
| 146 | +% --- References --- | |
| 147 | +\newpage | |
| 148 | +\bibliography{references} | |
| 149 | + | |
| 150 | +% --- Appendix --- | |
| 151 | +\input{appendix/appendix} | |
| 152 | + | |
| 153 | +\end{document} | |
modified
paper/sections/validation.tex
+17 −1
@@ -2,7 +2,23 @@ | ||
| 2 | 2 | |
| 3 | 3 | \subsection{Benchmarks at the provincial and regional levels}\label{sec:bench} |
| 4 | 4 | |
| 5 | −%%BENCH%% | |
| 5 | +Table~\ref{tab:benchmarks_province} reports every benchmark at the provincial level: the cumulative log change from January 2021 to September 2026 and the standard deviation of monthly log changes, with wall-clock times. Figure~\ref{fig:provmethods} plots the series. Four facts stand out. First, the quality-adjusted methods agree on the magnitude of the house appreciation: pooled time dummies, rolling time dummies with any window and splice, hedonic imputation, GEKS, HMTS, the QHPI architecture and SHARP-HPI all lie between \ProvDrtdwOneThreemovementhouseTotal{} and \ProvGhmtswOneThreehouseTotal{} log points, against \ProvAmedianhouseTotal{} for the median and \ProvHrepeatsalescshouseTotal{} for Case--Shiller repeat sales. The median understates because the sold houses became smaller and older over the sample; repeat sales overstate because resold houses are renovated. Second, the chained imputation indices drift relative to their direct counterparts for condominiums and plexes (Laspeyres \ProvEhilaspeyreschainedcondoTotal{} against Paasche \ProvEhipaaschechainedcondoTotal{} for condominiums), the classical chain-drift of monthly chaining with per-period hedonic functions estimated on a few thousand sales. Third, methods differ far more in month-to-month volatility than in trend: the standard deviation of monthly changes is about 1.9 log points for the time-dummy family and SHARP, 2.8 for imputation and GEKS, 3--4 for the median and repeat sales, and 1.3--1.9 for HMTS, whose state-space smoothing of each base-period series is visible. Fourth, the gradient-boosting residual index, which forecasts each month's prices from models trained on earlier months, rises by only \ProvJgbmootresidualhouseTotal{} log points: a predictive model that learns location and time jointly absorbs part of the appreciation into its fitted surface, which is why predictive accuracy is not index accuracy. SHARP-HPI with and without time-varying quality prices differ by less than one log point in total at the provincial level; the drift matters below the province. | |
| 6 | + | |
| 7 | +\input{tables/tab_benchmarks_province} | |
| 8 | + | |
| 9 | +\begin{figure}[htbp]\centering | |
| 10 | +\includegraphics[width=\textwidth]{figures/fig_province_methods.pdf} | |
| 11 | +\caption{Provincial indices by method (2021 average $=100$), January 2021 to September 2026.}\label{fig:provmethods} | |
| 12 | +\end{figure} | |
| 13 | + | |
| 14 | +Table~\ref{tab:benchmarks_region} moves to the 16 administrative regions, where sample sizes range from 60 to 1{,}200 sales a month and the methods that estimate a separate hedonic function per region become unstable. The regional comparison has no truth; we report the volatility of each series and its root mean squared distance to the regional Case--Shiller index over 12-month changes. Three results are relevant to the design. The median and stratified median are two to three times as volatile as the hedonic methods and the farthest from repeat sales. Among hedonic methods, the QHPI architecture, which fits each liquid region with its own coefficients and smooths lightly, is the least volatile (\RegSdKqhpidirectlocaltdhouse{} for houses) and the closest to repeat sales (\RegRmseRSKqhpidirectlocaltdhouse); SHARP-HPI, whose regional path is the pooled provincial path plus a smoothed deviation, is less volatile than the pooled time dummy (\RegSdSsharphouse{} against \RegSdCpooledtdhouse) but not closer to repeat sales than it (\RegRmseRSSsharphouse{} against \RegRmseRSCpooledtdhouse). The reason is identifiable: with 400 to 1{,}200 sales a month the regional Kalman gain is close to one, so the SHARP regional path is essentially the pooled model's monthly regional mean, and the pooled model constrains quality prices to be common across regions. The Monte Carlo experiments of Section~\ref{sec:simulation}, where the truth is known, show that this costs little when quality prices are common and that regional estimates are then close to the truth; on the real data the repeat-sales arbiter, biased though it is, suggests that region-specific quality prices carry information at the regional level. Figure~\ref{fig:regmethods} shows six regions. | |
| 15 | + | |
| 16 | +\input{tables/tab_benchmarks_region} | |
| 17 | + | |
| 18 | +\begin{figure}[htbp]\centering | |
| 19 | +\includegraphics[width=\textwidth]{figures/fig_region_methods.pdf} | |
| 20 | +\caption{Regional house indices by method for six regions of decreasing liquidity (2021 $=100$).}\label{fig:regmethods} | |
| 21 | +\end{figure} | |
| 6 | 22 | |
| 7 | 23 | \subsection{Agreement with repeat sales} |
| 8 | 24 | |
modified
paper/tables/numbers.tex
+131 −0
@@ -248,6 +248,15 @@ | ||
| 248 | 248 | \newcommand{\PlaceboFPplexmrc}{0.2} |
| 249 | 249 | \newcommand{\PlaceboFPplexmunicipality}{0.1} |
| 250 | 250 | \newcommand{\PlaceboFPplexregion}{0.3} |
| 251 | +\newcommand{\PolFirstcondo}{0.16} | |
| 252 | +\newcommand{\PolFirsthouse}{0.16} | |
| 253 | +\newcommand{\PolFirstplex}{0.26} | |
| 254 | +\newcommand{\PolMeanAbscondo}{0.77} | |
| 255 | +\newcommand{\PolMeanAbshouse}{1.50} | |
| 256 | +\newcommand{\PolMeanAbsplex}{1.53} | |
| 257 | +\newcommand{\PolThirdcondo}{0.15} | |
| 258 | +\newcommand{\PolThirdhouse}{0.16} | |
| 259 | +\newcommand{\PolThirdplex}{0.26} | |
| 251 | 260 | \newcommand{\PriorTaucondomrc}{1.89} |
| 252 | 261 | \newcommand{\PriorTaucondomunicipality}{1.18} |
| 253 | 262 | \newcommand{\PriorTaucondoregion}{1.89} |
@@ -266,32 +275,72 @@ | ||
| 266 | 275 | \newcommand{\PriorVplexmrc}{7.6} |
| 267 | 276 | \newcommand{\PriorVplexmunicipality}{3.7} |
| 268 | 277 | \newcommand{\PriorVplexregion}{0.1} |
| 278 | +\newcommand{\ProvAmeancondoTotal}{36.3} | |
| 269 | 279 | \newcommand{\ProvAmeanhouseTotal}{47.8} |
| 280 | +\newcommand{\ProvAmeanplexTotal}{43.9} | |
| 281 | +\newcommand{\ProvAmediancondoTotal}{36.0} | |
| 270 | 282 | \newcommand{\ProvAmedianhouseTotal}{46.4} |
| 283 | +\newcommand{\ProvAmedianplexTotal}{50.9} | |
| 284 | +\newcommand{\ProvBstratifiedmediancondoTotal}{37.3} | |
| 271 | 285 | \newcommand{\ProvBstratifiedmedianhouseTotal}{54.0} |
| 286 | +\newcommand{\ProvBstratifiedmedianplexTotal}{49.6} | |
| 287 | +\newcommand{\ProvCpooledtdcondoTotal}{41.0} | |
| 272 | 288 | \newcommand{\ProvCpooledtdhouseTotal}{56.5} |
| 289 | +\newcommand{\ProvCpooledtdolscondoTotal}{40.9} | |
| 273 | 290 | \newcommand{\ProvCpooledtdolshouseTotal}{58.5} |
| 291 | +\newcommand{\ProvCpooledtdolsplexTotal}{48.7} | |
| 292 | +\newcommand{\ProvCpooledtdplexTotal}{51.4} | |
| 293 | +\newcommand{\ProvDrtdwOneThreemeancondoTotal}{37.2} | |
| 274 | 294 | \newcommand{\ProvDrtdwOneThreemeanhouseTotal}{55.6} |
| 295 | +\newcommand{\ProvDrtdwOneThreemeanplexTotal}{50.6} | |
| 296 | +\newcommand{\ProvDrtdwOneThreemovementcondoTotal}{37.1} | |
| 275 | 297 | \newcommand{\ProvDrtdwOneThreemovementhouseTotal}{55.0} |
| 298 | +\newcommand{\ProvDrtdwOneThreemovementplexTotal}{51.8} | |
| 299 | +\newcommand{\ProvDrtdwOneThreewindowcondoTotal}{38.7} | |
| 276 | 300 | \newcommand{\ProvDrtdwOneThreewindowhouseTotal}{56.5} |
| 301 | +\newcommand{\ProvDrtdwOneThreewindowplexTotal}{52.0} | |
| 302 | +\newcommand{\ProvDrtdwSevenmeancondoTotal}{37.3} | |
| 277 | 303 | \newcommand{\ProvDrtdwSevenmeanhouseTotal}{56.1} |
| 304 | +\newcommand{\ProvDrtdwSevenmeanplexTotal}{51.0} | |
| 305 | +\newcommand{\ProvDrtdwTwoFivemeancondoTotal}{39.4} | |
| 278 | 306 | \newcommand{\ProvDrtdwTwoFivemeanhouseTotal}{56.4} |
| 307 | +\newcommand{\ProvDrtdwTwoFivemeanplexTotal}{51.1} | |
| 308 | +\newcommand{\ProvEhifisherchainedcondoTotal}{41.1} | |
| 279 | 309 | \newcommand{\ProvEhifisherchainedhouseTotal}{56.5} |
| 310 | +\newcommand{\ProvEhifisherchainedplexTotal}{56.7} | |
| 311 | +\newcommand{\ProvEhifisherdirectcondoTotal}{41.5} | |
| 280 | 312 | \newcommand{\ProvEhifisherdirecthouseTotal}{59.0} |
| 313 | +\newcommand{\ProvEhifisherdirectplexTotal}{50.1} | |
| 314 | +\newcommand{\ProvEhilaspeyreschainedcondoTotal}{45.4} | |
| 281 | 315 | \newcommand{\ProvEhilaspeyreschainedhouseTotal}{56.4} |
| 316 | +\newcommand{\ProvEhilaspeyreschainedplexTotal}{55.6} | |
| 317 | +\newcommand{\ProvEhipaaschechainedcondoTotal}{36.8} | |
| 282 | 318 | \newcommand{\ProvEhipaaschechainedhouseTotal}{56.5} |
| 319 | +\newcommand{\ProvEhipaaschechainedplexTotal}{57.8} | |
| 320 | +\newcommand{\ProvFgekswOneThreemovementcondoTotal}{41.0} | |
| 283 | 321 | \newcommand{\ProvFgekswOneThreemovementhouseTotal}{58.8} |
| 322 | +\newcommand{\ProvFgekswOneThreemovementplexTotal}{52.3} | |
| 323 | +\newcommand{\ProvFgekswTwoFivemovementcondoTotal}{41.1} | |
| 284 | 324 | \newcommand{\ProvFgekswTwoFivemovementhouseTotal}{59.0} |
| 325 | +\newcommand{\ProvFgekswTwoFivemovementplexTotal}{51.8} | |
| 285 | 326 | \newcommand{\ProvGhmtswFourcondoTotal}{42.4} |
| 286 | 327 | \newcommand{\ProvGhmtswFourhouseTotal}{59.2} |
| 287 | 328 | \newcommand{\ProvGhmtswFourplexTotal}{53.2} |
| 288 | 329 | \newcommand{\ProvGhmtswOneThreecondoTotal}{42.2} |
| 289 | 330 | \newcommand{\ProvGhmtswOneThreehouseTotal}{60.1} |
| 290 | 331 | \newcommand{\ProvGhmtswOneThreeplexTotal}{54.9} |
| 332 | +\newcommand{\ProvHrepeatsalesbmncondoTotal}{38.6} | |
| 291 | 333 | \newcommand{\ProvHrepeatsalesbmnhouseTotal}{68.6} |
| 334 | +\newcommand{\ProvHrepeatsalesbmnplexTotal}{57.9} | |
| 335 | +\newcommand{\ProvHrepeatsalescscondoTotal}{37.6} | |
| 292 | 336 | \newcommand{\ProvHrepeatsalescshouseTotal}{67.6} |
| 337 | +\newcommand{\ProvHrepeatsalescsplexTotal}{58.5} | |
| 338 | +\newcommand{\ProvJgbmootresidualcondoTotal}{36.0} | |
| 293 | 339 | \newcommand{\ProvJgbmootresidualhouseTotal}{46.9} |
| 340 | +\newcommand{\ProvJgbmootresidualplexTotal}{39.3} | |
| 341 | +\newcommand{\ProvKqhpicondoTotal}{37.2} | |
| 294 | 342 | \newcommand{\ProvKqhpihouseTotal}{55.6} |
| 343 | +\newcommand{\ProvKqhpiplexTotal}{50.6} | |
| 295 | 344 | \newcommand{\ProvPeakMonthcondo}{2026-10} |
| 296 | 345 | \newcommand{\ProvPeakMonthhouse}{2026-06} |
| 297 | 346 | \newcommand{\ProvPeakMonthplex}{2026-06} |
@@ -301,8 +350,12 @@ | ||
| 301 | 350 | \newcommand{\ProvSepcondo}{136.4} |
| 302 | 351 | \newcommand{\ProvSephouse}{154.9} |
| 303 | 352 | \newcommand{\ProvSepplex}{151.2} |
| 353 | +\newcommand{\ProvSsharpcondoTotal}{41.5} | |
| 304 | 354 | \newcommand{\ProvSsharphouseTotal}{56.9} |
| 355 | +\newcommand{\ProvSsharpnotvcondoTotal}{41.0} | |
| 305 | 356 | \newcommand{\ProvSsharpnotvhouseTotal}{56.7} |
| 357 | +\newcommand{\ProvSsharpnotvplexTotal}{51.3} | |
| 358 | +\newcommand{\ProvSsharpplexTotal}{50.9} | |
| 306 | 359 | \newcommand{\ProvYoySepcondo}{1.3} |
| 307 | 360 | \newcommand{\ProvYoySephouse}{6.1} |
| 308 | 361 | \newcommand{\ProvYoySepplex}{4.8} |
@@ -326,6 +379,84 @@ | ||
| 326 | 379 | \newcommand{\RSGapTotalregioncondo}{-22.9} |
| 327 | 380 | \newcommand{\RSGapTotalregionhouse}{-0.1} |
| 328 | 381 | \newcommand{\RSGapTotalregionplex}{+3.7} |
| 382 | +\newcommand{\RegRmseRSAmediancondo}{13.0} | |
| 383 | +\newcommand{\RegRmseRSAmedianhouse}{13.7} | |
| 384 | +\newcommand{\RegRmseRSAmedianplex}{27.5} | |
| 385 | +\newcommand{\RegRmseRSBstratifiedmediancondo}{12.2} | |
| 386 | +\newcommand{\RegRmseRSBstratifiedmedianhouse}{13.2} | |
| 387 | +\newcommand{\RegRmseRSBstratifiedmedianplex}{26.0} | |
| 388 | +\newcommand{\RegRmseRSCpooledtdcondo}{11.1} | |
| 389 | +\newcommand{\RegRmseRSCpooledtdhouse}{12.6} | |
| 390 | +\newcommand{\RegRmseRSCpooledtdplex}{24.6} | |
| 391 | +\newcommand{\RegRmseRSDrtdwOneThreemeancondo}{12.0} | |
| 392 | +\newcommand{\RegRmseRSDrtdwOneThreemeanhouse}{12.8} | |
| 393 | +\newcommand{\RegRmseRSDrtdwOneThreemeanplex}{24.7} | |
| 394 | +\newcommand{\RegRmseRSEhifisherchainedcondo}{7.6} | |
| 395 | +\newcommand{\RegRmseRSEhifisherchainedhouse}{12.0} | |
| 396 | +\newcommand{\RegRmseRSEhifisherchainedplex}{17.8} | |
| 397 | +\newcommand{\RegRmseRSFgekswTwoFivemovementcondo}{6.5} | |
| 398 | +\newcommand{\RegRmseRSFgekswTwoFivemovementhouse}{9.7} | |
| 399 | +\newcommand{\RegRmseRSFgekswTwoFivemovementplex}{13.7} | |
| 400 | +\newcommand{\RegRmseRSGhmtswOneThreecondo}{6.2} | |
| 401 | +\newcommand{\RegRmseRSGhmtswOneThreehouse}{10.1} | |
| 402 | +\newcommand{\RegRmseRSGhmtswOneThreeplex}{14.2} | |
| 403 | +\newcommand{\RegRmseRSKqhpidirectlocaltdcondo}{6.6} | |
| 404 | +\newcommand{\RegRmseRSKqhpidirectlocaltdhouse}{9.9} | |
| 405 | +\newcommand{\RegRmseRSKqhpidirectlocaltdplex}{14.5} | |
| 406 | +\newcommand{\RegRmseRSSsharpcondo}{11.0} | |
| 407 | +\newcommand{\RegRmseRSSsharpfilteredcondo}{11.2} | |
| 408 | +\newcommand{\RegRmseRSSsharpfilteredhouse}{12.8} | |
| 409 | +\newcommand{\RegRmseRSSsharpfilteredplex}{24.7} | |
| 410 | +\newcommand{\RegRmseRSSsharphouse}{12.7} | |
| 411 | +\newcommand{\RegRmseRSSsharpplex}{24.8} | |
| 412 | +\newcommand{\RegSdAmediancondo}{9.17} | |
| 413 | +\newcommand{\RegSdAmedianhouse}{7.91} | |
| 414 | +\newcommand{\RegSdAmedianplex}{13.27} | |
| 415 | +\newcommand{\RegSdBstratifiedmediancondo}{6.21} | |
| 416 | +\newcommand{\RegSdBstratifiedmedianhouse}{6.16} | |
| 417 | +\newcommand{\RegSdBstratifiedmedianplex}{10.00} | |
| 418 | +\newcommand{\RegSdCpooledtdcondo}{4.65} | |
| 419 | +\newcommand{\RegSdCpooledtdhouse}{4.41} | |
| 420 | +\newcommand{\RegSdCpooledtdplex}{7.11} | |
| 421 | +\newcommand{\RegSdDrtdwOneThreemeancondo}{5.11} | |
| 422 | +\newcommand{\RegSdDrtdwOneThreemeanhouse}{4.87} | |
| 423 | +\newcommand{\RegSdDrtdwOneThreemeanplex}{8.91} | |
| 424 | +\newcommand{\RegSdEhifisherchainedcondo}{3.79} | |
| 425 | +\newcommand{\RegSdEhifisherchainedhouse}{5.42} | |
| 426 | +\newcommand{\RegSdEhifisherchainedplex}{7.23} | |
| 427 | +\newcommand{\RegSdFgekswTwoFivemovementcondo}{3.69} | |
| 428 | +\newcommand{\RegSdFgekswTwoFivemovementhouse}{5.19} | |
| 429 | +\newcommand{\RegSdFgekswTwoFivemovementplex}{6.30} | |
| 430 | +\newcommand{\RegSdGhmtswOneThreecondo}{0.95} | |
| 431 | +\newcommand{\RegSdGhmtswOneThreehouse}{1.59} | |
| 432 | +\newcommand{\RegSdGhmtswOneThreeplex}{1.09} | |
| 433 | +\newcommand{\RegSdKqhpidirectlocaltdcondo}{1.48} | |
| 434 | +\newcommand{\RegSdKqhpidirectlocaltdhouse}{2.33} | |
| 435 | +\newcommand{\RegSdKqhpidirectlocaltdplex}{2.20} | |
| 436 | +\newcommand{\RegSdSsharpcondo}{1.60} | |
| 437 | +\newcommand{\RegSdSsharpfilteredcondo}{2.28} | |
| 438 | +\newcommand{\RegSdSsharpfilteredhouse}{4.42} | |
| 439 | +\newcommand{\RegSdSsharpfilteredplex}{3.61} | |
| 440 | +\newcommand{\RegSdSsharphouse}{3.75} | |
| 441 | +\newcommand{\RegSdSsharpplex}{2.56} | |
| 442 | +\newcommand{\RevFirstTwelvecondomunicipality}{3.59} | |
| 443 | +\newcommand{\RevFirstTwelvecondoprovince}{0.25} | |
| 444 | +\newcommand{\RevFirstTwelvecondoregion}{1.93} | |
| 445 | +\newcommand{\RevFirstTwelvehousemunicipality}{2.42} | |
| 446 | +\newcommand{\RevFirstTwelvehouseprovince}{0.13} | |
| 447 | +\newcommand{\RevFirstTwelvehouseregion}{2.24} | |
| 448 | +\newcommand{\RevFirstTwelveplexmunicipality}{5.26} | |
| 449 | +\newcommand{\RevFirstTwelveplexprovince}{0.35} | |
| 450 | +\newcommand{\RevFirstTwelveplexregion}{2.05} | |
| 451 | +\newcommand{\RevFirstcondomunicipality}{1.82} | |
| 452 | +\newcommand{\RevFirstcondoprovince}{0.16} | |
| 453 | +\newcommand{\RevFirstcondoregion}{0.98} | |
| 454 | +\newcommand{\RevFirsthousemunicipality}{2.31} | |
| 455 | +\newcommand{\RevFirsthouseprovince}{0.16} | |
| 456 | +\newcommand{\RevFirsthouseregion}{1.93} | |
| 457 | +\newcommand{\RevFirstplexmunicipality}{3.03} | |
| 458 | +\newcommand{\RevFirstplexprovince}{0.26} | |
| 459 | +\newcommand{\RevFirstplexregion}{1.37} | |
| 329 | 460 | \newcommand{\RollSpatialAgree}{99.96} |
| 330 | 461 | \newcommand{\RtwoWithincondo}{0.63} |
| 331 | 462 | \newcommand{\RtwoWithinhouse}{0.53} |
modified
paper/tables/tab_benchmarks_province.tex
+22 −22
@@ -6,30 +6,30 @@ | ||
| 6 | 6 | \toprule |
| 7 | 7 | Method & H: total & H: s.d. $\Delta$ & C: total & C: s.d. $\Delta$ & P: total & P: s.d. $\Delta$ & sec. \\ |
| 8 | 8 | \midrule |
| 9 | −Median price & 46.4 & 3.97 & — & — & — & — & 0 \\ | |
| 10 | −Mean price & 47.8 & 3.79 & — & — & — & — & 0 \\ | |
| 11 | −Stratified median & 54.0 & 3.35 & — & — & — & — & 0 \\ | |
| 12 | −Pooled time dummy (OLS) & 58.5 & 2.58 & — & — & — & — & 1 \\ | |
| 13 | −Pooled time dummy (Huber) & 56.5 & 1.86 & — & — & — & — & 4 \\ | |
| 14 | −Rolling TD, 7 m, mean splice & 56.1 & 1.89 & — & — & — & — & 12 \\ | |
| 15 | −Rolling TD, 13 m, mean splice & 55.6 & 1.87 & — & — & — & — & 18 \\ | |
| 16 | −Rolling TD, 13 m, movement splice & 55.0 & 1.86 & — & — & — & — & 18 \\ | |
| 17 | −Rolling TD, 13 m, window splice & 56.5 & 1.91 & — & — & — & — & 18 \\ | |
| 18 | −Rolling TD, 25 m, mean splice & 56.4 & 1.86 & — & — & — & — & 32 \\ | |
| 19 | −Hedonic imputation Laspeyres (chained) & 56.4 & 2.76 & — & — & — & — & 5 \\ | |
| 20 | −Hedonic imputation Paasche (chained) & 56.5 & 2.76 & — & — & — & — & 5 \\ | |
| 21 | −Hedonic imputation Fisher (chained) & 56.5 & 2.75 & — & — & — & — & 4 \\ | |
| 22 | −Hedonic imputation Fisher (direct) & 59.0 & 2.76 & — & — & — & — & 4 \\ | |
| 23 | −GEKS-Fisher, 13 m & 58.8 & 2.78 & — & — & — & — & 16 \\ | |
| 24 | −GEKS-Fisher, 25 m & 59.0 & 2.78 & — & — & — & — & 27 \\ | |
| 9 | +Median price & 46.4 & 3.97 & 36.0 & 2.09 & 50.9 & 5.74 & 0 \\ | |
| 10 | +Mean price & 47.8 & 3.79 & 36.3 & 2.47 & 43.9 & 4.16 & 0 \\ | |
| 11 | +Stratified median & 54.0 & 3.35 & 37.3 & 1.88 & 49.6 & 4.61 & 0 \\ | |
| 12 | +Pooled time dummy (OLS) & 58.5 & 2.58 & 40.9 & 1.35 & 48.7 & 2.42 & 1 \\ | |
| 13 | +Pooled time dummy (Huber) & 56.5 & 1.86 & 41.0 & 1.06 & 51.4 & 1.94 & 4 \\ | |
| 14 | +Rolling TD, 7 m, mean splice & 56.1 & 1.89 & 37.3 & 1.01 & 51.0 & 2.06 & 12 \\ | |
| 15 | +Rolling TD, 13 m, mean splice & 55.6 & 1.87 & 37.2 & 1.02 & 50.6 & 1.91 & 18 \\ | |
| 16 | +Rolling TD, 13 m, movement splice & 55.0 & 1.86 & 37.1 & 1.00 & 51.8 & 1.91 & 18 \\ | |
| 17 | +Rolling TD, 13 m, window splice & 56.5 & 1.91 & 38.7 & 1.13 & 52.0 & 2.04 & 18 \\ | |
| 18 | +Rolling TD, 25 m, mean splice & 56.4 & 1.86 & 39.4 & 1.03 & 51.1 & 1.87 & 32 \\ | |
| 19 | +Hedonic imputation Laspeyres (chained) & 56.4 & 2.76 & 45.4 & 1.50 & 55.6 & 2.44 & 5 \\ | |
| 20 | +Hedonic imputation Paasche (chained) & 56.5 & 2.76 & 36.8 & 1.45 & 57.8 & 2.53 & 5 \\ | |
| 21 | +Hedonic imputation Fisher (chained) & 56.5 & 2.75 & 41.1 & 1.45 & 56.7 & 2.44 & 4 \\ | |
| 22 | +Hedonic imputation Fisher (direct) & 59.0 & 2.76 & 41.5 & 1.69 & 50.1 & 2.30 & 4 \\ | |
| 23 | +GEKS-Fisher, 13 m & 58.8 & 2.78 & 41.0 & 1.47 & 52.3 & 2.48 & 16 \\ | |
| 24 | +GEKS-Fisher, 25 m & 59.0 & 2.78 & 41.1 & 1.47 & 51.8 & 2.45 & 27 \\ | |
| 25 | 25 | HMTS, 4 m & 59.2 & 1.93 & 42.4 & 1.06 & 53.2 & 1.56 & — \\ |
| 26 | 26 | HMTS, 13 m & 60.1 & 1.92 & 42.2 & 0.90 & 54.9 & 1.29 & — \\ |
| 27 | −Repeat sales (BMN) & 68.6 & 3.02 & — & — & — & — & 0 \\ | |
| 28 | −Repeat sales (Case–Shiller) & 67.6 & 2.97 & — & — & — & — & 0 \\ | |
| 29 | −GBM out-of-time residual & 46.9 & 2.54 & — & — & — & — & 191 \\ | |
| 30 | −QHPI v2.1 architecture & 55.6 & 1.87 & — & — & — & — & 18 \\ | |
| 31 | −SHARP stage 1 without time-varying prices & 56.7 & 1.91 & — & — & — & — & 21 \\ | |
| 32 | −SHARP-HPI & 56.9 & 1.91 & — & — & — & — & 21 \\ | |
| 27 | +Repeat sales (BMN) & 68.6 & 3.02 & 38.6 & 1.71 & 57.9 & 4.58 & 0 \\ | |
| 28 | +Repeat sales (Case–Shiller) & 67.6 & 2.97 & 37.6 & 1.73 & 58.5 & 4.61 & 0 \\ | |
| 29 | +GBM out-of-time residual & 46.9 & 2.54 & 36.0 & 1.46 & 39.3 & 2.32 & 191 \\ | |
| 30 | +QHPI v2.1 architecture & 55.6 & 1.87 & 37.2 & 1.02 & 50.6 & 1.91 & 18 \\ | |
| 31 | +SHARP stage 1 without time-varying prices & 56.7 & 1.91 & 41.0 & 1.06 & 51.3 & 1.98 & 21 \\ | |
| 32 | +SHARP-HPI & 56.9 & 1.91 & 41.5 & 1.04 & 50.9 & 1.97 & 21 \\ | |
| 33 | 33 | \bottomrule |
| 34 | 34 | \end{tabular} |
| 35 | 35 | \begin{tablenotes}\footnotesize\item H = houses, C = condominiums, P = plexes. Rolling TD = rolling time dummy; GEKS on bilateral double-imputation Fisher links with movement splice; HMTS = hedonic multilateral time series (Ishaak et al., 2024); QHPI = re-implementation of the QWHPI v2.1 architecture; last column = wall-clock seconds for the house sample on one Apple M-series core.\end{tablenotes} |
modified
paper/tables/tab_benchmarks_region.tex
+10 −10
@@ -6,16 +6,16 @@ | ||
| 6 | 6 | \toprule |
| 7 | 7 | Method & H: s.d. $\Delta$ & H: RMSE vs RS & C: s.d. $\Delta$ & C: RMSE vs RS & P: s.d. $\Delta$ & P: RMSE vs RS \\ |
| 8 | 8 | \midrule |
| 9 | −Median price & 7.91 & 13.7 & — & — & — & — \\ | |
| 10 | −Stratified median & 6.16 & 13.2 & — & — & — & — \\ | |
| 11 | −Pooled time dummy (Huber) & 4.41 & 12.6 & — & — & — & — \\ | |
| 12 | −Rolling TD, 13 m, mean splice & 4.87 & 12.8 & — & — & — & — \\ | |
| 13 | −Hedonic imputation Fisher (chained) & 5.42 & 12.0 & — & — & — & — \\ | |
| 14 | −GEKS-Fisher, 25 m & 5.19 & 9.7 & — & — & — & — \\ | |
| 15 | −HMTS, 13 m & nan & 10.1 & nan & — & nan & — \\ | |
| 16 | −QHPI v2.1 architecture & 2.33 & 9.9 & — & — & — & — \\ | |
| 17 | −SHARP-HPI (real-time filtered) & 4.42 & 12.8 & — & — & — & — \\ | |
| 18 | −SHARP-HPI & 3.75 & 12.7 & — & — & — & — \\ | |
| 9 | +Median price & 7.91 & 13.7 & 9.17 & 13.0 & 13.27 & 27.5 \\ | |
| 10 | +Stratified median & 6.16 & 13.2 & 6.21 & 12.2 & 10.00 & 26.0 \\ | |
| 11 | +Pooled time dummy (Huber) & 4.41 & 12.6 & 4.65 & 11.1 & 7.11 & 24.6 \\ | |
| 12 | +Rolling TD, 13 m, mean splice & 4.87 & 12.8 & 5.11 & 12.0 & 8.91 & 24.7 \\ | |
| 13 | +Hedonic imputation Fisher (chained) & 5.42 & 12.0 & 3.79 & 7.6 & 7.23 & 17.8 \\ | |
| 14 | +GEKS-Fisher, 25 m & 5.19 & 9.7 & 3.69 & 6.5 & 6.30 & 13.7 \\ | |
| 15 | +HMTS, 13 m & 1.59 & 10.1 & 0.95 & 6.2 & 1.09 & 14.2 \\ | |
| 16 | +QHPI v2.1 architecture & 2.33 & 9.9 & 1.48 & 6.6 & 2.20 & 14.5 \\ | |
| 17 | +SHARP-HPI (real-time filtered) & 4.42 & 12.8 & 2.28 & 11.2 & 3.61 & 24.7 \\ | |
| 18 | +SHARP-HPI & 3.75 & 12.7 & 1.60 & 11.0 & 2.56 & 24.8 \\ | |
| 19 | 19 | \bottomrule |
| 20 | 20 | \end{tabular} |
| 21 | 21 | \begin{tablenotes}\footnotesize\item Repeat sales are an independent (pair-based) arbiter, not the truth: they carry renovation and selection biases. Lower s.d. is not better per se; the Monte Carlo (Section 7) separates noise from signal.\end{tablenotes} |
added
paper/tables/tab_policies.tex
+16 −0
@@ -0,0 +1,16 @@ | ||
| 1 | +\begin{table}[htbp] | |
| 2 | +\centering\small | |
| 3 | +\caption{Provincial monthly change (×100): first and third release versus final}\label{tab:policies} | |
| 4 | +\begin{threeparttable} | |
| 5 | +\begin{tabular}{lrrrrrrr} | |
| 6 | +\toprule | |
| 7 | +Class & Months & MAE first release & Bias first release & MAE third release & RMSE first & RMSE third & Mean $|\Delta|$ \\ | |
| 8 | +\midrule | |
| 9 | +condo & 52 & 0.16 & +0.013 & 0.15 & 0.21 & 0.20 & 0.77 \\ | |
| 10 | +house & 52 & 0.16 & -0.013 & 0.16 & 0.20 & 0.20 & 1.50 \\ | |
| 11 | +plex & 52 & 0.26 & -0.014 & 0.26 & 0.35 & 0.35 & 1.53 \\ | |
| 12 | +\bottomrule | |
| 13 | +\end{tabular} | |
| 14 | +\begin{tablenotes}\footnotesize\item Full re-estimation policy (smoothed at each vintage). A revision-limited policy freezes the value at the third release; the frozen-first-release (movement-splice) policy is in Table~\ref{tab:revisions_frozen}.\end{tablenotes} | |
| 15 | +\end{threeparttable} | |
| 16 | +\end{table} | |
added
paper/tables/tab_revisions.tex
+22 −0
@@ -0,0 +1,22 @@ | ||
| 1 | +\begin{table}[htbp] | |
| 2 | +\centering\footnotesize | |
| 3 | +\caption{Real-time vintages: mean absolute revision of the monthly log change (×100) between the $k$-th release and the final retrospective estimate}\label{tab:revisions} | |
| 4 | +\begin{threeparttable} | |
| 5 | +\begin{tabular}{lrrrrrrr} | |
| 6 | +\toprule | |
| 7 | +Class / level & Rel. 1 & Rel. 2 & Rel. 3 & Rel. 6 & Rel. 12 & 12-m change, rel. 1 & \% $|$rev$|>1$ pt \\ | |
| 8 | +\midrule | |
| 9 | +house / province & 0.16 & 0.17 & 0.16 & 0.15 & 0.15 & 0.13 & 0 \\ | |
| 10 | +house / region & 1.93 & 1.95 & 1.96 & 1.91 & 1.94 & 2.24 & 53 \\ | |
| 11 | +house / municipality & 2.31 & 2.31 & 2.33 & 2.35 & 2.43 & 2.42 & 65 \\ | |
| 12 | +condo / province & 0.16 & 0.16 & 0.16 & 0.17 & 0.16 & 0.25 & 0 \\ | |
| 13 | +condo / region & 0.98 & 0.98 & 1.00 & 1.04 & 0.98 & 1.93 & 34 \\ | |
| 14 | +condo / municipality & 1.82 & 1.83 & 1.83 & 1.88 & 1.87 & 3.59 & 54 \\ | |
| 15 | +plex / province & 0.26 & 0.25 & 0.26 & 0.27 & 0.24 & 0.35 & 0 \\ | |
| 16 | +plex / region & 1.37 & 1.38 & 1.36 & 1.35 & 1.41 & 2.05 & 53 \\ | |
| 17 | +plex / municipality & 3.03 & 3.03 & 3.03 & 3.05 & 3.00 & 5.26 & 73 \\ | |
| 18 | +\bottomrule | |
| 19 | +\end{tabular} | |
| 20 | +\begin{tablenotes}\footnotesize\item Releases simulated monthly from July 2022 to October 2026 with a 10-day publication delay; municipalities with at least 1,500 sales. Final = smoothed full-sample panel.\end{tablenotes} | |
| 21 | +\end{threeparttable} | |
| 22 | +\end{table} | |
modified
results/benchmarks/series.parquet
+0 −0
Binary file not shown.
modified
results/benchmarks/timing.csv
+334 −0
@@ -194,3 +194,337 @@ house,region,17,H_repeat_sales_cs,0.06 | ||
| 194 | 194 | house,region,17,K_qhpi_direct_local_td,0.9 |
| 195 | 195 | house,region,17,S_sharp,0.0 |
| 196 | 196 | house,region,17,S_sharp_filtered,0.0 |
| 197 | +condo,province,QC,A_median,0.02 | |
| 198 | +condo,province,QC,A_mean,0.01 | |
| 199 | +condo,province,QC,B_stratified_median,0.08 | |
| 200 | +condo,province,QC,C_pooled_td,1.59 | |
| 201 | +condo,province,QC,C_pooled_td_ols,0.42 | |
| 202 | +condo,province,QC,D_rtd_w13_mean,15.03 | |
| 203 | +condo,province,QC,D_rtd_w13_movement,15.19 | |
| 204 | +condo,province,QC,D_rtd_w13_window,15.69 | |
| 205 | +condo,province,QC,D_rtd_w25_mean,19.94 | |
| 206 | +condo,province,QC,D_rtd_w7_mean,13.26 | |
| 207 | +condo,province,QC,E_hi_laspeyres_chained,9.36 | |
| 208 | +condo,province,QC,E_hi_paasche_chained,9.52 | |
| 209 | +condo,province,QC,E_hi_fisher_chained,9.42 | |
| 210 | +condo,province,QC,E_hi_fisher_direct,9.23 | |
| 211 | +condo,province,QC,F_geks_w25_movement,53.6 | |
| 212 | +condo,province,QC,F_geks_w13_movement,32.0 | |
| 213 | +condo,province,QC,H_repeat_sales_cs,0.25 | |
| 214 | +condo,province,QC,H_repeat_sales_bmn,0.22 | |
| 215 | +condo,province,QC,J_gbm_oot_residual,43819.94 | |
| 216 | +condo,province,QC,K_qhpi,18.44 | |
| 217 | +condo,province,QC,S_sharp,11.9 | |
| 218 | +condo,province,QC,S_sharp_notv,11.6 | |
| 219 | +condo,region,01,A_median,0.0 | |
| 220 | +condo,region,01,B_stratified_median,0.01 | |
| 221 | +condo,region,01,C_pooled_td,0.24 | |
| 222 | +condo,region,01,D_rtd_w13_mean,7.75 | |
| 223 | +condo,region,01,E_hi_fisher,0.24 | |
| 224 | +condo,region,01,F_geks_w25,0.22 | |
| 225 | +condo,region,01,H_repeat_sales_cs,0.03 | |
| 226 | +condo,region,01,K_qhpi_hierarchical,0.02 | |
| 227 | +condo,region,01,S_sharp,0.0 | |
| 228 | +condo,region,01,S_sharp_filtered,0.0 | |
| 229 | +condo,region,02,A_median,0.0 | |
| 230 | +condo,region,02,B_stratified_median,0.01 | |
| 231 | +condo,region,02,C_pooled_td,0.09 | |
| 232 | +condo,region,02,D_rtd_w13_mean,4.75 | |
| 233 | +condo,region,02,E_hi_fisher,0.2 | |
| 234 | +condo,region,02,F_geks_w25,0.23 | |
| 235 | +condo,region,02,H_repeat_sales_cs,0.02 | |
| 236 | +condo,region,02,K_qhpi_hierarchical,0.01 | |
| 237 | +condo,region,02,S_sharp,0.0 | |
| 238 | +condo,region,02,S_sharp_filtered,0.0 | |
| 239 | +condo,region,03,A_median,0.01 | |
| 240 | +condo,region,03,B_stratified_median,0.02 | |
| 241 | +condo,region,03,C_pooled_td,0.25 | |
| 242 | +condo,region,03,D_rtd_w13_mean,6.24 | |
| 243 | +condo,region,03,E_hi_fisher_chained,6.07 | |
| 244 | +condo,region,03,F_geks_w25_movement,35.6 | |
| 245 | +condo,region,03,H_repeat_sales_cs,0.04 | |
| 246 | +condo,region,03,K_qhpi_direct_local_td,0.63 | |
| 247 | +condo,region,03,S_sharp,0.0 | |
| 248 | +condo,region,03,S_sharp_filtered,0.0 | |
| 249 | +condo,region,04,A_median,0.01 | |
| 250 | +condo,region,04,B_stratified_median,0.01 | |
| 251 | +condo,region,04,C_pooled_td,0.11 | |
| 252 | +condo,region,04,D_rtd_w13_mean,7.3 | |
| 253 | +condo,region,04,E_hi_fisher_chained,0.45 | |
| 254 | +condo,region,04,F_geks_w25_movement,0.83 | |
| 255 | +condo,region,04,H_repeat_sales_cs,0.05 | |
| 256 | +condo,region,04,K_qhpi_hierarchical,0.03 | |
| 257 | +condo,region,04,S_sharp,0.0 | |
| 258 | +condo,region,04,S_sharp_filtered,0.0 | |
| 259 | +condo,region,05,A_median,0.01 | |
| 260 | +condo,region,05,B_stratified_median,0.06 | |
| 261 | +condo,region,05,C_pooled_td,0.5 | |
| 262 | +condo,region,05,D_rtd_w13_mean,10.38 | |
| 263 | +condo,region,05,E_hi_fisher_chained,4.94 | |
| 264 | +condo,region,05,F_geks_w25_movement,28.4 | |
| 265 | +condo,region,05,H_repeat_sales_cs,0.02 | |
| 266 | +condo,region,05,K_qhpi_direct_local_td,0.46 | |
| 267 | +condo,region,05,S_sharp,0.0 | |
| 268 | +condo,region,05,S_sharp_filtered,0.0 | |
| 269 | +condo,region,06,A_median,0.01 | |
| 270 | +condo,region,06,B_stratified_median,0.02 | |
| 271 | +condo,region,06,C_pooled_td,0.51 | |
| 272 | +condo,region,06,D_rtd_w13_mean,7.13 | |
| 273 | +condo,region,06,E_hi_fisher_chained,6.22 | |
| 274 | +condo,region,06,F_geks_w25_movement,35.03 | |
| 275 | +condo,region,06,H_repeat_sales_cs,0.08 | |
| 276 | +condo,region,06,K_qhpi_direct_local_td,1.05 | |
| 277 | +condo,region,06,S_sharp,0.0 | |
| 278 | +condo,region,06,S_sharp_filtered,0.0 | |
| 279 | +condo,region,07,A_median,0.0 | |
| 280 | +condo,region,07,B_stratified_median,0.01 | |
| 281 | +condo,region,07,C_pooled_td,0.12 | |
| 282 | +condo,region,07,D_rtd_w13_mean,5.06 | |
| 283 | +condo,region,07,E_hi_fisher_chained,4.87 | |
| 284 | +condo,region,07,F_geks_w25_movement,29.16 | |
| 285 | +condo,region,07,H_repeat_sales_cs,0.03 | |
| 286 | +condo,region,07,K_qhpi_direct_local_td,0.39 | |
| 287 | +condo,region,07,S_sharp,0.0 | |
| 288 | +condo,region,07,S_sharp_filtered,0.0 | |
| 289 | +condo,region,12,A_median,0.01 | |
| 290 | +condo,region,12,B_stratified_median,0.02 | |
| 291 | +condo,region,12,C_pooled_td,0.1 | |
| 292 | +condo,region,12,D_rtd_w13_mean,4.55 | |
| 293 | +condo,region,12,E_hi_fisher_chained,0.65 | |
| 294 | +condo,region,12,F_geks_w25_movement,0.96 | |
| 295 | +condo,region,12,H_repeat_sales_cs,0.02 | |
| 296 | +condo,region,12,K_qhpi_hierarchical,0.01 | |
| 297 | +condo,region,12,S_sharp,0.0 | |
| 298 | +condo,region,12,S_sharp_filtered,0.0 | |
| 299 | +condo,region,13,A_median,0.0 | |
| 300 | +condo,region,13,B_stratified_median,0.01 | |
| 301 | +condo,region,13,C_pooled_td,0.12 | |
| 302 | +condo,region,13,D_rtd_w13_mean,5.36 | |
| 303 | +condo,region,13,E_hi_fisher_chained,5.08 | |
| 304 | +condo,region,13,F_geks_w25_movement,31.53 | |
| 305 | +condo,region,13,H_repeat_sales_cs,0.03 | |
| 306 | +condo,region,13,K_qhpi_direct_local_td,0.46 | |
| 307 | +condo,region,13,S_sharp,0.0 | |
| 308 | +condo,region,13,S_sharp_filtered,0.0 | |
| 309 | +condo,region,14,A_median,0.01 | |
| 310 | +condo,region,14,B_stratified_median,0.01 | |
| 311 | +condo,region,14,C_pooled_td,0.16 | |
| 312 | +condo,region,14,D_rtd_w13_mean,5.09 | |
| 313 | +condo,region,14,E_hi_fisher_chained,5.04 | |
| 314 | +condo,region,14,F_geks_w25_movement,32.05 | |
| 315 | +condo,region,14,H_repeat_sales_cs,0.02 | |
| 316 | +condo,region,14,K_qhpi_direct_local_td,0.51 | |
| 317 | +condo,region,14,S_sharp,0.0 | |
| 318 | +condo,region,14,S_sharp_filtered,0.0 | |
| 319 | +condo,region,15,A_median,0.01 | |
| 320 | +condo,region,15,B_stratified_median,0.02 | |
| 321 | +condo,region,15,C_pooled_td,0.14 | |
| 322 | +condo,region,15,D_rtd_w13_mean,5.66 | |
| 323 | +condo,region,15,E_hi_fisher_chained,5.19 | |
| 324 | +condo,region,15,F_geks_w25_movement,33.68 | |
| 325 | +condo,region,15,H_repeat_sales_cs,0.04 | |
| 326 | +condo,region,15,K_qhpi_direct_local_td,0.61 | |
| 327 | +condo,region,15,S_sharp,0.0 | |
| 328 | +condo,region,15,S_sharp_filtered,0.0 | |
| 329 | +condo,region,16,A_median,0.01 | |
| 330 | +condo,region,16,B_stratified_median,0.02 | |
| 331 | +condo,region,16,C_pooled_td,0.3 | |
| 332 | +condo,region,16,D_rtd_w13_mean,6.04 | |
| 333 | +condo,region,16,E_hi_fisher_chained,5.77 | |
| 334 | +condo,region,16,F_geks_w25_movement,34.3 | |
| 335 | +condo,region,16,H_repeat_sales_cs,0.05 | |
| 336 | +condo,region,16,K_qhpi_direct_local_td,0.74 | |
| 337 | +condo,region,16,S_sharp,0.0 | |
| 338 | +condo,region,16,S_sharp_filtered,0.0 | |
| 339 | +condo,region,17,A_median,0.0 | |
| 340 | +condo,region,17,B_stratified_median,0.01 | |
| 341 | +condo,region,17,C_pooled_td,0.08 | |
| 342 | +condo,region,17,D_rtd_w13_mean,4.46 | |
| 343 | +condo,region,17,E_hi_fisher,0.2 | |
| 344 | +condo,region,17,F_geks_w25,0.23 | |
| 345 | +condo,region,17,H_repeat_sales_cs,0.02 | |
| 346 | +condo,region,17,K_qhpi_hierarchical,0.01 | |
| 347 | +condo,region,17,S_sharp,0.0 | |
| 348 | +condo,region,17,S_sharp_filtered,0.0 | |
| 349 | +plex,province,QC,A_median,0.01 | |
| 350 | +plex,province,QC,A_mean,0.01 | |
| 351 | +plex,province,QC,B_stratified_median,0.02 | |
| 352 | +plex,province,QC,C_pooled_td,0.81 | |
| 353 | +plex,province,QC,C_pooled_td_ols,0.22 | |
| 354 | +plex,province,QC,D_rtd_w13_mean,9.8 | |
| 355 | +plex,province,QC,D_rtd_w13_movement,8.33 | |
| 356 | +plex,province,QC,D_rtd_w13_window,8.27 | |
| 357 | +plex,province,QC,D_rtd_w25_mean,10.4 | |
| 358 | +plex,province,QC,D_rtd_w7_mean,7.1 | |
| 359 | +plex,province,QC,E_hi_laspeyres_chained,6.79 | |
| 360 | +plex,province,QC,E_hi_paasche_chained,7.45 | |
| 361 | +plex,province,QC,E_hi_fisher_chained,7.02 | |
| 362 | +plex,province,QC,E_hi_fisher_direct,7.16 | |
| 363 | +plex,province,QC,F_geks_w25_movement,41.07 | |
| 364 | +plex,province,QC,F_geks_w13_movement,23.89 | |
| 365 | +plex,province,QC,H_repeat_sales_cs,0.11 | |
| 366 | +plex,province,QC,H_repeat_sales_bmn,0.11 | |
| 367 | +plex,province,QC,J_gbm_oot_residual,247.49 | |
| 368 | +plex,province,QC,K_qhpi,10.98 | |
| 369 | +plex,province,QC,S_sharp,19.12 | |
| 370 | +plex,province,QC,S_sharp_notv,20.43 | |
| 371 | +plex,region,01,A_median,0.01 | |
| 372 | +plex,region,01,B_stratified_median,0.02 | |
| 373 | +plex,region,01,C_pooled_td,0.17 | |
| 374 | +plex,region,01,D_rtd_w13_mean,5.62 | |
| 375 | +plex,region,01,E_hi_fisher_chained,0.4 | |
| 376 | +plex,region,01,F_geks_w25_movement,0.5 | |
| 377 | +plex,region,01,H_repeat_sales_cs,0.03 | |
| 378 | +plex,region,01,K_qhpi_hierarchical,0.04 | |
| 379 | +plex,region,01,S_sharp,0.0 | |
| 380 | +plex,region,01,S_sharp_filtered,0.0 | |
| 381 | +plex,region,02,A_median,0.01 | |
| 382 | +plex,region,02,B_stratified_median,0.01 | |
| 383 | +plex,region,02,C_pooled_td,0.16 | |
| 384 | +plex,region,02,D_rtd_w13_mean,5.8 | |
| 385 | +plex,region,02,E_hi_fisher_chained,5.34 | |
| 386 | +plex,region,02,F_geks_w25_movement,28.81 | |
| 387 | +plex,region,02,H_repeat_sales_cs,0.03 | |
| 388 | +plex,region,02,K_qhpi_direct_local_td,0.47 | |
| 389 | +plex,region,02,S_sharp,0.0 | |
| 390 | +plex,region,02,S_sharp_filtered,0.0 | |
| 391 | +plex,region,03,A_median,0.0 | |
| 392 | +plex,region,03,B_stratified_median,0.01 | |
| 393 | +plex,region,03,C_pooled_td,0.15 | |
| 394 | +plex,region,03,D_rtd_w13_mean,5.84 | |
| 395 | +plex,region,03,E_hi_fisher_chained,6.38 | |
| 396 | +plex,region,03,F_geks_w25_movement,38.19 | |
| 397 | +plex,region,03,H_repeat_sales_cs,0.03 | |
| 398 | +plex,region,03,K_qhpi_direct_local_td,0.59 | |
| 399 | +plex,region,03,S_sharp,0.0 | |
| 400 | +plex,region,03,S_sharp_filtered,0.0 | |
| 401 | +plex,region,04,A_median,0.0 | |
| 402 | +plex,region,04,B_stratified_median,0.03 | |
| 403 | +plex,region,04,C_pooled_td,0.13 | |
| 404 | +plex,region,04,D_rtd_w13_mean,5.46 | |
| 405 | +plex,region,04,E_hi_fisher_chained,5.68 | |
| 406 | +plex,region,04,F_geks_w25_movement,35.51 | |
| 407 | +plex,region,04,H_repeat_sales_cs,0.02 | |
| 408 | +plex,region,04,K_qhpi_direct_local_td,0.5 | |
| 409 | +plex,region,04,S_sharp,0.0 | |
| 410 | +plex,region,04,S_sharp_filtered,0.0 | |
| 411 | +plex,region,05,A_median,0.01 | |
| 412 | +plex,region,05,B_stratified_median,0.02 | |
| 413 | +plex,region,05,C_pooled_td,0.15 | |
| 414 | +plex,region,05,D_rtd_w13_mean,5.8 | |
| 415 | +plex,region,05,E_hi_fisher_chained,5.95 | |
| 416 | +plex,region,05,F_geks_w25_movement,35.68 | |
| 417 | +plex,region,05,H_repeat_sales_cs,0.03 | |
| 418 | +plex,region,05,K_qhpi_direct_local_td,0.51 | |
| 419 | +plex,region,05,S_sharp,0.0 | |
| 420 | +plex,region,05,S_sharp_filtered,0.0 | |
| 421 | +plex,region,06,A_median,0.01 | |
| 422 | +plex,region,06,B_stratified_median,0.01 | |
| 423 | +plex,region,06,C_pooled_td,0.27 | |
| 424 | +plex,region,06,D_rtd_w13_mean,7.09 | |
| 425 | +plex,region,06,E_hi_fisher_chained,6.79 | |
| 426 | +plex,region,06,F_geks_w25_movement,40.86 | |
| 427 | +plex,region,06,H_repeat_sales_cs,0.04 | |
| 428 | +plex,region,06,K_qhpi_direct_local_td,0.94 | |
| 429 | +plex,region,06,S_sharp,0.0 | |
| 430 | +plex,region,06,S_sharp_filtered,0.0 | |
| 431 | +plex,region,07,A_median,0.01 | |
| 432 | +plex,region,07,B_stratified_median,0.01 | |
| 433 | +plex,region,07,C_pooled_td,0.15 | |
| 434 | +plex,region,07,D_rtd_w13_mean,6.16 | |
| 435 | +plex,region,07,E_hi_fisher_chained,5.35 | |
| 436 | +plex,region,07,F_geks_w25_movement,32.29 | |
| 437 | +plex,region,07,H_repeat_sales_cs,0.02 | |
| 438 | +plex,region,07,K_qhpi_direct_local_td,0.54 | |
| 439 | +plex,region,07,S_sharp,0.0 | |
| 440 | +plex,region,07,S_sharp_filtered,0.0 | |
| 441 | +plex,region,08,A_median,0.01 | |
| 442 | +plex,region,08,B_stratified_median,0.01 | |
| 443 | +plex,region,08,C_pooled_td,0.14 | |
| 444 | +plex,region,08,D_rtd_w13_mean,6.43 | |
| 445 | +plex,region,08,E_hi_fisher_chained,0.42 | |
| 446 | +plex,region,08,F_geks_w25_movement,0.6 | |
| 447 | +plex,region,08,H_repeat_sales_cs,0.02 | |
| 448 | +plex,region,08,K_qhpi_hierarchical,0.02 | |
| 449 | +plex,region,08,S_sharp,0.0 | |
| 450 | +plex,region,08,S_sharp_filtered,0.0 | |
| 451 | +plex,region,09,A_median,0.0 | |
| 452 | +plex,region,09,B_stratified_median,0.01 | |
| 453 | +plex,region,09,C_pooled_td,0.1 | |
| 454 | +plex,region,09,D_rtd_w13_mean,5.29 | |
| 455 | +plex,region,09,E_hi_fisher,0.18 | |
| 456 | +plex,region,09,F_geks_w25,0.2 | |
| 457 | +plex,region,09,H_repeat_sales_cs,0.02 | |
| 458 | +plex,region,09,K_qhpi_hierarchical,0.01 | |
| 459 | +plex,region,09,S_sharp,0.0 | |
| 460 | +plex,region,09,S_sharp_filtered,0.0 | |
| 461 | +plex,region,11,A_median,0.0 | |
| 462 | +plex,region,11,B_stratified_median,0.01 | |
| 463 | +plex,region,11,C_pooled_td,0.1 | |
| 464 | +plex,region,11,D_rtd_w13_mean,5.23 | |
| 465 | +plex,region,11,E_hi_fisher,0.23 | |
| 466 | +plex,region,11,F_geks_w25,0.29 | |
| 467 | +plex,region,11,H_repeat_sales_cs,0.03 | |
| 468 | +plex,region,11,K_qhpi_hierarchical,0.02 | |
| 469 | +plex,region,11,S_sharp,0.0 | |
| 470 | +plex,region,11,S_sharp_filtered,0.0 | |
| 471 | +plex,region,12,A_median,0.0 | |
| 472 | +plex,region,12,B_stratified_median,0.01 | |
| 473 | +plex,region,12,C_pooled_td,0.15 | |
| 474 | +plex,region,12,D_rtd_w13_mean,5.96 | |
| 475 | +plex,region,12,E_hi_fisher_chained,5.53 | |
| 476 | +plex,region,12,F_geks_w25_movement,27.8 | |
| 477 | +plex,region,12,H_repeat_sales_cs,0.03 | |
| 478 | +plex,region,12,K_qhpi_direct_local_td,0.55 | |
| 479 | +plex,region,12,S_sharp,0.0 | |
| 480 | +plex,region,12,S_sharp_filtered,0.0 | |
| 481 | +plex,region,13,A_median,0.01 | |
| 482 | +plex,region,13,B_stratified_median,0.01 | |
| 483 | +plex,region,13,C_pooled_td,0.13 | |
| 484 | +plex,region,13,D_rtd_w13_mean,5.28 | |
| 485 | +plex,region,13,E_hi_fisher_chained,2.37 | |
| 486 | +plex,region,13,F_geks_w25_movement,8.82 | |
| 487 | +plex,region,13,H_repeat_sales_cs,0.02 | |
| 488 | +plex,region,13,K_qhpi_hierarchical,0.02 | |
| 489 | +plex,region,13,S_sharp,0.0 | |
| 490 | +plex,region,13,S_sharp_filtered,0.0 | |
| 491 | +plex,region,14,A_median,0.0 | |
| 492 | +plex,region,14,B_stratified_median,0.02 | |
| 493 | +plex,region,14,C_pooled_td,0.15 | |
| 494 | +plex,region,14,D_rtd_w13_mean,6.49 | |
| 495 | +plex,region,14,E_hi_fisher_chained,6.09 | |
| 496 | +plex,region,14,F_geks_w25_movement,36.87 | |
| 497 | +plex,region,14,H_repeat_sales_cs,0.02 | |
| 498 | +plex,region,14,K_qhpi_direct_local_td,0.48 | |
| 499 | +plex,region,14,S_sharp,0.0 | |
| 500 | +plex,region,14,S_sharp_filtered,0.0 | |
| 501 | +plex,region,15,A_median,0.0 | |
| 502 | +plex,region,15,B_stratified_median,0.01 | |
| 503 | +plex,region,15,C_pooled_td,0.18 | |
| 504 | +plex,region,15,D_rtd_w13_mean,6.55 | |
| 505 | +plex,region,15,E_hi_fisher_chained,8.13 | |
| 506 | +plex,region,15,F_geks_w25_movement,46.56 | |
| 507 | +plex,region,15,H_repeat_sales_cs,0.06 | |
| 508 | +plex,region,15,K_qhpi_direct_local_td,0.8 | |
| 509 | +plex,region,15,S_sharp,0.0 | |
| 510 | +plex,region,15,S_sharp_filtered,0.0 | |
| 511 | +plex,region,16,A_median,0.0 | |
| 512 | +plex,region,16,B_stratified_median,0.04 | |
| 513 | +plex,region,16,C_pooled_td,0.28 | |
| 514 | +plex,region,16,D_rtd_w13_mean,9.42 | |
| 515 | +plex,region,16,E_hi_fisher_chained,8.15 | |
| 516 | +plex,region,16,F_geks_w25_movement,46.26 | |
| 517 | +plex,region,16,H_repeat_sales_cs,0.05 | |
| 518 | +plex,region,16,K_qhpi_direct_local_td,1.02 | |
| 519 | +plex,region,16,S_sharp,0.0 | |
| 520 | +plex,region,16,S_sharp_filtered,0.0 | |
| 521 | +plex,region,17,A_median,0.01 | |
| 522 | +plex,region,17,B_stratified_median,0.02 | |
| 523 | +plex,region,17,C_pooled_td,0.18 | |
| 524 | +plex,region,17,D_rtd_w13_mean,6.9 | |
| 525 | +plex,region,17,E_hi_fisher_chained,2.31 | |
| 526 | +plex,region,17,F_geks_w25_movement,6.57 | |
| 527 | +plex,region,17,H_repeat_sales_cs,0.02 | |
| 528 | +plex,region,17,K_qhpi_hierarchical,0.02 | |
| 529 | +plex,region,17,S_sharp,0.0 | |
| 530 | +plex,region,17,S_sharp_filtered,0.0 | |
added
results/vintages/revision_policies_province.csv
+4 −0
@@ -0,0 +1,4 @@ | ||
| 1 | +class,months,mae_first_release_vs_final,bias_first_release_vs_final,mae_third_release_vs_final,rmse_first,rmse_third,mean_abs_true_change | |
| 2 | +condo,52,0.0015620242064084064,0.00012999474800442522,0.0015485661521688215,0.0020789246210967667,0.0020302944477716685,0.007675301455052519 | |
| 3 | +house,52,0.0015532707391587841,-0.00012648911680931643,0.0015806828848220328,0.0020166096637717987,0.001978731246833613,0.015036741431184 | |
| 4 | +plex,52,0.0025609731874916717,-0.00013590920564457217,0.0025993659546795556,0.0035467549510441792,0.0035119400625493245,0.015285921387441144 | |
added
results/vintages/revisions_by_release.csv
+109 −0
@@ -0,0 +1,109 @@ | ||
| 1 | +class,level,release,obs,mae_rev_m1_vs_final,bias_rev_m1_vs_final,mae_rev_12m_vs_final,bias_rev_12m_vs_final,mae_rev_m1_vs_last_rt,mae_rev_12m_vs_last_rt,share_m1_rev_gt_1pct | |
| 2 | +condo,municipality,1,3326,0.018218959210363525,0.000016688468351380448,0.035899729145987345,-0.00021023850922487306,0.010687310523249133,0.018543645860963492,0.539386650631389 | |
| 3 | +condo,municipality,2,3326,0.01830369137665762,0.0003420352663881496,0.035203232880077505,0.000014803896699086845,0.010651332141485633,0.01800571985494987,0.5426939266386049 | |
| 4 | +condo,municipality,3,3326,0.018253256323750244,0.00016979601424385027,0.034917315515444566,-0.00007206650223968797,0.010565016295267286,0.017769186486300787,0.5469031870114252 | |
| 5 | +condo,municipality,4,3326,0.018498001562029184,-0.00023268101188767977,0.03468796870069724,-0.00006589479040444394,0.010597045308313584,0.017713744598356427,0.5463018641010222 | |
| 6 | +condo,municipality,5,3326,0.01890243926725158,0.00021581986863248198,0.035178307015601325,-0.00016159941438881678,0.010842865379196508,0.017952100712717328,0.550210463018641 | |
| 7 | +condo,municipality,6,3326,0.01881462255308852,0.00028753995744244874,0.03532503607865267,-0.000701690943807063,0.01091535931184554,0.018263884216127575,0.5493084786530367 | |
| 8 | +condo,municipality,7,3326,0.018671778319748422,0.0003328626747500349,0.036041158805345176,-0.0008354496235605425,0.010687919474979822,0.018484741694745257,0.5472038484666266 | |
| 9 | +condo,municipality,8,3326,0.01853143947049999,-0.00016892757131686554,0.03586994538523937,-0.000523705132569303,0.010673162772855687,0.01829841904002192,0.544798556825015 | |
| 10 | +condo,municipality,9,3326,0.01858009111707426,-0.0003449297154774869,0.03545922010754932,-0.00018396812920626674,0.01050755377992387,0.017667555346076835,0.5514131088394468 | |
| 11 | +condo,municipality,10,3326,0.0185982825211036,-0.00032078107918533257,0.034781251007409114,0.00034764241879270803,0.01036657598267548,0.017125414330917934,0.5472038484666266 | |
| 12 | +condo,municipality,11,3326,0.018560632418666984,-0.00042042842032594265,0.034129410672541334,0.0011552891842648084,0.010121351342934837,0.016301168671367203,0.5532170775706554 | |
| 13 | +condo,municipality,12,3326,0.018713291616592024,-0.00008723296083991139,0.033784122050478343,0.001846917023178393,0.01008536273096997,0.016165427891360936,0.5544197233914612 | |
| 14 | +condo,province,1,52,0.0015620242064084064,0.00012999474800442522,0.0024936086388600643,0.002180781249067779,0.0015620242064083995,0.0024936086388600443,0.0 | |
| 15 | +condo,province,2,52,0.001554788940591851,0.00021421155617977366,0.0024556995539281204,0.0021945097556216576,0.0015547889405918415,0.002455699553928104,0.0 | |
| 16 | +condo,province,3,52,0.0016383411282475647,0.00007172615245495256,0.002385968263163059,0.002127974502410657,0.00163834112824756,0.0023859682631630474,0.0 | |
| 17 | +condo,province,4,52,0.0016851200317672967,0.00015760816287830706,0.002420257628965046,0.0021891023199823692,0.001685120031767297,0.0024202576289650305,0.0 | |
| 18 | +condo,province,5,52,0.0016060504415260231,0.0001648223290224312,0.0023661487983808183,0.002172771548220345,0.0016060504415260288,0.002366148798380805,0.0 | |
| 19 | +condo,province,6,52,0.0016567502022934756,0.00028747540064996235,0.002405214592967795,0.0022068356583684673,0.0016567502022934812,0.00240521459296778,0.0 | |
| 20 | +condo,province,7,52,0.0016786515058316567,0.00020647669810997852,0.0023240913353446534,0.0020709014067529876,0.0016786515058316586,0.002324091335344652,0.0 | |
| 21 | +condo,province,8,52,0.001655389863398211,0.00024328274921799384,0.0022743724214897825,0.0020328784287352046,0.0016553898633982099,0.002274372421489772,0.0 | |
| 22 | +condo,province,9,52,0.001684486401976774,0.0001661810791386928,0.0021740109318927232,0.0018353554819828383,0.0016844864019767622,0.002174010931892708,0.0 | |
| 23 | +condo,province,10,52,0.001593885852531655,0.00016859658055825427,0.002117012954797542,0.0018047875724924965,0.0015938858525316494,0.0021170129547975255,0.0 | |
| 24 | +condo,province,11,52,0.0016030353170648113,0.00016609797181298672,0.001982236262739768,0.0017272436940498302,0.0016030353170648011,0.001982236262739752,0.0 | |
| 25 | +condo,province,12,52,0.0015979690610675432,0.00020430782104002075,0.002030825256681998,0.0017622010900594173,0.0015979690610675526,0.002030825256681985,0.0 | |
| 26 | +condo,region,1,832,0.009790266447409655,-0.000031104480999510837,0.019273842101740615,-0.0034347501066969784,0.006077331017071481,0.011545513715423313,0.34134615384615385 | |
| 27 | +condo,region,2,832,0.009842418822069127,-0.00005817544655845735,0.01915099154614561,-0.003793582520574911,0.005901925322208566,0.011257364932724868,0.3401442307692308 | |
| 28 | +condo,region,3,832,0.009979287810595174,-0.00023492539186820973,0.01927819307081639,-0.004153633182955936,0.006011492519209637,0.011521417882571442,0.34134615384615385 | |
| 29 | +condo,region,4,832,0.010126823709202846,-0.00033397566967972305,0.019392051992608312,-0.004460492510153581,0.006075055890613615,0.01172819635641147,0.35216346153846156 | |
| 30 | +condo,region,5,832,0.010179366354186963,-0.0002865979063255834,0.019793882996838732,-0.0047910316429116825,0.006048436736559418,0.012013468400404903,0.36177884615384615 | |
| 31 | +condo,region,6,832,0.010367298598993564,-0.00022179320681323317,0.02002685451109216,-0.005158897833503317,0.006257140672470927,0.012170491393923113,0.3701923076923077 | |
| 32 | +condo,region,7,832,0.010192976572009942,-0.0001287222355680675,0.020767326355680602,-0.00459329080163186,0.006123962972048171,0.012422729646467559,0.36538461538461536 | |
| 33 | +condo,region,8,832,0.01020605005605612,-0.0004294500437435218,0.020638108116871796,-0.00445979331812907,0.006134809678767996,0.012179908602905022,0.35216346153846156 | |
| 34 | +condo,region,9,832,0.010106086957893909,-0.0004738868148322336,0.02058157780165701,-0.004521995638758401,0.006081644606522165,0.011882547908836187,0.34134615384615385 | |
| 35 | +condo,region,10,832,0.01008205418619355,-0.00033571880156921973,0.02034217407559042,-0.004484759347404402,0.005893884835961093,0.011589247146868181,0.34375 | |
| 36 | +condo,region,11,832,0.00999206557050614,-0.00041264004127453417,0.020295766446709166,-0.004603531125417201,0.005814847463540111,0.011335083931070078,0.3401442307692308 | |
| 37 | +condo,region,12,832,0.009847622079466455,-0.00048776006746468407,0.02003105454023685,-0.0044264189327692435,0.0056792893388342485,0.01112211780606469,0.33413461538461536 | |
| 38 | +house,municipality,1,3328,0.023092188875919885,-0.00010638684910900311,0.024208956837254495,-0.0009847268772388564,0.01611997040419284,0.017647401865411975,0.6538461538461539 | |
| 39 | +house,municipality,2,3328,0.02305826378044436,0.0000776618071806769,0.024121334462707294,-0.000733534018982744,0.016076172463857133,0.01754601518602517,0.6607572115384616 | |
| 40 | +house,municipality,3,3328,0.023314129313209635,-0.00018437102168174861,0.0243558017900071,-0.000805528223827719,0.016161186990447114,0.017631539281284643,0.6574519230769231 | |
| 41 | +house,municipality,4,3328,0.023094714275644447,-0.00001242905734893477,0.024438727072204902,-0.0007450148449550792,0.015984483975738917,0.017493185039469124,0.6487379807692307 | |
| 42 | +house,municipality,5,3328,0.02319062035455638,-0.00021508974361102599,0.024551891295953435,-0.0008033047850721947,0.016033372472342513,0.017595766690442386,0.6544471153846154 | |
| 43 | +house,municipality,6,3328,0.023469611454049084,0.00006959664267645442,0.024778345097935032,-0.0008921591898266268,0.016046905816510533,0.0178106438497968,0.6556490384615384 | |
| 44 | +house,municipality,7,3328,0.023757462631077236,-0.00008859729964317513,0.02580790419931541,-0.0010644822404534072,0.01616931963135506,0.017893589258424866,0.6526442307692307 | |
| 45 | +house,municipality,8,3328,0.02405027377329403,0.00003678475982662613,0.025928003607596735,-0.0009488613149150432,0.016375509629565892,0.017865497478796667,0.6589543269230769 | |
| 46 | +house,municipality,9,3328,0.024112394613001943,-0.0003514411949470708,0.025740121764867223,-0.0008296229136360721,0.016516847008696097,0.017721469248294538,0.6613581730769231 | |
| 47 | +house,municipality,10,3328,0.02415853926255957,-0.00005750907250976803,0.025534692908016896,-0.000630725627465175,0.016674363998256957,0.017462948328216068,0.6607572115384616 | |
| 48 | +house,municipality,11,3328,0.024346670361835077,-0.00006186481278868769,0.025607525987373706,-0.0005609351745473852,0.016998055871441813,0.017679407791658816,0.6613581730769231 | |
| 49 | +house,municipality,12,3328,0.02425204686382497,-0.00009108103528319962,0.025347260810956472,-0.00041864634387106785,0.016786336051117897,0.017276264088198927,0.6664663461538461 | |
| 50 | +house,province,1,52,0.0015532707391587841,-0.00012648911680931643,0.0012677792394390134,-0.0006682393886121419,0.0015532707391587958,0.0012677792394390347,0.0 | |
| 51 | +house,province,2,52,0.0016559392160083,-0.00008235723045537411,0.0013362779831777101,-0.0007866040235986188,0.0016559392160083047,0.0013362779831777225,0.0 | |
| 52 | +house,province,3,52,0.001583892533307463,-0.000043611870685160214,0.001412174589921807,-0.0008420760005469064,0.0015838925333074663,0.0014121745899218123,0.0 | |
| 53 | +house,province,4,52,0.0015542758198942297,-0.00009829276850291391,0.0015479190215160433,-0.001004210665083142,0.0015542758198942381,0.001547919021516063,0.0 | |
| 54 | +house,province,5,52,0.0014986613545432267,-0.00004873313943422304,0.0015508090247639411,-0.000989535425208228,0.0014986613545432334,0.0015508090247639593,0.0 | |
| 55 | +house,province,6,52,0.0015343173963489629,0.00006115591403258357,0.0015003670779485277,-0.0010266957469961696,0.0015343173963489594,0.0015003670779485405,0.0 | |
| 56 | +house,province,7,52,0.0015909958050343209,-0.0000190056585240687,0.0015965742541963228,-0.0011773220699620114,0.0015909958050343202,0.001596574254196325,0.0 | |
| 57 | +house,province,8,52,0.001452542351743374,-0.000034452325799709044,0.0015281850812553575,-0.0011388022641749306,0.0014525423517433717,0.0015281850812553608,0.0 | |
| 58 | +house,province,9,52,0.0014130734327221692,-0.0000909970886723188,0.0014631138909238816,-0.0011195581751700361,0.0014130734327221666,0.0014631138909238816,0.0 | |
| 59 | +house,province,10,52,0.0014782505022436498,-0.00007538162157755709,0.0015200536868807373,-0.0010272498521163638,0.0014782505022436407,0.0015200536868807328,0.0 | |
| 60 | +house,province,11,52,0.0015230332258875645,-2.250496928529023e-6,0.0014643526037635517,-0.0010100131367339448,0.0015230332258875609,0.0014643526037635562,0.0 | |
| 61 | +house,province,12,52,0.0015153200471414187,-0.00010782398525555524,0.0014670531390204471,-0.0009616150650127447,0.0015153200471414168,0.0014670531390204601,0.0 | |
| 62 | +house,region,1,884,0.019341166648931353,0.00013914401138195157,0.022435845036222188,-0.000054689108704933114,0.01783500175212258,0.021391270357664364,0.5305429864253394 | |
| 63 | +house,region,2,884,0.019461798425585455,-0.000020573850304829773,0.02195862296461838,-0.0001408973103168795,0.017848468990383434,0.020992692267059982,0.5271493212669683 | |
| 64 | +house,region,3,884,0.019640510488117734,0.0004008813035882496,0.022243928533564016,0.000037173789520607527,0.018068003224688576,0.021319531400553697,0.5373303167420814 | |
| 65 | +house,region,4,884,0.019351892777547952,0.00035417419660580137,0.02278751020208834,-0.0007848639223575325,0.017899705511420682,0.02177258496806936,0.5237556561085973 | |
| 66 | +house,region,5,884,0.019091097073210165,-0.00018818138959991127,0.022931771132624845,-0.0011419958694885563,0.017653390438943522,0.02165714183348216,0.5248868778280543 | |
| 67 | +house,region,6,884,0.019139962082195424,-0.00048142272931152904,0.023312582951215185,-0.0015064362333008757,0.017726656446890955,0.02189243380022784,0.5294117647058824 | |
| 68 | +house,region,7,884,0.01904469005779749,-0.0003719533571034606,0.02328476245583892,-0.000838248894445598,0.017692722186945373,0.021746034209333277,0.5418552036199095 | |
| 69 | +house,region,8,884,0.019261939850554546,-0.00026944596776266893,0.02329584417620687,-0.0004888714063228724,0.018005169160605173,0.02155822569409291,0.5373303167420814 | |
| 70 | +house,region,9,884,0.019267639722951157,-0.00003037649320443736,0.023305620403128734,-0.00035999914495570917,0.018186075121703563,0.021486607965907668,0.5350678733031674 | |
| 71 | +house,region,10,884,0.01914122368946062,0.00010720487911149635,0.023078835788251314,-0.00010840283347579008,0.01840151268136635,0.021350152425829293,0.5260180995475113 | |
| 72 | +house,region,11,884,0.01946217375677165,0.00017326483991043616,0.02332239123772778,0.00012918004126570213,0.01877205917976002,0.02168636582193896,0.5158371040723982 | |
| 73 | +house,region,12,884,0.019405316236140027,0.0001325954479839686,0.022926702846803357,0.00020440160720895,0.01880405105246462,0.02125108347601303,0.5090497737556561 | |
| 74 | +plex,municipality,1,3328,0.030288452162634486,-0.0005165186498657069,0.05262428846302046,-0.0013226885566379341,0.019897252981619543,0.033129705017398134,0.7349759615384616 | |
| 75 | +plex,municipality,2,3328,0.030266879188481352,-0.0003655847747851418,0.05124090476264386,-0.0008382047477597895,0.01989114441298446,0.032497132965224954,0.7409855769230769 | |
| 76 | +plex,municipality,3,3328,0.030331666170240246,-0.0002023008851125926,0.050822375628742804,-0.0013142855616835884,0.020014972187375853,0.032151556987150706,0.7400841346153846 | |
| 77 | +plex,municipality,4,3328,0.030477212650632968,0.00009434774566381735,0.05035652503326435,-0.001269901688993596,0.019986435679324968,0.031484862709542816,0.7484975961538461 | |
| 78 | +plex,municipality,5,3328,0.030384353808983886,-0.0002506971999339553,0.050557107407382555,-0.0015328881303532374,0.019852268026197755,0.03133718273027722,0.7563100961538461 | |
| 79 | +plex,municipality,6,3328,0.03047240597019304,-0.0006416287762726019,0.050801391274887295,-0.0012769798940341077,0.019520257572899293,0.03113832132401664,0.7478966346153846 | |
| 80 | +plex,municipality,7,3328,0.030097634848138103,0.0005177780192227456,0.05285719878650923,-0.00004594055955131114,0.019349417672062698,0.03183955846264396,0.7424879807692307 | |
| 81 | +plex,municipality,8,3328,0.029959285314090908,0.00012593807399265388,0.05247757118949334,-0.0007128007364661556,0.019118259744491658,0.03136403272927994,0.73828125 | |
| 82 | +plex,municipality,9,3328,0.030089488148415975,0.00045823265598124614,0.052224433356263526,-0.0009431994798718081,0.01901532501819489,0.03092802726606761,0.7391826923076923 | |
| 83 | +plex,municipality,10,3328,0.030194143109486052,-0.0003324314840843651,0.05221499953743071,-0.00144042255688976,0.019153754370377817,0.03092370755108541,0.7430889423076923 | |
| 84 | +plex,municipality,11,3328,0.030196699685274782,-0.0005071502270420179,0.05194727249336939,-0.0009267387182001881,0.019627275902071434,0.03058956960222138,0.7409855769230769 | |
| 85 | +plex,municipality,12,3328,0.030019016362902717,0.0002973269455979839,0.05150005703267959,-9.476544628591346e-6,0.019092770944119066,0.029870112776456893,0.7418870192307693 | |
| 86 | +plex,province,1,52,0.0025609731874916717,-0.00013590920564457217,0.0034534763426082977,-0.0015875438365012494,0.0025609731874916665,0.0034534763426082946,0.0 | |
| 87 | +plex,province,2,52,0.0024926043659790893,-0.00009454019214262746,0.0032054734636291324,-0.0014694410088973257,0.0024926043659790685,0.003205473463629128,0.019230769230769232 | |
| 88 | +plex,province,3,52,0.002553714357481464,-0.00004047794281379422,0.003094585608310371,-0.0015220777776656772,0.002553714357481438,0.003094585608310366,0.0 | |
| 89 | +plex,province,4,52,0.0027547193357477986,-0.00015209656244811245,0.003012014534139996,-0.0015026221629895072,0.0027547193357477804,0.0030120145341399926,0.0 | |
| 90 | +plex,province,5,52,0.0027800874380931634,-0.0002161250434366023,0.0029145807667974918,-0.0014055396426533068,0.0027800874380931396,0.002914580766797496,0.0 | |
| 91 | +plex,province,6,52,0.0026934949345003034,-0.0002022008710534018,0.0028829386532136163,-0.0012786384099770268,0.0026934949345002804,0.002882938653213614,0.0 | |
| 92 | +plex,province,7,52,0.002582845125215752,-0.00015788692632138522,0.0028886757938532334,-0.0013242037067489598,0.0025828451252157382,0.0028886757938532395,0.0 | |
| 93 | +plex,province,8,52,0.002639080129391382,-0.00021502241592675158,0.0027037215493154174,-0.0012176184392219242,0.002639080129391367,0.0027037215493154244,0.0 | |
| 94 | +plex,province,9,52,0.0025205385749526854,-0.00011984928174292413,0.002612417507449769,-0.001147538912493115,0.002520538574952671,0.0026124175074497737,0.0 | |
| 95 | +plex,province,10,52,0.002471275260724911,-0.00016212659033303835,0.0025179190218171587,-0.0009736164485255596,0.0024712752607249015,0.002517919021817157,0.0 | |
| 96 | +plex,province,11,52,0.0023786308212119735,0.00008397121580975361,0.002409360630624702,-0.0007613081176061588,0.0023786308212119666,0.002409360630624712,0.0 | |
| 97 | +plex,province,12,52,0.002372654388962432,-0.00017528002044779283,0.0025522750376679062,-0.0008278294224610996,0.0023726543889624327,0.0025522750376679223,0.0 | |
| 98 | +plex,region,1,884,0.013662550268308716,-0.0003106828386291632,0.020509090851500367,-0.004066840589696208,0.008588373597085176,0.013735934909154963,0.5328054298642534 | |
| 99 | +plex,region,2,884,0.01380938733905172,-0.00005507667807821284,0.020321558543735557,-0.004052497859157451,0.008743558386230163,0.013775239910577506,0.5395927601809954 | |
| 100 | +plex,region,3,884,0.013579203115088274,-0.00015589132251798307,0.02036969763369768,-0.004311733216030613,0.008691208480082676,0.013924305443190406,0.5248868778280543 | |
| 101 | +plex,region,4,884,0.013639439516273274,-0.00021329719406405447,0.020611391769852692,-0.0042585236155864474,0.008751234298494903,0.013840468072287814,0.5271493212669683 | |
| 102 | +plex,region,5,884,0.01382307529096038,-0.00031560954542261154,0.021284503765627488,-0.004218441495675318,0.008739481647510192,0.0142695085422924,0.5328054298642534 | |
| 103 | +plex,region,6,884,0.013543587939921909,-0.0007488494780056365,0.021803628079206022,-0.004280267650932594,0.008605126816542623,0.014021650843498165,0.5316742081447964 | |
| 104 | +plex,region,7,884,0.013396622009093124,-0.0005177203933074815,0.022461321433010415,-0.004277202804897456,0.008728996501200475,0.014374504850619765,0.5226244343891403 | |
| 105 | +plex,region,8,884,0.013425408159991752,-0.00042760211871508845,0.02204763031635865,-0.004091255775097806,0.00864160129784591,0.014318956170876553,0.5237556561085973 | |
| 106 | +plex,region,9,884,0.013700099938324965,-0.0002571476814299578,0.02202374907087782,-0.004011719013280068,0.008795275562324676,0.014197163527242035,0.5328054298642534 | |
| 107 | +plex,region,10,884,0.013954066485638647,-0.00038978431401202163,0.02195315127310212,-0.0037817512916404287,0.008956589306037753,0.014001053319166847,0.5452488687782805 | |
| 108 | +plex,region,11,884,0.014203977274158053,-0.00022764982825614356,0.02185184168913049,-0.0033312202054388597,0.009293019546997147,0.014028442873695878,0.5599547511312217 | |
| 109 | +plex,region,12,884,0.014069327265242619,-0.0004475291972578539,0.021825252254585842,-0.0032864627859346017,0.009161575036737011,0.014281809023605587,0.5497737556561086 | |
added
scripts/21_mc_summary.py
+28 −0
@@ -0,0 +1,28 @@ | ||
| 1 | +#!/usr/bin/env python3 | |
| 2 | +# Author: Simon-Pierre Boucher — simon-pierre.boucher@uqo.ca | |
| 3 | +"""Phase 4 — NaN-safe Monte Carlo summary from results/simulation/metrics.parquet → summary.csv (means + Monte Carlo s.e.). | |
| 4 | +Cells for which a method is not estimable (NaN) are excluded from that method's averages; `share_est` reports their share.""" | |
| 5 | +from __future__ import annotations | |
| 6 | + | |
| 7 | +import sys | |
| 8 | +from pathlib import Path | |
| 9 | + | |
| 10 | +sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "src")) | |
| 11 | +import polars as pl | |
| 12 | + | |
| 13 | +from sharp_hpi import config as C | |
| 14 | + | |
| 15 | +OUT = C.RESULTS / "simulation" | |
| 16 | +m = pl.read_parquet(OUT / "metrics.parquet") | |
| 17 | +cols = ["rmse_ret", "mae_ret", "bias_ret", "rmse_lvl", "cov95", "cov95_ret", "corr_ret", "lag_xcorr", "revision_rmse", "share_est", "secs"] | |
| 18 | +m = m.with_columns([pl.col(c).fill_nan(None) for c in cols]) | |
| 19 | +# per replication first (so the Monte Carlo s.e. is over replications, not cells) | |
| 20 | +rep = m.group_by(["scenario", "method", "level", "rep"]).agg([pl.col(c).mean().alias(c) for c in cols] + [pl.len().alias("cells")]) | |
| 21 | +summ = rep.group_by(["scenario", "method", "level"]).agg( | |
| 22 | + pl.col("cells").mean().alias("cells"), pl.col("rep").n_unique().alias("reps"), | |
| 23 | + *[pl.col(c).mean().alias(c) for c in cols], | |
| 24 | + *[(pl.col(c).std() / pl.col(c).count().sqrt()).alias(c + "_mcse") for c in ["rmse_ret", "bias_ret", "rmse_lvl", "cov95"]], | |
| 25 | +).sort(["scenario", "level", "rmse_ret"]) | |
| 26 | +summ.write_csv(OUT / "summary.csv") | |
| 27 | +pl.Config.set_tbl_rows(200); pl.Config.set_tbl_width_chars(220) | |
| 28 | +print(summ.filter(pl.col("level") == "municipality").select(["scenario", "method", "reps", "rmse_ret", "rmse_ret_mcse", "bias_ret", "cov95", "lag_xcorr", "share_est"])) | |
modified
scripts/40_vintages.py
+10 −7
@@ -2,7 +2,9 @@ | ||
| 2 | 2 | # Author: Simon-Pierre Boucher — simon-pierre.boucher@uqo.ca |
| 3 | 3 | """Phase 6 — real-time vintages. For each monthly publication date v (10 days after month end, the measured publication |
| 4 | 4 | delay), re-estimate SHARP-HPI using only transactions dated ≤ v − 10 days (filtered mode: one-sided state-space deviations, |
| 5 | −stage 1 re-estimated on the available sample). Records every vintage of every cell path, then the revision statistics | |
| 5 | +stage 1 re-estimated on the available sample). Records every vintage of every cell path in two modes — `filtered` (one-sided: the value of month m never | |
| 6 | +changes after its first release except through stage-1 re-estimation; the no-revision policy) and `smoothed` (two-sided given the data | |
| 7 | +available at the vintage: full re-estimation policy) — then the revision statistics | |
| 6 | 8 | (1st/2nd/3rd release vs final), timeliness and three publication policies: (a) full re-estimation, (b) movement splice of |
| 7 | 9 | the newest month onto the frozen history, (c) revision-limited (history frozen after 3 releases). |
| 8 | 10 | Writes data/processed/index_vintages.parquet and results/vintages/*.csv.""" |
@@ -54,12 +56,13 @@ def main() -> None: | ||
| 54 | 56 | t0 = time.time() |
| 55 | 57 | r = run_sharp(avail, grid, realtime_parent=True) |
| 56 | 58 | n_prov = np.array([avail.filter(pl.col("month") == m).height for m in grid], float) |
| 57 | − rows.append(pl.DataFrame({"class": cls, "vintage": vm, "level": "province", "geo_id": "QC", "month": grid, "log_index": r.stage1.mu, "se": r.stage1.mu_se, "n": n_prov})) | |
| 58 | − for (lvl, gid), c in r.cells.items(): | |
| 59 | − if lvl not in LEVELS_KEEP or (lvl == "municipality" and gid not in big_mun): | |
| 60 | − continue | |
| 61 | − p, v = cell_log_index(r, lvl, gid, "filtered") | |
| 62 | − rows.append(pl.DataFrame({"class": cls, "vintage": vm, "level": lvl, "geo_id": gid, "month": grid, "log_index": p, "se": np.sqrt(v), "n": c.n})) | |
| 59 | + for mode in ("filtered", "smoothed"): | |
| 60 | + rows.append(pl.DataFrame({"class": cls, "vintage": vm, "mode": mode, "level": "province", "geo_id": "QC", "month": grid, "log_index": r.stage1.mu, "se": r.stage1.mu_se, "n": n_prov})) | |
| 61 | + for (lvl, gid), c in r.cells.items(): | |
| 62 | + if lvl not in LEVELS_KEEP or (lvl == "municipality" and gid not in big_mun): | |
| 63 | + continue | |
| 64 | + p, v = cell_log_index(r, lvl, gid, mode) | |
| 65 | + rows.append(pl.DataFrame({"class": cls, "vintage": vm, "mode": mode, "level": lvl, "geo_id": gid, "month": grid, "log_index": p, "se": np.sqrt(v), "n": c.n})) | |
| 63 | 66 | print(cls, vm, f"{avail.height} tx, {time.time() - t0:.1f}s", flush=True) |
| 64 | 67 | pl.concat(rows).write_parquet(C.PROCESSED / "index_vintages.parquet") |
| 65 | 68 | print("done") |
modified
scripts/41_revisions.py
+17 −5
@@ -21,8 +21,20 @@ OUT = C.RESULTS / "vintages" | ||
| 21 | 21 | |
| 22 | 22 | def main() -> None: |
| 23 | 23 | v = pl.read_parquet(C.PROCESSED / "index_vintages.parquet") |
| 24 | − panel = pl.read_parquet(C.PROCESSED / "index_panel.parquet").select( | |
| 24 | + modes = v["mode"].unique().to_list() if "mode" in v.columns else ["filtered"] | |
| 25 | + if "mode" not in v.columns: | |
| 26 | + v = v.with_columns(pl.lit("filtered").alias("mode")) | |
| 27 | + for mode in modes: | |
| 28 | + _analyse(v.filter(pl.col("mode") == mode), panel_path(), mode) | |
| 29 | + | |
| 30 | + | |
| 31 | +def panel_path(): | |
| 32 | + return pl.read_parquet(C.PROCESSED / "index_panel.parquet").select( | |
| 25 | 33 | pl.col("property_type").alias("class"), pl.col("geography_level").alias("level"), pl.col("geography_id").alias("geo_id"), "month", (pl.col("index_value") / 100).log().alias("li_final")) |
| 34 | + | |
| 35 | + | |
| 36 | +def _analyse(v: pl.DataFrame, panel: pl.DataFrame, mode: str) -> None: | |
| 37 | + sfx = "" if mode == "smoothed" else "_" + mode | |
| 26 | 38 | # release number of month m in vintage vm: k = months between m and vm (+1) |
| 27 | 39 | def mi(s): |
| 28 | 40 | return (s.str.slice(0, 4).cast(pl.Int32) * 12 + s.str.slice(5, 2).cast(pl.Int32)) |
@@ -43,7 +55,7 @@ def main() -> None: | ||
| 43 | 55 | pl.col("rev12_final").abs().mean().alias("mae_rev_12m_vs_final"), pl.col("rev12_final").mean().alias("bias_rev_12m_vs_final"), |
| 44 | 56 | pl.col("rev1_last").abs().mean().alias("mae_rev_m1_vs_last_rt"), pl.col("rev12_last").abs().mean().alias("mae_rev_12m_vs_last_rt"), |
| 45 | 57 | (pl.col("rev1_final").abs() > 0.01).mean().alias("share_m1_rev_gt_1pct")).sort(["class", "level", "release"]) |
| 46 | − summ.write_csv(OUT / "revisions_by_release.csv") | |
| 58 | + summ.write_csv(OUT / f"revisions_by_release{sfx}.csv") | |
| 47 | 59 | # policies on the provincial monthly change: (a) full re-estimation = release k value; (b) movement splice = first release of each |
| 48 | 60 | # month chained; (c) revision-limited = value at release 3 |
| 49 | 61 | pol = j.filter(pl.col("level") == "province") |
@@ -55,9 +67,9 @@ def main() -> None: | ||
| 55 | 67 | (pl.col("d1_third") - pl.col("d1_final")).abs().mean().alias("mae_third_release_vs_final"), |
| 56 | 68 | ((pl.col("d1_first") - pl.col("d1_final")) ** 2).mean().sqrt().alias("rmse_first"), ((pl.col("d1_third") - pl.col("d1_final")) ** 2).mean().sqrt().alias("rmse_third"), |
| 57 | 69 | pl.col("d1_final").abs().mean().alias("mean_abs_true_change")) |
| 58 | − pol_summ.write_csv(OUT / "revision_policies_province.csv") | |
| 59 | − j.filter(pl.col("release") <= 6).select(["class", "level", "geo_id", "month", "vintage", "release", "n", "log_index", "se", "d1", "d12", "rev1_final", "rev12_final"]).write_parquet(OUT / "revisions_long.parquet") | |
| 60 | − print(summ); print(pol_summ) | |
| 70 | + pol_summ.write_csv(OUT / f"revision_policies_province{sfx}.csv") | |
| 71 | + j.filter(pl.col("release") <= 6).select(["class", "level", "geo_id", "month", "vintage", "release", "n", "log_index", "se", "d1", "d12", "rev1_final", "rev12_final"]).write_parquet(OUT / f"revisions_long{sfx}.parquet") | |
| 72 | + print(mode); print(summ); print(pol_summ) | |
| 61 | 73 | |
| 62 | 74 | |
| 63 | 75 | if __name__ == "__main__": |
modified
scripts/60_figures.py
+13 −5
@@ -77,7 +77,7 @@ def fig_province_methods(): | ||
| 77 | 77 | sub = s.filter((pl.col("class") == cls) & (pl.col("level") == "province") & (pl.col("method") == m)).sort("month") |
| 78 | 78 | if sub.height == 0: |
| 79 | 79 | continue |
| 80 | − months = sub["month"].to_list(); li = rebase(sub["log_index"].to_numpy(), months) | |
| 80 | + sub = sub.filter(pl.col("month") < "2026-10"); months = sub["month"].to_list(); li = rebase(sub["log_index"].to_numpy(), months) | |
| 81 | 81 | ax.plot(range(len(months)), li, color=METHOD_COLORS.get(m, "#999"), lw=1.6 if m == "S_sharp" else 1.0, label=METHOD_LABELS.get(m, m), alpha=1 if m == "S_sharp" else 0.9) |
| 82 | 82 | ax.set_title(CLASS_LABELS[cls]); month_ticks(ax, months); ax.axhline(100, color=INK2, lw=0.5) |
| 83 | 83 | axes[0].set_ylabel("Index (2021 average = 100)"); axes[0].legend(loc="upper left", fontsize=6.5) |
@@ -97,11 +97,13 @@ def fig_region_methods(): | ||
| 97 | 97 | sub = s.filter((pl.col("class") == "house") & (pl.col("level") == "region") & (pl.col("geo_id") == reg) & (pl.col("method") == m)).sort("month") |
| 98 | 98 | if sub.height == 0: |
| 99 | 99 | continue |
| 100 | − months = sub["month"].to_list(); li = rebase(sub["log_index"].to_numpy(), months) | |
| 100 | + sub = sub.filter(pl.col("month") < "2026-10"); months = sub["month"].to_list(); li = rebase(sub["log_index"].to_numpy(), months) | |
| 101 | 101 | col = METHOD_COLORS.get(m, METHOD_COLORS["K_qhpi"] if m.startswith("K_") else "#999") |
| 102 | + if m == "S_sharp_filtered": | |
| 103 | + col = "#0b0b0b" | |
| 102 | 104 | ax.plot(range(len(months)), li, color=col, lw=1.6 if m == "S_sharp" else 1.0, ls="--" if m == "S_sharp_filtered" else "-", label=METHOD_LABELS.get(m, "QHPI v2.1 architecture") if not m.startswith("K_") else "QHPI v2.1 architecture") |
| 103 | 105 | n = s.filter((pl.col("class") == "house") & (pl.col("level") == "region") & (pl.col("geo_id") == reg) & (pl.col("method") == "A_median")).sort("month")["n"].to_numpy() |
| 104 | − ax.set_title(f"{nm} — houses, median {np.nanmedian(n):.0f} sales/month"); month_ticks(ax, months); ax.axhline(100, color=INK2, lw=0.5) | |
| 106 | + ax.set_title(f"{nm}\nhouses, median {np.nanmedian(n[:-1]):.0f} sales/month", fontsize=8); month_ticks(ax, months); ax.axhline(100, color=INK2, lw=0.5) | |
| 105 | 107 | axes[0, 0].set_ylabel("Index (2021 = 100)"); axes[1, 0].set_ylabel("Index (2021 = 100)") |
| 106 | 108 | h, l = axes[0, 0].get_legend_handles_labels(); uniq = dict(zip(l, h)); fig.legend(uniq.values(), uniq.keys(), loc="lower center", ncol=4, fontsize=7.5, bbox_to_anchor=(0.5, -0.04)) |
| 107 | 109 | save(fig, "fig_region_methods") |
@@ -231,11 +233,17 @@ def fig_revisions(): | ||
| 231 | 233 | return |
| 232 | 234 | d = pl.read_csv(p) |
| 233 | 235 | fig, axes = plt.subplots(1, 2, figsize=(8.4, 2.8)) |
| 236 | + df_f = pl.read_csv(R / "vintages" / "revisions_by_release_filtered.csv") if (R / "vintages" / "revisions_by_release_filtered.csv").exists() else None | |
| 234 | 237 | for i, lvl in enumerate(["province", "region", "municipality"]): |
| 235 | 238 | s = d.filter((pl.col("class") == "house") & (pl.col("level") == lvl)).sort("release") |
| 236 | − axes[0].plot(s["release"], 100 * s["mae_rev_m1_vs_final"], marker="o", ms=3, color=SERIES[i], label=lvl) | |
| 237 | − axes[0].set_xlabel("Release number of a month"); axes[0].set_ylabel("Mean |revision| of monthly change vs final (pp)"); axes[0].legend(fontsize=7) | |
| 239 | + axes[0].plot(s["release"], 100 * s["mae_rev_m1_vs_final"], marker="o", ms=3, color=SERIES[i], label=f"{lvl} (full re-estimation)") | |
| 240 | + if df_f is not None: | |
| 241 | + sf = df_f.filter((pl.col("class") == "house") & (pl.col("level") == lvl)).sort("release") | |
| 242 | + axes[0].plot(sf["release"], 100 * sf["mae_rev_m1_vs_final"], ls="--", color=SERIES[i], lw=0.9, label=f"{lvl} (frozen first release)") | |
| 243 | + axes[0].set_xlabel("Release number of a month"); axes[0].set_ylabel("Mean |revision| of monthly change vs final (log pts × 100)"); axes[0].legend(fontsize=6) | |
| 238 | 244 | v = pl.read_parquet(q).filter((pl.col("class") == "house") & (pl.col("level") == "province")) |
| 245 | + if "mode" in v.columns: | |
| 246 | + v = v.filter(pl.col("mode") == "smoothed") | |
| 239 | 247 | vints = sorted(v["vintage"].unique().to_list()) |
| 240 | 248 | for k, vm in enumerate(vints): |
| 241 | 249 | s = v.filter(pl.col("vintage") == vm).sort("month"); months = s["month"].to_list(); li = rebase(s["log_index"].to_numpy(), months) |
modified
scripts/61_tables.py
+17 −2
@@ -252,7 +252,8 @@ def t_benchmarks(): | ||
| 252 | 252 | d12c = c[12:] - c[:-12]; okk = ~np.isnan(d12a) & ~np.isnan(d12c) |
| 253 | 253 | if okk.sum() > 12: |
| 254 | 254 | vals_sh.append(np.sqrt(np.mean((d12a[okk] - d12c[okk]) ** 2))) |
| 255 | − r += [f"{100*np.mean(sds):.2f}" if sds else "—", f"{100*np.mean(vals_rs):.1f}" if vals_rs else "—"] | |
| 255 | + r += [f"{100*np.nanmean(sds):.2f}" if sds else "—", f"{100*np.nanmean(vals_rs):.1f}" if vals_rs else "—"] | |
| 256 | + macro(f"RegSd{m}{cls}", 100 * np.nanmean(sds) if sds else None, "{:.2f}"); macro(f"RegRmseRS{m}{cls}", 100 * np.nanmean(vals_rs) if vals_rs else None, "{:.1f}") | |
| 256 | 257 | rows.append(r) |
| 257 | 258 | table("tab_benchmarks_region", ["Method", "H: s.d. $\\Delta$", "H: RMSE vs RS", "C: s.d. $\\Delta$", "C: RMSE vs RS", "P: s.d. $\\Delta$", "P: RMSE vs RS"], rows, |
| 258 | 259 | "Region-level benchmarks (16 administrative regions): mean standard deviation of monthly log changes (×100) and RMSE of 12-month log changes against the Case–Shiller repeat-sales index (×100)", "tab:bench_region", size="\\footnotesize", |
@@ -327,7 +328,21 @@ def t_vintages(): | ||
| 327 | 328 | p = pl.read_csv(R / "vintages" / "revision_policies_province.csv") |
| 328 | 329 | table("tab_policies", ["Class", "Months", "MAE first release", "Bias first release", "MAE third release", "RMSE first", "RMSE third", "Mean $|\\Delta|$"], |
| 329 | 330 | [[r["class"], str(r["months"]), f"{100*r['mae_first_release_vs_final']:.2f}", f"{100*r['bias_first_release_vs_final']:+.3f}", f"{100*r['mae_third_release_vs_final']:.2f}", f"{100*r['rmse_first']:.2f}", f"{100*r['rmse_third']:.2f}", f"{100*r['mean_abs_true_change']:.2f}"] for r in p.iter_rows(named=True)], |
| 330 | − "Provincial monthly change (×100): first and third release versus final", "tab:policies", notes="A movement-splice policy publishes the first-release change and never revises it; a revision-limited policy freezes the value at the third release.") | |
| 331 | + "Provincial monthly change (×100): first and third release versus final", "tab:policies", notes="Full re-estimation policy (smoothed at each vintage). A revision-limited policy freezes the value at the third release; the frozen-first-release (movement-splice) policy is in Table~\\ref{tab:revisions_frozen}.") | |
| 332 | + for r in p.iter_rows(named=True): | |
| 333 | + macro(f"PolFirst{r['class']}", 100 * r["mae_first_release_vs_final"], "{:.2f}"); macro(f"PolThird{r['class']}", 100 * r["mae_third_release_vs_final"], "{:.2f}"); macro(f"PolMeanAbs{r['class']}", 100 * r["mean_abs_true_change"], "{:.2f}") | |
| 334 | + if (R / "vintages" / "revisions_by_release_filtered.csv").exists(): | |
| 335 | + d = pl.read_csv(R / "vintages" / "revisions_by_release_filtered.csv") | |
| 336 | + rows = [] | |
| 337 | + for cls in ["house", "condo", "plex"]: | |
| 338 | + for lvl in ["province", "region", "municipality"]: | |
| 339 | + x1 = d.filter((pl.col("class") == cls) & (pl.col("level") == lvl) & (pl.col("release") == 1)); x12 = d.filter((pl.col("class") == cls) & (pl.col("level") == lvl) & (pl.col("release") == 12)) | |
| 340 | + if x1.height: | |
| 341 | + rows.append([f"{cls} / {lvl}", f"{100*x1['mae_rev_m1_vs_final'][0]:.2f}", f"{100*x12['mae_rev_m1_vs_final'][0]:.2f}" if x12.height else "—", f"{100*x1['mae_rev_12m_vs_final'][0]:.2f}", f"{100*x1['mae_rev_m1_vs_last_rt'][0]:.2f}"]) | |
| 342 | + macro(f"FrozenFirst{cls}{lvl}", 100 * x1["mae_rev_m1_vs_final"][0], "{:.2f}") | |
| 343 | + table("tab_revisions_frozen", ["Class / level", "Rel. 1 vs final", "Rel. 12 vs final", "12-m change, rel. 1", "Rel. 1 vs last real-time"], rows, | |
| 344 | + "Frozen-first-release (one-sided filtered) policy: mean absolute gap of the monthly log change (×100) between the real-time value and the final smoothed estimate", "tab:revisions_frozen", size="\\footnotesize", | |
| 345 | + notes="Under this policy a month's value changes only through stage-1 re-estimation; the gap to the final series is the price of never revising (filter versus smoother), and it does not decline with later releases.") | |
| 331 | 346 | |
| 332 | 347 | |
| 333 | 348 | def t_validation(): |
modified
src/sharp_hpi/plotting.py
+1 −1
@@ -10,7 +10,7 @@ SERIES = ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4", "#008300", "#62 | ||
| 10 | 10 | INK = "#0b0b0b"; INK2 = "#52514e"; GRID = "#e4e3df" |
| 11 | 11 | METHOD_COLORS = { # fixed assignment: colour follows the entity |
| 12 | 12 | "S_sharp": SERIES[0], "C_pooled_td": SERIES[1], "A_median": SERIES[2], "H_repeat_sales_cs": SERIES[3], "D_rtd_w13_mean": SERIES[4], |
| 13 | − "E_hi_fisher_chained": SERIES[5], "F_geks_w25_movement": SERIES[6], "K_qhpi": SERIES[7], "G_hmts_w13": "#7a7a7a", "B_stratified_median": "#a0a0a0", | |
| 13 | + "E_hi_fisher_chained": SERIES[5], "F_geks_w25_movement": SERIES[7], "K_qhpi": SERIES[6], "G_hmts_w13": "#7a7a7a", "B_stratified_median": "#a0a0a0", | |
| 14 | 14 | } |
| 15 | 15 | METHOD_LABELS = {"S_sharp": "SHARP-HPI", "C_pooled_td": "Pooled time dummy (Huber)", "A_median": "Median price", "H_repeat_sales_cs": "Repeat sales (Case–Shiller)", |
| 16 | 16 | "D_rtd_w13_mean": "Rolling TD, 13 m, mean splice", "E_hi_fisher_chained": "Hedonic imputation Fisher (chained)", "F_geks_w25_movement": "GEKS-Fisher, 25 m", |
| 17 | 17 | |