You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(structural): genuine audited dataset + m_obs from real data + measured identification
Structural dataset expansion sprint over the already-validated UYAP/KAP/TOKI families (no new source/model/quality abstraction). Make the dataset REAL and MEASURE what it identifies.
- Genuine audited seed under validation/structural/ (source_audited=true), derived from the frozen Level-2 records, kept distinct from fixtures: 1 UYAP auction (sold; appraised Q=4.5M -> winning 4.545M; parcel 509 / unit-net 32.5 distinct, gross null; partial legal floor), 1 KAP negotiated disposal (prior-appraisal 5.2M -> sale 5.508M; value_method=negotiation), 1 TOKI disclosure (PMVR3 -> 0 derivable period cohorts: differencing needs >=2 consecutive disclosures).
- datasets.py: load_genuine_datasets + dataset_status; CLI 'sold structural dataset' reports genuine audited observations separately from fixtures (UYAP sold/unsold/winning/offer/bidder/exact-floor; KAP eligible/negotiated/appraisal/prior; TOKI disclosures/projects/strata/cohorts/revision-blocked).
- moments.build_observed_moments: m_obs rebuilt from genuine data with moment provenance + unavailable (reasons). Single-observation variance is UNAVAILABLE (NaN), never guessed as 0.
- KAP negotiated-calibration subset (value_method must explicitly support negotiation; non-related alone does NOT infer negotiation).
- identify: moment Jacobian restricted to genuinely OBSERVED moments (simulated-but-unobserved sd moments do not inflate rank); three-way status NOT_IDENTIFIED / WEAKLY_IDENTIFIED (full rank but ill-conditioned or flat FREE-parameter profiles) / IDENTIFIED; no observation-count threshold.
- MEASURED result on genuine data: m_obs = 3 single-observation means (uyap_sale_prob, uyap_win/appraisal, kap log(sale/appraisal)); sold structural identify -> NOT_IDENTIFIED (rank 2 / dim 6, condition number ->inf), sensitivity mode. Reported honestly.
- Level-2 (KAP 963554, TOKI PMVR3, UYAP 16766356960) unchanged; consumer path frozen; no SaleProbability, no weak supervision, no fourth source, no fabricated fields/floors/counts/cohorts/identification.
- 169 tests passing
> Infer the **realized transaction price** of a Turkish home from its **asking** price — a provenance-aware valuation engine.
@@ -131,7 +131,7 @@ Each public source enters as **structural moments under its own mechanism**, nev
131
131
132
132
For an ordinary listing, **asking price is a noisy strategic signal of the seller reservation** (not ground truth, not a ceiling): `S` is conditioned on asking, fair value and tightness, `B`/`S` are drawn, trades (`B ≥ S`) retained, and the **conditional-on-trade** closing distribution returned — median, mean, an **80% structural interval**, trade probability, and **mechanism-transfer sensitivity**. This is a **structural inference, never an observed closing price or a measured ordinary-resale accuracy**.
133
133
134
-
**Identification before estimation.** Optimizer convergence is *not* identification. `sold structural identify` inspects the actual dataset and computes a numerical moment Jacobian `J(θ)=∂m_sim/∂θ'` (central differences, common random numbers) reporting rank, singular values, condition number and weakly-identified directions, plus per-parameter profile diagnostics for `θ` and the mechanism shifts. If `rank(J) < dim(θ)` the status is **`NOT_IDENTIFIED`** and prediction runs in **sensitivity mode**. Until an identified fit exists, `sold structural value` is labelled a **structural-method prototype using provisional parameters** — not a measured ordinary-resale model. See [`src/sold/structural/`](src/sold/structural/) and `sold structural value` / `identify` / `estimate`.
134
+
**Identification before estimation.** Optimizer convergence is *not* identification. `sold structural identify` inspects the **actual audited dataset** (`sold structural dataset` reports genuine audited observations separately from fixtures) and computes a numerical moment Jacobian `J(θ)=∂m_sim/∂θ'` (central differences, common random numbers) **restricted to the moments that are genuinely observed** — reporting available vs unavailable moments (with reasons), moment provenance by source, rank, singular values, condition number, weakly-identified directions, and per-parameter profile diagnostics. The status is three-way: `NOT_IDENTIFIED` (`rank(J) < dim(θ)`), `WEAKLY_IDENTIFIED` (full rank but severely ill-conditioned or flat profiles), or `IDENTIFIED`; the first two run prediction in **sensitivity mode**. No observation-count threshold is used as the criterion. Until an identified fit exists, `sold structural value` is labelled a **structural-method prototype using provisional parameters** — not a measured ordinary-resale model. See [`src/sold/structural/`](src/sold/structural/) and `sold structural dataset` / `identify` / `value` / `estimate`.
pytest -q #161 tests, fully offline (no network or API key required)
304
+
pytest -q #169 tests, fully offline (no network or API key required)
305
305
```
306
306
307
307
## Methodology & References
@@ -325,7 +325,8 @@ Negotiation-margin figures from Turkish market reporting: İstanbul ≈ 10%, Ank
325
325
-[x]**Direct-label quality gate (pre-ML)** — mandatory `origin` (`consumer_submission` / `test_fixture` / `demo_seed` / `manual_import`) so `asking_to_closing_labels()`**excludes test/demo by default** (opt-in `include_non_production=True`) and fixtures never inflate the genuine count; `quality_status` (`accepted`/`flagged`/`rejected`) that **hard-rejects only structurally impossible values** (non-positive price, closing-before-listing) and merely **flags** unusual ratios (extreme close-to-ask, final-above-initial, suspicious duration, duplicate) while preserving the original self-reported values; a privacy-preserving duplicate-candidate **fingerprint** (one-way SHA-256 over bucketed canonical non-personal fields that flags submissions collapsing to the **same canonical transaction fingerprint** — a canonical-fingerprint collision, **not** general near-duplicate similarity detection, and it does **not** identify a property or seller); genuine vs test/demo reported as **separate counts**
326
326
-[ ]**First genuine real-world label** — exactly one *actual* seller-submitted completed residential sale passing through the product path + quality gate. **Current genuine direct-label count: 0** — the end-to-end test proves the acquisition *path* works, not that a real-world label has been acquired
327
327
-[x]**Structural econometric core** — mechanism-aware generalized **Nash bargaining** (`P = ηB+(1−η)S`, `η` estimated, not hard-coded) fit by **Simulated Method of Moments**; TCMB-anchored hedonic fair value (relative premiums only, no listing intercept as level); structural UYAP auctions with the **statutory legal floor** (`muhammen_bedel` preserved as appraised value `Q`, never the reserve; partially-observed floors not fabricated); KAP `η`-calibration moments with a corporate mechanism shift; TOKİ cumulative-disclosure differencing into room-type cohort moments. Replaces weak-label aggregation as the core; the provenance registry and validated KAP/TOKİ/UYAP Level-2 records are kept; the consumer path is frozen as an optional future *validation* channel. No SaleProbability model yet
328
-
-[x]**Statutory-floor fix, TCMB double-count audit & identification diagnostics** — corrected the İİK acceptance floor to `max(0.5·Q, priority_claims) + realization_costs`; audited the fair-value anchor so a contemporaneous TL/m² level is not trend-adjusted twice (KFE ratio only when rolling an older anchor); expanded the UYAP/KAP/TOKİ structural dataset schemas + observed-moment constructors (area semantics preserved, `log(sale/appraisal)` KAP moments, revision-guarded TOKİ cohorts); added `sold structural identify` (Jacobian rank / singular values / condition number / weak directions / profile diagnostics → `NOT_IDENTIFIED` → sensitivity mode). **Next: public structural dataset expansion → observed moments → identification → only then real SMM estimation**
328
+
-[x]**Statutory-floor fix, TCMB double-count audit & identification diagnostics** — corrected the İİK acceptance floor to `max(0.5·Q, priority_claims) + realization_costs`; audited the fair-value anchor so a contemporaneous TL/m² level is not trend-adjusted twice (KFE ratio only when rolling an older anchor); expanded the UYAP/KAP/TOKİ structural dataset schemas + observed-moment constructors (area semantics preserved, `log(sale/appraisal)` KAP moments, revision-guarded TOKİ cohorts); added `sold structural identify` (Jacobian rank / singular values / condition number / weak directions / profile diagnostics → `NOT_IDENTIFIED` → sensitivity mode)
329
+
- [x] **Genuine structural dataset (measured, not synthetic)** — wired the three validated Level-2 records as the genuine audited seed under [`validation/structural/`](validation/structural/) (`source_audited=true`, kept distinct from fixtures): **1 UYAP auction** (sold; appraised `Q`=4.5M → winning 4.545M; parcel/net areas distinct, gross null; partial legal floor), **1 KAP negotiated disposal** (prior-appraisal 5.2M → sale 5.508M; `value_method=negotiation`), **1 TOKİ disclosure** (PMVR3 → **0** derivable period cohorts: differencing needs ≥2 consecutive disclosures). `m_obs` is rebuilt from this genuine data — **3 single-observation means** (`uyap_sale_prob`, `uyap_win/appraisal`, `kap log(sale/appraisal)`); variances/quantiles reported **unavailable** at n=1 (never guessed). Measured result: `sold structural dataset` + `sold structural identify` → **`NOT_IDENTIFIED`** (rank 2 / dim 6, condition number →∞), sensitivity mode; a three-way `WEAKLY_IDENTIFIED` status and moment-provenance/unavailability reporting were added. **Next: genuine repeated TOKİ disclosures + more audited UYAP/KAP observations → rerun identify (data, not architecture)**
329
330
-[ ]**SaleProbability** model (`P(sold ≤ N days)`) trained on collected outcomes
330
331
-[ ] Live, ToS-reviewed fetchers for the public label sources
331
332
-[ ] Broker-vs-benchmark analytics over an aggregate anonymized dataset
0 commit comments