AI Demand Forecasting for Automotive: Precision Without Compromise
Production planning errors are costly: excess inventory sitting on lots or lost sales due to shortages. According to McKinsey Global Institute, reducing forecast error by 10% cuts storage costs by 15% and increases availability of popular models. ML models solve this problem 1.2–1.4 times more accurately than traditional econometric approaches, especially under volatile demand and frequent configuration changes. For a dealer with a fleet of 1,000 vehicles, implementing a system saves up to 5 million rubles annually in storage costs. Reducing shortage losses can reach 30 million rubles per year for an average dealership. Potential savings for a mid-size dealer exceed $100,000 annually. Basic system pricing starts at $15,000. Typical annual savings from reduced inventory and lost sales range from $50,000 to $200,000 per dealership.
Our experience in automotive ML has delivered over 20 projects for OEMs and dealers. We guarantee accuracy by SLA and ensure forecast transparency at all levels—from mass models to rare configurations.
ML Forecasting Applications
Cold start for new configurations. New trim levels or options have no sales history. We use an attribute-based approach: for each new configuration, we find 5 historically similar ones by characteristics (engine, transmission, options) and apply the average coefficient to the base version forecast. This yields WMAPE < 20% from the first month.
Macroeconomic shocks. The auto market is sensitive to crises—chip shortages, sanctions, rate hikes. The model includes an event-driven recalculation: when MAPE exceeds a threshold over 2 months or an external shock appears, the model automatically retrains with new macro-regressors. This prevents forecast drift even in turbulent periods. Our approach reduces forecast error by 30% compared to conventional methods.
Aftermarket demand. Parts have complex seasonality and depend on fleet age. We use failure rate models accounting for mileage, climate, and region. For example, tire demand is forecasted with ±12% accuracy compared to ±35% with a naive approach. Our ML approach is 1.5 times better than conventional models for aftermarket demand.
Cold Start Handling
For new configurations (engine, transmission, options) with no historical data, we use attribute-based transfer: find the five most similar configurations by characteristics and compute an average correction coefficient applied to the base version forecast. This achieves WMAPE < 20% as early as the first month of sales. Without this approach, forecasting would be impossible until 6–12 months of data accumulate. Our attribute-based cold start approach is 3 times faster to achieve acceptable accuracy than waiting for historical data.
Macroeconomic Factors
GDP, consumer confidence, unemployment, inflation, central bank key rate, average auto loan rate, gasoline prices, used car price index, and demographics. These data are automatically loaded and processed as regressors in the SARIMAX model.
How We Build the Forecast: From Data to Deployment
- Data collection and cleaning—2–3 weeks. Sources: internal CRM, government statistics, supplier APIs.
- Model selection and training—1–2 weeks. We compare SARIMAX, Prophet, XGBoost and select the best by metrics (MAPE, WMAPE, MASE).
- Validation on historical data—1 week. Backtesting on 2 years with hyperparameter tuning.
- API integration and dashboards—2–3 weeks. REST/gRPC service, dashboard in Metabase or Grafana.
- Pilot launch—2 weeks. A/B test at one dealership.
Method Comparison: ML vs. Econometrics
| Criterion |
Econometrics (ARIMA) |
ML (SARIMAX + Boosting) |
| Accuracy (MAPE, 1 month) |
12–18% |
6–9% |
| Macro factor inclusion |
Manual selection |
Automatic feature selection |
| Cold start for configurations |
Not supported |
Attribute-based transfer |
| Impact of government programs |
No |
Flag + budget as regressor |
ML (SARIMAX + XGBoost) is 2 times better than traditional econometrics for configuration forecasts. SARIMAX outperforms ARIMA by up to 50% in volatile markets.
Macroeconomics and Seasonality: Accounting for External Factors
Key predictors: GDP, consumer confidence index, unemployment rate, inflation, central bank key rate, average auto loan rate, gasoline prices, used car price index, and demographics.
The SARIMAX model handles seasonality (peaks in December, March—subsidy programs) and allows adding external regressors:
Source: Wikipedia on SARIMAX
from statsmodels.tsa.statespace.sarimax import SARIMAX
model = SARIMAX(
endog=monthly_sales,
exog=macro_feats_monthly,
order=(2,1,1),
seasonal_order=(1,1,1,12)
)
result = model.fit()
forecast = result.forecast(steps=12, exog=macro_forecast)
Handling Macroeconomic Shocks
When MAPE exceeds a threshold over 2 months or sanctions/shortages appear, the model is recalculated with new macro-regressors. This ensures forecast stability in crises.
Forecasting at Different Levels: Configurations and Aftermarket
Cold start for configurations—attribute-based approach described above. Color mix is predicted by gradient boosting considering region, season, and trends.
Aftermarket demand forecast:
def aftermarket_demand_forecast(part_number, region, horizon):
park = get_veh_park(region, part_number['applicable_models'])
mileage = regional_avg_mileage[region]
failure_rate = failure_model.predict(part_number, age_dist=park['age'])
return park['count'] * failure_rate / 12 * horizon
Seasonal items (tires, batteries) have a pronounced annual cycle; brake parts follow a linear function of mileage.
Metrics, Monitoring, and Model Retraining
| Horizon |
Metric |
Target |
| 1 month |
MAPE |
< 8% |
| 3 months |
MAPE |
< 15% |
| 12 months |
MAPE |
< 25% |
| Configuration |
WMAPE |
< 20% |
We monitor using Weights & Biases. The model automatically retrains when MAPE exceeds the threshold over the last 2 months (additionally on external shocks). Macro-regressors are updated monthly.
Implementation Process and Timelines
Basic system (macro-regressors + SARIMAX + dealer dashboard)—4–6 weeks. Full hierarchical system (configurations, aftermarket, program accounting)—3–4 months. Cost is calculated individually.
Example work plan
- Analytics and data collection: 2 weeks
- Model development and training: 3 weeks
- Integration and dashboards: 2 weeks
- Pilot and refinement: 2 weeks
What You Get in the End
- Technical documentation (Data Dictionary, Model Card)
- API access to the model (REST/gRPC)
- Dealer dashboard (Metabase/Grafana)
- Team training for up to 5 people
- 3 months of post-implementation support
Typical mistakes we avoid:
- Using only time series without macro factors (error up to 30%)
- Lack of cold start for new configurations (forecasts impossible for first 6 months)
- Manual model updates (missing shocks)
Get a preliminary assessment of your project—contact us, and we will provide demo access to the system within 2 days. Request a consultation on ML forecasting implementation.
When does a time series forecasting model fail in production?
The CFO requests a quarterly sales forecast. An analyst builds SARIMA on three years of data, achieves MAPE 8.3% on the test set, and deploys. Two months later, the metric in production jumps to 23%. The root cause: the model was trained on pre‑COVID data, tested on a stable period, but production hit a promotion and supply chain disruption. Data leakage plus distribution shift—perfect notebook numbers, a broken forecast in reality. We have seen this pattern dozens of times across retail, fintech, and IoT. Our team has delivered more than 50 forecasting projects over 5+ years.
Incorrect cross-validation. Standard train_test_split for time series creates data leakage: the model sees future values during training. The correct approach is TimeSeriesSplit or walk‑forward validation with an expanding window.
Multiple seasonality. Hourly electricity consumption has three seasonalities: daily (24h), weekly (168h), yearly (8760h). SARIMA handles only one. Prophet can handle multiple but scales poorly to thousands of series.
Missing values and anomalies. A missing sensor reading is information (the sensor turned off), not NaN. Linear interpolation destroys this signal. Proper handling depends on the missingness mechanism.
Cold start. A new SKU in a 50,000‑item assortment has no history, yet a forecast is needed. Standard approaches fail; cross‑learning or feature‑based methods are required.
Why is model selection critical for your data?
Prophet (Meta) – a solid start for business data with clear seasonality and holidays. Fast setup, interpretable, built‑in outlier detection. Fails on irregular patterns and does not scale beyond ~10k series without parallelization.
Gradient boosting on features (LightGBM, XGBoost) – often underestimated. Engineer lags (t‑1, t‑7, t‑28), rolling means, day‑of‑week, holidays. The model trains on all series simultaneously, solving cold start via transfer learning. MAPE in retail often beats neural nets with proper feature engineering.
TFT (Temporal Fusion Transformer) – a transformer designed for interpretable forecasting with covariates. Built‑in variable selection, temporal attention, quantile outputs. Available in pytorch‑forecasting. Requires ~10,000+ records per series for stable training.
PatchTST – splits the series into patches (like ViT for images), capturing local patterns better than classic transformers. Excellent for long‑horizon forecasting (96–720 steps ahead).
N‑HiTS, N‑BEATS – attention‑free neural architectures, faster than TFT, competitive accuracy. N‑BEATS won the M4/M5 benchmarks for tasks without covariates.
| Method |
Covariates |
Scale (series) |
Interpretability |
Complexity |
| Prophet |
Yes (regressors) |
Up to 10k |
High |
Low |
| LightGBM + features |
Yes |
100k+ |
Medium |
Medium |
| TFT |
Yes |
1k–100k |
High |
High |
| PatchTST |
No/limited |
Any |
Low |
Medium |
| N‑HiTS |
No |
Any |
Low |
Low |
How do we deploy TFT in production?
A typical pipeline via pytorch‑forecasting:
training = TimeSeriesDataSet(
data,
time_idx="time_idx",
target="sales",
group_ids=["store", "sku"],
min_encoder_length=max_encoder_length // 2,
max_encoder_length=max_encoder_length, # 120 days
min_prediction_length=1,
max_prediction_length=max_prediction_length, # 28 days
static_categoricals=["store_type", "category"],
time_varying_known_reals=["price", "promo_flag"],
time_varying_unknown_reals=["sales"],
target_normalizer=GroupNormalizer(groups=["store", "sku"], transformation="softplus"),
)
A common mistake: the default target_normalizer (StandardScaler) breaks predictions for series with zero values (no sales on weekends). GroupNormalizer with transformation="softplus" is the correct choice for count data.
Case study: retail demand forecasting
A chain of 120 stores, 8,000 SKUs, 28‑day forecast horizon. The original system: SARIMA per series, MAPE 18.4%, retraining cycle – 6 hours. We replaced it with TFT on PyTorch + pytorch‑forecasting: a single model for all series, MAPE 11.2%, retraining – 40 minutes on an A10G. Feature importance via variable selection revealed that day_before_holiday influences more than the holiday date itself. Annual savings on inference alone exceeded $50,000.
Step‑by‑step configuration
-
Data collection and preparation. Handle missing values (mark NaN, interpolate only for technical failures), aggregate to required frequency, engineer covariates (holidays, promotions, prices).
-
Create
TimeSeriesDataSet. Set group_ids (store + SKU), time index, forecast horizon. Choose target_normalizer based on target distribution.
-
Train a baseline. Prophet or LightGBM first – to understand complexity.
-
Train TFT. Use
TemporalFusionTransformer with loss=QuantileLoss(), tune learning rate and hidden layer sizes.
-
Validate and interpret. Walk‑forward test, analyze variable selection, build attention heatmaps.
How to properly evaluate forecast quality?
RMSE alone is misleading – it over‑penalizes large values. Our standard set:
-
MAPE – interpretable, unstable near zero.
-
sMAPE – symmetric, avoids division by small numbers.
-
MASE (Mean Absolute Scaled Error) – normalized relative to a naive seasonal forecast, ideal for comparing series of different scales.
-
Pinball loss – for probabilistic forecasting, inventory management.
| Metric |
When to use |
Drawback |
| MAPE |
Business reporting, series without zeros |
Unstable for small values |
| sMAPE |
Model comparison |
Asymmetric interpretation |
| MASE |
Multi‑scale series, benchmarks |
Needs seasonal naive baseline |
| Pinball loss |
Probabilistic models |
Multiple values for different quantiles |
We guarantee a model card with these metrics on the validation set and walk‑forward results on at least 6 months of history.
What deliverables do you receive?
- Documentation of chosen architecture and hyperparameter rationale.
- Reproducible training and inference pipeline (Docker + CI/CD + Airflow/Prefect).
- Committed code with unit tests for key components.
- Team training: retraining, output interpretation, deployment of new versions.
- 3 months of post‑delivery support (consultations, bug fixes, fine‑tuning).
The model is deployed via FastAPI or Triton Inference Server. Retraining is scheduled (e.g., weekly) via Airflow with drift validation and automatic rollback if metrics deteriorate.
Process and timeline
We start with EDA: visualization, ADF test, STL decomposition, analysis of missing values and outliers. This takes 2–3 days but often reveals systemic data issues that block forecasting. Then we build a baseline (naive seasonal, Prophet), engineer features for LightGBM, and select a neural architecture if needed. Walk‑forward validation with a realistic horizon. Deployment via API with automatic retraining scheduled via Airflow or Prefect.
Timeline: MVP forecast on one data type – 3–6 weeks. Hierarchical forecasting system with automation – 2–5 months. Cost is calculated individually based on data volume, number of series, and required accuracy.
Our team consists of certified ML engineers (AWS ML Specialty, GCP Professional ML Engineer) with 5+ years on the market and over 50 completed forecasting projects. Contact us for a free analysis of your data – we will assess the task and provide initial recommendations within 1–2 days. Request a consultation to ensure your forecasts work in production, not just in a notebook.