"""Illustrative parameterisation report (no data are used). Prints the baseline parameters with units and the implied baseline moments next to the ranges reported in the verified empirical literature (see research/lit_notes_B.md); run: python -m src.calibration """ from __future__ import annotations from pathlib import Path import pandas as pd import yaml ROOT = Path(__file__).resolve().parents[1] # (moment, model column, literature range, source keys) — literature values are *not* targets, only comparison points COMPARISONS = [ ("mean time on market of sales (months)", "mean_tom_sold_months", "a few months; no aggregate figure in the verified matrix", "—"), ("urgency / forced-sale discount, most urgent type (%)", "D_urgent", "about 27 (foreclosures), 0–21 (auctions), 3.7 for 9.5 days of waiting", "campbell2011forced; mayer1998auctions; levitt2008agents"), ("cash discount, transaction-weighted (%)", "—", "2–3.9 (Los Angeles); mortgage premium 11 (US, reduced form)", "han2024cash; reher2024mortgage"), ("price s.d. among identical houses (%)", "price_sd_total", "n/a (hedonic residual s.d. 10–20 includes quality)", "—"), ("seller contact-hazard elasticity to theta", "—", "0.84 (CRS)", "genesove2012search"), ] def main(): cfg = yaml.safe_load((ROOT / "config" / "baseline.yaml").read_text()) print("Baseline parameters (illustrative; see config/baseline.yaml for justifications)") for sec, vals in cfg.items(): if isinstance(vals, dict): print(f" [{sec}] " + ", ".join(f"{k}={v}" for k, v in vals.items())) m = pd.read_csv(ROOT / "results" / "processed" / "exp01_baseline_moments.csv").iloc[0] print("\nBaseline moments vs literature comparison points (not calibration targets)") for name, col, rng, src in COMPARISONS: val = f"{100 * m[col]:.2f}" if col in ("D_urgent", "price_sd_total") else (f"{m[col]:.2f}" if col != "—" else f"alpha = {cfg['matching']['alpha']}") print(f" {name:<55} model {val:>8} literature {rng:<45} [{src}]") if __name__ == "__main__": main()