SPB Git forge

spb/wp4_uqo

Public
3commits 1branches 1releases
5.4 MBsize
maindefault branch
1 h agolast push
Python 64.6% TeX 23.3% HTML 11.6% Makefile 0.5%
7.7 KB · 152 lines markdown
Rendered Raw Blame History
1<!-- Author: Simon-Pierre Boucher — simon-pierre.boucher@uqo.ca -->2# 🛏️ Hedonic Pricing of Short-Term Rental Properties34**UQO Working Paper No. 4** — *A Multi-Method Analysis of Airbnb Listing Prices in Quebec*56[![Paper](https://img.shields.io/badge/paper-PDF%20(28%20p.)-b31b1b?logo=latex&logoColor=white)](paper/main.pdf)7[![Python](https://img.shields.io/badge/python-3.11%2B-3776AB?logo=python&logoColor=white)](requirements.txt)8[![Data](https://img.shields.io/badge/data-5%2C000%20Inside%20Airbnb%20listings%20·%20CSV-4051b5)](data/raw/README.md)9[![Reproducible](https://img.shields.io/badge/reproducible-end--to--end%20pipeline-2e7d32)](scripts/)10[![Institution](https://img.shields.io/badge/UQO-D%C3%A9pt.%20des%20sciences%20administratives-16365c)](https://uqo.ca)11[![Author](https://img.shields.io/badge/author-Simon--Pierre%20Boucher-16365c)](mailto:simon-pierre.boucher@uqo.ca)1213> **TL;DR** — What determines the nightly price of an Airbnb listing in Quebec? On 5,000 Inside Airbnb listings14> (3,412 with valid prices) we layer nine nested OLS hedonic specifications (R² from 0.052 structural-only to 0.274 with15> reputation, amenities, text and spatial controls), quantile regressions at five quantiles, four gradient-boosting /16> forest learners with SHAP (best: XGBoost, R² = 0.285, MAPE 14.3%), and spatial lag / error / Durbin models. Bedrooms,17> room type, review scores, location and amenity indices dominate, with weights that shift across the price distribution18> and across sub-markets.1920---2122## 📌 Status2324| Item | Value |25|---|---|26| Version | 1.0 (May 2026) |27| SSRN | not yet submitted |28| Journal | — |29| Code & data | reproducible from `scripts/` + `src/`; raw Inside Airbnb sample not committed (see `data/raw/README.md`) |3031## 🎯 What this paper does3233Short-term rental prices are set by hosts, not by a market index, so the implicit prices of a listing's characteristics34are the natural object of study. Following Rosen (1974) and Lancaster (1966), the nightly price is decomposed into35structural characteristics, amenity bundles, host attributes, reputation signals, locational factors and text-derived36features:3738```39ln P_i = α + S_i'β + A_i'γ + H_i'δ + R_i'ζ + L_i'η + T_i'θ + ε_i40```4142Each block is added in turn (M1 … M9), then the full specification is re-estimated by quantile regression, by machine43learning with SHAP decomposition, and by spatial econometric models to check robustness to spatial dependence.4445## 🏆 Headline results4647| Object | Estimate |48|---|---|49| Structural-only OLS (M1) | R² = 0.052 |50| + amenity indices (M2) | R² = 0.098 |51| + reputation / reviews (M4) | R² = 0.187 (largest single gain) |52| Full specification with spatial controls (M9), N = 1,906 | R² = 0.274, adj. R² = 0.254, RMSE 1.169 (−15.3% vs M1) |53| Best learner (XGBoost) | R² = 0.285, RMSE 1.159, MAPE 14.3% |54| CatBoost / LightGBM / Random Forest | R² = 0.258 / 0.244 / 0.243 |55| Dominant price determinants | bedrooms, room type, review score, distance to centre, amenity indices |5657## 🗂 Repository layout5859```60airbnb-listing-prices-hedonic/61├── data/62│   ├── raw/                  # cleaned_dataset_sample.csv (see data/raw/README.md) — not committed63│   ├── interim/ processed/ duckdb/64├── src/                      # package: config, data_loader, cleaning, feature_engineering, amenities,65│                             #   geospatial, nlp_features, hedonic_models, quantile_models, spatial_models,66│                             #   ml_models, shap_analysis, robustness, tables, figures, report67├── scripts/68│   ├── run_analysis.py       # master pipeline (features → models → figures → tables)69│   └── app.py                # Streamlit dashboard70├── results/71│   ├── tables/               # model_comparison, ml_comparison, price_premiums, quantile_coefficients, …72│   ├── figures/              # 01–08 publication figures (PNG + PDF)73│   └── models/               # model keys (fitted objects not committed)74├── Makefile                  # make all | features | models | figures | tables | paper | dashboard75└── paper/                    # main.tex + sections/ + figures/ + references.bib → main.pdf76```7778## 🚀 Quick start7980```bash81python3 -m pip install -r requirements.txt82# place cleaned_dataset_sample.csv in data/raw/, then:83make models        # python3 scripts/run_analysis.py --data-file data/raw/cleaned_dataset_sample.csv84make figures85make paper         # cd paper && make (latexmk → main.pdf)86make dashboard     # streamlit run scripts/app.py87```8889Runtime ≈ 10 minutes on an Apple-silicon laptop (SHAP and spatial models dominate).9091## 🗃 Data92935,000 Inside Airbnb listings for Quebec (May 2026 extract, 19 raw variables). Prices below CAD 10 (17 obs.) or above94CAD 25,000 (27 obs.) are dropped; 810 listings lack a price and 3,412 remain. Amenity strings are parsed into indices95(family comfort, luxury, cleanliness), review scores are rescaled to 0–5, titles and descriptions are embedded into96text features, and distances to the city centre are computed from coordinates. See `data/raw/README.md`.9798## 🔬 Methodology991001. **Cleaning & features** — `src/cleaning.py`, `src/feature_engineering.py`, `src/amenities.py`, `src/nlp_features.py`, `src/geospatial.py`.1012. **Nested OLS hedonic models** M1–M9 with HC3 standard errors — `src/hedonic_models.py`.1023. **Quantile regression** at τ ∈ {.10, .25, .50, .75, .90} — `src/quantile_models.py`.1034. **Machine learning** (XGBoost, CatBoost, LightGBM, Random Forest, Gradient Boosting, GAM, ElasticNet) with SHAP — `src/ml_models.py`, `src/shap_analysis.py`.1045. **Spatial econometrics** (SAR, SEM, SDM, k-nearest-neighbour weights) — `src/spatial_models.py`.1056. **Robustness** (sub-markets, trimming, alternative amenity indices) and price decomposition — `src/robustness.py`, `src/report.py`.106107## 🖼 Figures & tables inventory108109| Figure | Content |110|---|---|111| `01_price_distribution`, `02_log_price_distribution` | nightly price distributions |112| `03_price_map` | spatial distribution of prices |113| `04_price_by_neighbourhood`, `05_price_by_room_type` | price by neighbourhood / room type |114| `07_review_score_premium` | reputation premium |115| `08_distance_to_center_gradient` | price gradient with distance to centre |116117Tables (`results/tables/*.tex|csv`): model comparison (M1–M9), ML comparison, price premiums, quantile coefficients,118robustness summary, price decomposition, price-associated words.119120## ⚠️ Limitations121122- Listed (asking) nightly prices, not realized bookings; no occupancy data.123- Cross-sectional snapshot; seasonality is not identified.124- 5,000-listing sample; full-specification N = 1,906 after requiring reviews and location.125- Text features are embedding-based and not individually interpretable.126127## 📝 Citation128129```bibtex130@techreport{boucher2026airbnbhedonic,131  author      = {Boucher, Simon-Pierre},132  title       = {Hedonic Pricing of Short-Term Rental Properties: A Multi-Method Analysis of Airbnb Listing Prices in Quebec},133  institution = {Universit\'e du Qu\'ebec en Outaouais, D\'epartement des sciences administratives},134  type        = {Working Paper},135  number      = {4},136  year        = {2026},137  month       = {May}138}139```140141## 👤 Author & contact142143**Simon-Pierre Boucher** — Département des sciences administratives,144Université du Québec en Outaouais (UQO), Gatineau, QC.145📧 [simon-pierre.boucher@uqo.ca](mailto:simon-pierre.boucher@uqo.ca)146147## 🗒 Notes148149- Harmonised 2026-10-17: `wp4/` → `paper/`, `outputs/` → `results/`, `run_analysis.py`/`app.py` → `scripts/`;150  paths updated in `src/config.py`, `src/figures.py`, `src/tables.py`, `scripts/app.py` and the root `Makefile`.151- Bibliography switched from `apalike` to `aer` (natbib `authoryear,round,semicolon`); compiles without warnings.152