← Back to list

SARIMA Forecasting (Used Cars Dealers)

I’m trying to improve myself about the time series models. I decided to make a small project for this.

Taner Ant · 2022-07-17 19:05 · 7 claps · 2.4 min read
#sarima #time-series-forecasting #used-cars #auto-arima #sarimax
Open on Medium ↗

SARIMA Forecasting (Used Cars Dealers)

I’m trying to improve myself about the time series models. I decided to make a small project for this.

I needed to find dataset with seasonal pattern plus linear growth.There are some pretty good examples on FRED web page. Especially if you are looking for data similar to this, the retail trade section will be useful. I picked Retail Sales: Used Car Dealers dataset.

Read data → set_index(‘DATE’) → Convert index to datetime.

As you can see COVID-19 effected used car sales April 2020 to March 2021 (6163-16413) in one year almost triple .

I think we can say that the chip crisis has been particularly effective.

All time minimum 2013–12–01 5684 millions of dollars

All time minimum 2013–12–01 5684 millions of dollars

Rolling Statistics

We can use rolling mean to look trend and rolling std for varies from the rolling average.(window = 12 months)

A stationary time series is one whose statistical properties such as mean, variance, autocorrelation, etc. are all constant over time.

Stationary data refers to the time series data that mean and variance do not vary across time. The data is considered non-stationary if there is a strong trend or seasonality observed from the data.

For a Time series to be stationary, its ADCF test should have:

  1. p-value to be low (according to the null hypothesis)
  2. The critical values at 1%,5%,10% confidence intervals should be as close as possible to the Test Statistics

From the above ADCF test result Time Series at the moment is not stationary.

Seasonal decomposition

Model

If we forecast 24 months without seasonality, ARIMA model with Pmdarima statistical library.

It doesn’t seem very helpful.

It doesn’t seem very helpful.

Let’s use the seasonality metric.

SARIMA_model diagnostics:

Resources

[embed]Federal Reserve Economic Data | FRED | St. Louis Fed Welcome to FRED, your trusted source for economic data since 1991. Welcome to FRED, your trusted source for economic…fred.stlouisfed.org

Code

[embed]GitHub - tanerant/Medium You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or…github.com

My first medium post was a bit messy.I hope you enjoy.


메타데이터
post_id
f59ea49331a1
slug
sarima-forecasting-used-cars-dealers-f59ea49331a1
url
https://medium.com/@tanerant/sarima-forecasting-used-cars-dealers-f59ea49331a1
canonical_url
https://medium.com/@tanerant/sarima-forecasting-used-cars-dealers-f59ea49331a1
author_url
https://medium.com/@tanerant
status
ok
fetched_at
2026-07-26 21:01:39