Technical reportsc.
Car Price · Report

Technical report

Used Car Price Analysis — Technical Report

Data and Cleaning Protocol

// All figures in this report cover 4 live snapshots between 2026-01-18 and 2026-06-27, derived from a single reproducible analysis pipeline.

1.1 Scope, deduplication, and leakage prevention

Starting from 45,159 TR-plated rows (76 non-TR or missing-plate listings are excluded due to differing tax regimes), taking the latest snapshot per listing ID yields 29,988 unique listings (17,896 BMW, 12,092 Audi; median asking price ₺1.54M, mean ₺1.87M).

Five-fold cross-validation operates on the deduplicated table so the 10,831 re-scraped listings cannot straddle train/validation folds. Collection boundaries cap asking prices at ₺6.5M (10 listings at cap) and vehicle age at 21 years, excluding electric vehicles and SUVs.

1.2 Engine range rule and seller-unspecified panels

Listings report engine size (7,865) and power (7,797) as ranges in roughly a quarter of the sample. Checked against exact-value references of the same car model, engine size sits nearest the upper bound (median gap 5.0 cc vs midpoint 95.5 cc), while power sits nearest the midpoint (7.0 hp vs upper 14.0 hp).

Engine rule validation: upper bound for cc vs midpoint for hp
Engine rule validation: upper bound for cc vs midpoint for hp

Across body panels, 15.3% of entries — and 68.2% of heavy-damage flags — are left "unspecified" by sellers (1,235 listings leave all 13 panels blank), and are treated as original (0) by design. Out of 117 raw columns, 53 feed the 25 model features (14 numeric, 9 categorical, 2 text via TF-IDF+SVD), while 63 are excluded as identity, redundant, or co-missing catalog blocks.

Retained 25 model features:

kind count columns
Numeric 14 vehicle_age, gb_mileage, power_hp_val, engine_cc_val, door_changed, door_painted, door_local, fender_changed, fender_painted, fender_local, bumper_changed, bumper_painted, bumper_local, is_heavy_damaged
Categorical 9 brand, kb_body_type, kb_drivetrain, segment, kb_transmission, kb_fuel, roof_state, hood_state, trunk_state
Text (TF-IDF+SVD) 2 model, series

Excluded 63 raw columns by reason: twin columns with heavier missingness are dropped in favor of the cleaner source (e.g. gb_drivetrain 74.0% missing vs kb_drivetrain 1.5%), and catalog specs fail together (98.8–100% co-missingness).

group reason cols sample columns
A Quasi-constant (top share ≥ 99%) 4 kb_condition, gb_usage_type, gb_is_first_owner, gb_plate_origin
B Duplicate kb_ / gb_ twin 11 kb_year, kb_mileage, gb_transmission, gb_fuel, gb_body_type, gb_color …
C Identity / free-text / date 8 listing_date, ad_title, location, eids_model, url, scraped_at …
D Missing > 40% 5 gb_mtv_yearly, tramer_fee, transmission_brand, gb_kasko_avg, gb_traffic_insurance_avg
E Co-missing catalog block 22 kb_fuel_cons_avg, kb_fuel_tank, gb_segment, torque_nm, cylinder_count, max_speed_kmh …
F Derived / summary duplicate 9 engine_cc_low, engine_cc_val, engine_cc_is_range, power_hp_val, power_hp_is_range, count_changed …
G Unselected catalog attribute 4 kb_color, kb_trade_available, kb_seller_type, gb_warranty_status

What Drives Price: Market Structure and Hedonic Model

2.1 Target transformation and feature dependence

Raw asking price is strongly right-skewed (1.62); transforming via log1p(price) lowers skewness to 0.28 so relative errors weigh evenly across tiers. Directional Theil's U shows model nearly determines series (0.999 vs reverse 0.387). Clean derived segments replace the portal's corrupt raw G tag (215 mislabelled MPV listings). Among numeric features, the strongest Spearman correlation pairs vehicle age with mileage (0.736).

Spearman correlation heatmap across core numeric features
Spearman correlation heatmap across core numeric features
Series × segment median price matrix
Series × segment median price matrix

2.2 Seven-rung hedonic out-of-fold R² ladder

Across 29,554 complete-engine listings clustered over 735 car models, OOF log1p(price) regressions decompose explanatory power:

  • Coarse identity only (segment, brand, fuel, transmission): OOF R² 0.38
  • Car model name only: 0.83 · full identity (+ engine + controls): 0.86
  • Condition only (age, km, damage): 0.73 · condition + engine: 0.87
  • Condition + engine + segment control: 0.93 · condition + engine + car model control: 0.96

Decomposing full OOF R² yields unique condition 0.1049, unique identity 0.2303, and shared variance 0.6260.

Hedonic out-of-fold R² ladder across seven specifications
Hedonic out-of-fold R² ladder across seven specifications

2.3 Controlled effects and non-linearities

Within the same car model (centred at 11 years, 181,000 km), controlled associations are −5.8% per year of age, −14.8% per 100k km, −12.5% for heavy damage, −3.1% per replaced panel, and −1.0% per painted panel. Dropping identity controls shrinks apparent mileage (−10.2%) and inflates +100 hp to +50.1% (confounded with car class), whereas within-model +100 hp (+19.3%) and +1 litre (+5.97%) remain noisy because power barely varies inside a model name. Year-dummy steps average −6.8%/yr at ages 5–10 vs −4.7%/yr at ages 15–20; painted panels taper from −2.3% at 1 panel.

Hedonic effects under segment and car-model controls (95% CI)
Hedonic effects under segment and car-model controls (95% CI)
term segment control [95% CI] car-model control [95% CI]
Age (+1 year) −6.64% [−6.92%, −6.37%] −5.80% [−6.33%, −5.27%]
Age² +0.08% [+0.04%, +0.13%] +0.03% [−0.03%, +0.08%]
Mileage (+100k km) −15.11% [−15.81%, −14.40%] −14.83% [−15.31%, −14.34%]
Mileage² +1.56% [+1.08%, +2.05%] +1.67% [+1.34%, +2.01%]
Age × km −0.62% [−0.89%, −0.35%] −0.33% [−0.56%, −0.10%]
Heavy damage record −11.60% [−12.51%, −10.68%] −12.46% [−13.25%, −11.67%]
Painted panel (each) −1.05% [−1.17%, −0.92%] −0.98% [−1.09%, −0.88%]
Changed panel (each) −3.06% [−3.33%, −2.79%] −3.12% [−3.35%, −2.88%]
+100 hp power +19.86% [+13.89%, +26.15%] +19.30% [+6.90%, +33.12%]
+1 litre engine +7.49% [+0.71%, +14.73%] +5.97% [−0.92%, +13.35%]

Price Prediction Model and Feature Contribution

3.1 Model comparison and comparable-median baselines

Evaluated on the same leak-free 5-fold CV split against laddered median baselines:

model / baseline MAE MedAE RMSE MAPE R² (₺)
LightGBM · TF-IDF+SVD (served) ₺109,776 ₺75,320 ₺176,225 6.49% 0.9745
CatBoost · shared matrices (SVD) ₺110,085 ₺74,927 ₺176,130 6.44% 0.9745
CatBoost · native text handling ₺112,925 ₺77,660 ₺178,312 6.58% 0.9739
Comparable median (model+year ladder) ₺191,224 ₺130,000 ₺305,050 11.20% 0.9235
Series+year median baseline ₺203,621 ₺142,500 ₺308,976 11.65% 0.9216

LightGBM and CatBoost-SVD tie in practice; LightGBM is served for deterministic CPU training with 258 trees (median of CV early-stopping folds). Across baseline ladder rungs, MAE rises from ₺179K (exact cell) to ₺559K (all model years) and ₺1.10M (global median).

tier listings share MAPE MAE R²
model + year 29,236 97.49% 10.69% ₺179K 0.9450
model (all years) 596 1.99% 26.70% ₺559K 0.6082
global median 156 0.52% 47.38% ₺1,095K -0.2359
Comparable median vs LightGBM MAE comparison
Comparable median vs LightGBM MAE comparison

3.2 Brand ablation and 5-group LOFO

Brand alone achieves 8.80% MAPE; series+model achieves 6.49%, and adding brand on top moves MAE by just ₺1 (6.49%).

identity inputs MAPE MAE R²
brand only 8.80% ₺162,812 0.9413
series + model 6.49% ₺109,775 0.9745
brand + series + model 6.49% ₺109,776 0.9745

Dropping each non-overlapping feature group increases OOF RMSE and MAPE by (LOFO):

  • Mileage: +₺55K · +2.63 pts
  • Age: +₺46K · +1.50 pts
  • Damage (13 columns): +₺25K · +1.24 pts
  • Model + series name: +₺19K · +0.66 pts
  • Engine (hp + cc): +₺524 · -0.024 pts (largely redundant with model name)
LOFO out-of-fold error increase across five feature groups
LOFO out-of-fold error increase across five feature groups

Errors, Scale Interval, Hit Probability, and Forward Test

4.1 Residual profile and large errors

Out-of-fold log-price R² is 0.9699 with calibration slope 1.0033; median absolute error is 4.68% and 80.0% of predictions fall within ±10% (52.6% sit inside ≤5% vs 4.0% beyond 20%). Across quartiles, Q1 holds the highest percentage error (7.0%) whereas Q4 carries 38.9% of total currency error (₺171K MAE). Having 73 under-predictions in the top-100 ₺ errors stems from log-to-currency asymmetry rather than bias (symmetric coin-flip expectation 67.8).

Predicted vs Actual asking prices — OOF calibration diagonal
Predicted vs Actual asking prices — OOF calibration diagonal
|residual| band listings share
≤ 5% 15,775 52.6%
5% – 10% 8,221 27.4%
10% – 20% 4,784 16.0%
> 20% 1,208 4.0%
OOF residual distribution with ±10% band
OOF residual distribution with ±10% band

Large errors (|residual| > 20%, 4.0% · 1,208 listings) drop from 19.0% in single-listing cells (12.0% at 18+ yrs, 19.1% in F/S segments) to 2.9% at 100+ comparables.

Fewer comparables, larger error — median error per car model
Fewer comparables, larger error — median error per car model
listings in model+year cell listings large error (>20%) over-pred under-pred
1 610 19.0% 10.7% 8.4%
2–4 1,584 10.5% 6.2% 4.3%
5–19 5,732 4.7% 3.0% 1.7%
20–99 16,505 3.0% 1.9% 1.1%
100+ 5,557 2.9% 2.0% 0.9%
Percentage and lira error by predicted price quartile
Percentage and lira error by predicted price quartile

Most extreme OOF misses (sparse niches & listing-level anomalies):

car year km asking predicted residual comparables
BMW M3 2009 182,980 ₺5,850,000 ₺2,547,649 +56.5% 1
BMW M4 2014 65,000 ₺6,500,000 ₺3,285,609 +49.5% 1
BMW M3 2014 50,000 ₺5,999,000 ₺2,785,950 +53.6% 3
AUDI A4 Sedan 2.0 TDI 2006 355,000 ₺644,000 ₺1,790,840 −178.1% 24
BMW 750i Long 2007 271,000 ₺1,190,000 ₺2,831,842 −138.0% 0

4.2 Cross-calibrated scale interval and ±10% hit probability

A fixed conformal margin (q = 0.1412) reaches 89.99% overall only by under-covering Q1 (81.0%) and comparable-less listings (70.7%), missing the 90% target by ≥5 pts in 18 input groups. The scale model (k = 2.0874) holds 90.09% overall, 89.9% in Q1, 90.3% with no comparables, and 0 groups off target, improving interval score (0.3657 vs 0.4211) while narrowing 62.4% of intervals.

90% interval coverage: single margin vs scale model
90% interval coverage: single margin vs scale model
quartile predicted band single margin (90%) scale model (90%)
Q1 < ₺1.15M 81.0% 89.9%
Q2 ₺1.15M – ₺1.53M 91.0% 90.2%
Q3 ₺1.53M – ₺2.26M 93.2% 89.6%
Q4 > ₺2.26M 94.7% 90.7%

Derived from the same nested scores, ±10% hit probability is calibrated out-of-fold (mean predicted 78.3% vs observed 78.3%, Brier 0.1493, 12.2% skill over constant baseline).

Hit probability reliability curve: OOF vs forward test
Hit probability reliability curve: OOF vs forward test
confidence score listings observed ±10% hit
1 out of 10 7 14.3%
2 out of 10 106 30.2%
3 out of 10 280 40.4%
4 out of 10 868 48.8%
5 out of 10 2,506 57.1%
6 out of 10 4,637 64.4%
7 out of 10 6,118 74.7%
8 out of 10 6,983 84.8%
9 out of 10 8,483 94.2%

4.3 Single forward test and time boundary (why PSI/drift is excluded)

Trained on 21,099 listings seen up to 2026-03-21 and tested on 8,889 new listings first appearing in 2026-06-27, MAPE edges from 6.60% to 6.78% (+0.18 pts, 95% cluster CI [0.10, 0.26]), scale coverage reaches 86.8% (88.5% with zero comparables), and observed ±10% hits read 75.1% vs 79.1% predicted. Because snapshots are irregular stock dumps sharing overlapping ads, cross-snapshot PSI/KS/EMD mixes market movement with listing survival and composition shift and is therefore excluded in favor of this single clean forward test.

How the Model Builds a Price: SHAP

5.1 Out-of-fold TreeSHAP and grouped shares

All 29,988 listings are explained via exact TreeSHAP from each listing's out-of-fold model (maximum additivity gap 2.8e-11). Grouped mean |SHAP| shares and typical price multipliers:

  • Age: share 43.9% · typical price effect 23.5%
  • Engine (hp + cc): share 20.6% · typical effect 12.3% (small under LOFO because model name covers it; SHAP measures reliance inside trained trees)
  • Mileage: share 12.9% · typical effect 7.8%
  • Model + series name: share 10.2% · typical effect 5.5%
  • Damage (13 columns): share 6.3% · typical effect 3.9%
  • Segment: share 4.3% · typical effect 2.4% · Brand: 0.00007 mean |SHAP| (~0.0% — all three methods confirm brand carries zero extra signal beyond model name).
Out-of-fold SHAP feature group shares
Out-of-fold SHAP feature group shares
feature group mean |SHAP| (log) share typical price effect
Age (years) 0.2870 43.9% 23.5%
Engine (hp + cc) 0.1347 20.6% 12.3%
Mileage 0.0842 12.9% 7.8%
Car model + series 0.0666 10.2% 5.5%
Damage (13 columns) 0.0412 6.3% 3.9%
Segment 0.0282 4.3% 2.4%
Body type 0.0070 1.1% 0.4%
Transmission 0.0043 0.7% 0.2%
Fuel 0.0009 0.1% 0.1%
Drivetrain 0.0001 0.0% 0.0%
Brand 0.0001 0.0% 0.0%

5.2 Direction checks, interaction, and model comparison

Spearman monotonicity checks confirm direction: age -0.99, mileage -0.96, power 0.89. Between ages 0–2 and 18+, the age component shifts predictions by 3.6× against a 5.7× median prediction ratio; in the 150–250k km band LightGBM penalizes mileage more steeply under age 10 (-0.030 vs -0.006).

Out-of-fold SHAP beeswarm across all 29,988 listings
Out-of-fold SHAP beeswarm across all 29,988 listings
Out-of-fold SHAP dependence curves for age, mileage, and power
Out-of-fold SHAP dependence curves for age, mileage, and power
Mileage SHAP contribution split by vehicle age
Mileage SHAP contribution split by vehicle age

Equally accurate LightGBM and CatBoost (SVD) split correlated features differently: LightGBM allocates 43.9% to age and 12.9% to mileage vs CatBoost's 30.9% and 22.1%. Yet listing-level correlation of their combined age + mileage contribution reaches 0.9970 (54.7% joint share): individual shares depend on the learner, while their joint contribution stays invariant.

LightGBM vs CatBoost SHAP group share comparison
LightGBM vs CatBoost SHAP group share comparison
feature group LightGBM (final) CatBoost (SVD)
Age (years) 43.9% 30.9%
Engine (hp + cc) 20.8% 17.2%
Mileage 12.9% 22.1%
Car model + series 8.8% 13.7%
Damage (13 columns) 6.5% 7.6%
Segment 5.2% 7.1%
Body type 1.0% 0.4%
Transmission 0.7% 0.9%
Fuel 0.1% 0.1%
Drivetrain 0.0% 0.1%
Brand 0.0% 0.0%

5.3 Median-error listing waterfall

For the automatically chosen median-residual listing 520i Executive (2016, 216,000 km), asking price is ₺1,765,000 and OOF prediction is ₺1,847,627 (|residual| 4.68%; base 14.2993, sum of contributions +0.1301).

SHAP waterfall breakdown for median-error example
SHAP waterfall breakdown for median-error example