Google Big query ML ARIMA is not forecasting correctly

427 views Asked by At

I have input data as shown below. (actual data removed). I am trying to forecast next 3 months of VAL using almost 14 months of data. (Frequency is monthly). For below data, I am getting all 3 months of foretasted values as same.

In model evaluation, I am getting all FALSE values for 'Has_Drift' column. AIC is all -negative.

Can anyone help? What it is missing which is making it difficult to forecast for 3 months.

Sample input and output below.

CREATE OR REPLACE MODEL <MODEL_NAME> 
OPTIONS(MODEL_TYPE = 'ARIMA',
      time_series_timestamp_col='DATE_COL',
      time_series_data_col='VAL',
      DATA_FREQUENCY = 'MONTHLY') AS
SELECT CAST (P1_date as DATE) DATE_COL , VAL from (
SELECT '2019-06-07' DATE_COL ,0.09262066947 VAL union all
SELECT '2019-07-07',0.07495576437 union all
SELECT '2019-08-07',0.09832972783 union all
SELECT '2019-09-07',0.09959302865 union all
SELECT '2019-10-07',0.1445173433 union all
SELECT '2019-11-07',0.1116498012 union all
SELECT '2019-12-07',0.1065453852 union all
SELECT '2020-01-07',0.1403350342 union all
SELECT '2020-02-07',0.105060523 union all
SELECT '2020-03-07',0.2191159052 union all
SELECT '2020-04-07',0.07962838894 union all
SELECT '2020-05-07',0.131412274 union all
SELECT '2020-06-07',0.173012701 union all
SELECT '2020-07-07',0.1504522412 union all
SELECT '2020-08-07',0.1073950999
)

Forecast Values

 SELECT forecast_timestamp, forecast_value 
FROM ML.FORECAST(MODEL <MODEL_NAME>, 
STRUCT(4 AS horizon, 0.6 AS confidence_level))
Row forecast_timestamp  forecast_value  
1   2020-08-30 00:00:00 UTC|0.12230825916400008
2   2020-09-29 00:00:00 UTC|0.12230825916400008
3   2020-10-29 00:00:00 UTC|0.12230825916400008
4   2020-11-28 00:00:00 UTC| 0.12230825916400008

0

There are 0 answers