SPB Git

spb/wp11_uqo Public

UQO Working Paper No. 11 — Half a million prices, twenty models: a systematic assessment of hedonic specifications.

TeX 54.7% Python 45.2%
4.7 KB · 96 lines markdown
Rendered Raw Blame History
1<!-- Author: Simon-Pierre Boucher — contact@spboucher.ai -->2# 🏇 Half a Million Prices, Twenty Models34**UQO Working Paper No. 11** — *A Systematic Assessment of Hedonic Specifications5and Estimation Methods for the Quebec Housing Market, 2021–2026*67[![Paper](https://img.shields.io/badge/paper-PDF%20(23%20p.)-b31b1b?logo=latex&logoColor=white)](paper/main.pdf)8[![Python](https://img.shields.io/badge/python-3.11%2B-3776AB?logo=python&logoColor=white)](requirements.txt)9[![Data](https://img.shields.io/badge/data-514%2C212%20sales%20·%20roll--matched-4051b5)](data/raw/README.md)10[![Models](https://img.shields.io/badge/models-20%20·%204%20design%20axes-4051b5)](src/wp11/models.py)11[![Reproducible](https://img.shields.io/badge/reproducible-end--to--end%20pipeline-2e7d32)](scripts/)12[![Institution](https://img.shields.io/badge/UQO-D%C3%A9pt.%20des%20sciences%20administratives-16365c)](https://uqo.ca)13[![Author](https://img.shields.io/badge/author-Simon--Pierre%20Boucher-16365c)](mailto:contact@spboucher.ai)14[![Contact](https://img.shields.io/badge/contact-contact%40spboucher.ai-a02020?logo=maildotru&logoColor=white)](mailto:contact@spboucher.ai)1516> **TL;DR** — A controlled horse race of **20 hedonic models** on 514,212 Quebec sales17> with assessor-grade structural attributes: 6 functional forms × time-FE ladder ×18> spatial-FE ladder × 6 estimation methods, all scored on the **same price-level19> scoreboard** (Duan smearing / Box–Cox inversion) under **two holdouts** (random 80/2020> and forward-in-time). Functional form is second-order (±2 pp of MdAPE); spatial21> controls are first-order (~10 pp) but overfit at ~1 km granularity; **gradient22> boosting wins under random validation** (MdAPE ≈ 14.4% vs 16.5% for the best linear23> model) — but under the forward-in-time split *every* model degrades and the ML24> advantage **reverses** (splines 19.1% vs boosting 21.2%, identical R²_ln): random25> cross-validation is the wrong experiment for valuation models. Implied price indices26> and implicit-price profiles agree across forms far more than the accuracy gap suggests.2728---2930## 🎯 The four design axes3132| Axis | Models | Question |33|---|---|---|34| **A. Functional form** | linear, semi-log, log-log, Box–Cox (λ̂ by profile likelihood), quadratics, cubic splines | does curvature matter? |35| **B. Time effects** | none / year / quarter / month FE | how fine must the time dummies be? |36| **C. Spatial controls** | none / municipality / ~5.5 km grid / ~1.1 km grid FE | how fine can location FE get before overfitting? |37| **D. Estimation method** | OLS, ridge (CV), random forest, gradient boosting (± coordinates), spatial k-NN comparables | what do the machines actually buy? |3839Every model: same sales, same attributes (floor area, lot, age, storeys, units,40class, physical link), metrics on price levels (MdAPE, MAPE, RMSE_ln, R²_ln),41municipality-clustered design, and **two splits** — random 80/20 and42train < 2025 / test 2025–26 with carry-forward time effects.4344## 🗂 Repository layout4546```47wp11_uqo/48├── data/raw/                 # snapshot (NOT in git — see data/raw/README.md)49├── src/wp11/                 # config, sample, models (the harness), plotstyle50├── scripts/51│   ├── 01_build_sample.py    # 745,119 → 514,212 sales52│   ├── 02_horserace.py       # 20 models × 2 splits + Box–Cox profile53│   ├── 03_extensions.py      # indices, implicit-price profiles, learning curves, segments54│   ├── 04_make_figures.py    # 9 journal-calibre figures55│   └── 05_make_tables.py     # 7 LaTeX tables56├── results/{reproduced,tables}/57├── figures/58└── paper/                    # main.tex + sections/ + references.bib → main.pdf59```6061## 🚀 Quick start6263```bash64cd wp11_uqo65python3 -m pip install -r requirements.txt66# place the parquet snapshot in data/raw/ (not distributed), then:67for s in scripts/0*.py; do python3 "$s"; done68cd paper && make69```7071Runtime ≈ 10 minutes on an Apple-silicon laptop (the boosting and forest fits72dominate); peak RAM ≈ 8 GB.7374## 📝 Citation7576```bibtex77@techreport{boucher2026horserace,78  author      = {Boucher, Simon-Pierre},79  title       = {Half a Million Prices, Twenty Models: A Systematic Assessment80                 of Hedonic Specifications and Estimation Methods for the81                 Quebec Housing Market},82  institution = {Universit\'e du Qu\'ebec en Outaouais,83                 D\'epartement des sciences administratives},84  type        = {Working Paper},85  number      = {11},86  year        = {2026},87  month       = {August}88}89```9091## 👤 Author & contact9293**Simon-Pierre Boucher** — Département des sciences administratives,94Université du Québec en Outaouais (UQO), Gatineau, QC.95📧 [contact@spboucher.ai](mailto:contact@spboucher.ai)96