Bonjour,
Je travaille sur la série temporelle suivante :
1 | 3.89, 2.81, 0.88, 5.36, 6.18, 12.05, 16.16, 22.52, 20.4, 21.87, 23.48, 23.01, 19.4, 11.21, 32.16, 26.33, 19.8, 23.09, 21.73, 24.25, 23.18, 22.03, 24.42, 23.11, 19.65, 32.53, 28.42, 24.18, 26.41, 26.9, 23.85, 23.73, 30.35, 22.98, 24.2, 32.32, 27.96, 22.51, 26.69, 31.51, 28.69, 25.09, 28.5, 25.24, 32.61, 30.26, 27.78, 27.56, 28.5, 28.96, 26.92, 27.75, 25.8, 30.38, 32.43, 21.51, 28.34, 34.82, 24.79, 28.19, 30.36, 25.02, 30.54, 23.21, 35.98, 29.04, 29.48, 26.87, 29.68, 29.74, 28.66, 24.62, 30.26, 33.03, 26.76, 30.7, 31.75, 26.69, 29.41, 30.24, 23.05, 26.26, 23.82, 26.43, 26.58, 29.29, 23.09, 26.85, 27.73, 29.02, 29.12, 28.39, 26.98, 25.9, 27.13, 28.56, 23.69, 27.72, 28.91, 26.36, 24.5, 30.71, 30.04, 23.62, 31.15, 21.46, 31.61, 27.43, 27.68, 26.51, 27.07, 29.4, 24.95, 28.81, 25.43, 31.19, 25.28, 23.27, 32.23, 24.1, 30.44, 26.32, 28.49, 27.56, 26.62, 28.45, 26.91, 29.21, 26.14, 28.77, 27.2, 27.7, 28.63, 25.5, 28.97, 26.9, 28.14, 28.19, 25.02, 27.78, 27.01, 25.81, 27.58, 26.08, 26.4, 24.32, 18.93, 26.96, 27.18, 27.6, 26.27, 27.83, 24.05, 25.7, 26.53, 25.83, 26.65, 27.18, 23.69, 25.74, 29.46, 25.95, 29.75, 23.39, 30.77, 26.79, 28.94, 28.3, 21.9, 29.14, 23.89, 26.41, 27.76, 27.4, 31.28, 19.06, 29.87, 28.61, 26.09, 32.15, 21.86, 29.09, 30.67, 25.15, 28.19, 23.17, 25.69, 22.86, 27.85, 19.84, 29.73, 29.48, 24.2, 24.93, 22.51, 26.08, 30.18, 23.3, 32.6, 23.99, 25.04, 24.52, 17.67, 21.86, 21.11, 21.72, 18.73, 24.54, 24.22, 22.98, 22.4, 22.18, 21.42, 27.8, 22.94, 22.86, 23.25, 25.28, 21.67, 25.46, 19.43, 28.33, 23.16, 23.67, 23.84, 23.87, 23.75, 25.13, 18.94, 26.45, 22.95, 22.98, 22.25, 23.43, 24.01, 19.88, 25.03, 24.55, 19.26, 21.74, 21.62, 22.64, 21.5, 21.61, 21.12, 22.76, 19.83, 20.99, 20.27, 21.12, 20.74, 18.11, 20.12, 18.95, 20.92, 18.69, 20.94, 19.9, 18.26, 20.39, 16.27, 20.92, 19.82, 19.33, 19.08, 18.61, 18.64, 20.41, 20.47, 19.33, 21.04, 20.77, 20.74, 20.31, 19.89, 19.42, 21, 20.33, 20.05, 18.67, 16.28, 21.34, 20.13, 19.77, 20.05, 19.48, 20.5, 19.36, 18.91, 15.38, 21.05, 18.13, 18.13, 17.38, 19.42, 16.65, 17.48, 16.85, 12.63, 16.23, 14.08, 16.15, 12.99, 16.9, 13.95, 12.73, 14.52, 16.78, 14.97, 16.66, 14.81, 14.65, 16.84, 14.49, 14.14, 16.2, 14.44, 5.56, 15.66, 9.08, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.68, 3.75, 4.96, 6.92, 7.39, 6.74, 15.8, 11.52, 23.25, 18.49, 20.29, 18.84, 21.75, 17.02, 22.19, 20.56, 15.18, 26.7, 23.74, 22.15, 23.62, 22.26, 17.87, 24.05, 23.76, 22.22, 21.32, 28.06, 25.93, 24.82, 24.51, 25.62, 24.92, 21.88, 28.05, 23.77, 24.72, 22.87, 22.44, 28.15, 24.03, 22.78, 22.94, 22.65, 20.93, 20.98, 20.88, 21.23, 24.19, 23.01, 23.61, 23.69, 23.9, 24.2, 22.61, 22.53, 24.78, 23.86, 23.52, 20.54, 26.5, 13, 35.85, 22.43, 22.1, 21.24, 23.76, 23, 20.75, 25.76, 19.5, 21.47, 21.01, 23.88, 21.05, 23.82, 19.14, 19.87, 21.92, 17.77, 23.49, 20.75, 15.89, 27.4, 20.56, 18.85, 22.89, 20.63, 24.03, 25.72, 24.61, 26.45, 22.72, 26.81, 25.26, 22.1, 26.39, 25.19, 23.89, 25.07, 22.98, 23.94, 24.32, 24.42, 23.48, 24.41, 24.12, 26.43, 25.22, 23.16, 25.56, 22.33, 26.11, 24.71, 23.35, 25.76, 22.3, 19.03, 30.03, 22.56, 20.67, 26.2, 22.82, 18.56, 18.64, 27.1, 19.62, 22.48, 22.28, 20.9, 23.59, 19.14, 23.67, 21.42, 23.09, 20.59, 24.15, 18.75, 23.47, 20.53, 22.87, 20.54, 19.94, 24.52, 18.95, 22.66, 15.08, 27.61, 18.48, 20.79, 24.5, 19.44, 20.06, 23.02, 18.02, 23.95, 18.46, 21.28, 21.12, 20.06, 17.43, 24.34, 19.32, 21.53, 23.61, 19.6, 20.13, 20.76, 14.95, 21.49, 24.27, 19.21, 17.47, 23.26, 17.02, 20.08, 22.91, 21.46, 21.6, 17.48, 26.13, 23.97, 23.15, 21.21, 18.46, 20.43, 24.44, 20.36, 23.6, 22.02, 22.32, 19.65, 21.98, 22.05, 21.62, 21.02, 21.68, 22.55, 17.69, 24.33, 16.67, 23.93, 20.28, 20.12, 21.15, 20.88, 20.58, 18.78, 18.35, 22.82, 17.58, 18.02, 24.96, 15.84, 20.59, 18.16, 13.29, 18.18, 13.46, 15.67, 17.69, 17.98, 19.8, 17.96, 22.05, 15.48, 18.68, 19.17, 18.42, 18.77, 19.78, 17.92, 19.02, 15.05, 20.8, 18.34, 19.37, 18.32, 18.72, 18.36, 18.07, 17.61, 18.42, 17.15, 17.97, 19.2, 15.54, 17.62, 17.54, 18.44, 16.35, 20.54, 18.1, 18.07, 17.94, 18.08, 17.13, 16.36, 17.64, 16.11, 16.91, 16.07, 16.33, 16.57, 14.53, 15.02, 15.28, 17.07, 16.13, 16.61, 16.28, 15.41, 15.37, 16.57, 14.96, 14.63, 16.29, 15.31, 14.92, 15.38, 15.5, 15.9, 15.04, 15.47, 14.48, 15.53, 16.4, 15.12, 16.09, 16.09, 15.94, 15.58, 16.27, 11.89, 17.86, 13.93, 15.06, 11.82, 15.67, 16.32, 14.06, 15.34, 14.36, 14.18, 12.38, 12.74, 12.79, 15.35, 12.92, 8.44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.2, 9.68, 12.48, 15.5, 15.2, 17.48, 18.88, 16.99, 20.43, 17, 21.2, 22.35, 20.74, 25.49, 21.52, 25.15, 23.37, 19.47, 20.82, 25.48, 23.11, 21.4, 28.18, 21.7, 24.6, 18.58, 24.77, 26.39, 24.34, 24.44, 25.7, 25.62, 26.1, 25.82, 29.45, 26.18, 26.91, 20.34, 27.3, 26.08, 23.38, 28.34, 27.04, 26.51, 25.4, 31.47, 20.88, 26.93, 30.49, 24.61, 28.54, 29.24, 25.94, 27.45, 25.27, 19.31, 21.28, 25.54, 25.93, 23.79, 22.62, 23.37, 27.8, 25.89, 23.87, 24.89, 27.94, 14.01, 16.97, 28.41, 27.9, 25.87, 25.65, 28.58, 25.13, 26.01, 28.01, 27.79, 27.14, 25.29, 27.41, 23.27, 29.6, 23.17, 27.56, 26.02, 25.59, 24.38, 25.1, 25.84, 29, 25.3, 22.66, 29.68, 23.5, 25.83, 24.1, 33.48, 22.84, 27.22, 27.57, 26.87, 28.56, 24.49, 27.09, 26.5, 25.49, 27.28, 24.91, 28.53, 25.25, 25.27, 27.14, 25.71, 29.22, 23.06, 22.5, 26.52, 25.01, 27, 26.08, 25.84, 24.83, 25.47, 26.83, 22.75, 25.94, 24.97, 23.52, 25.71, 24.19, 25.91, 25.27, 18.21, 26.42, 25.07, 25.42, 25.12, 23.43, 22.76, 25.47, 22.77, 23.77, 26.86, 22.89, 24.05, 23.75, 20.05, 29.26, 24.4, 23, 24.25, 23.63, 20.8, 20.12, 21.8, 26.24, 19.42, 19.78, 28.78, 21.18, 22.23, 23.68, 19.64, 27.1, 15.7, 31.12, 19.55, 19.59, 28.39, 23.87, 18.57, 19.45, 21.24, 16.09, 23.01, 19.96, 19.89, 23.99, 20, 16.47, 24.14, 20.82, 22.48, 22.13, 24.6, 19.59, 15.79, 20.97, 21.57, 24.82, 21.7, 19.98, 20.01, 18.82, 22.49, 23.47, 20, 16.52, 25.64, 18.4, 23.75, 25.81, 19.9, 21.24, 20.86, 20.15, 20.83, 22.61, 18.74, 21.41, 23.78, 20.01, 21.99, 22.74, 21.34, 20.86, 21.96, 21.33, 20.61, 23.82, 18.55, 19.11, 22.72, 15.95, 21.46, 19.43, 19.42, 20.64, 19.55, 10.66, 28.02, 21.03, 20.08, 16.87, 20.8, 20.07, 21.66, 17.44, 20.04, 18.64, 20.67, 18.11, 20.75, 19.1, 19.46, 20.66, 20.31, 18.27, 18.9, 19.95, 19.25, 18.98, 18.07, 17.33, 19.51, 18.68, 18, 10.02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8.85, 14.95, 14.27, 11.8, 13.2, 18.53, 19.44, 7.03, 21.42, 10.71, 22.54, 19.66, 26.65, 19.55, 6.54, 37.22, 11.25, 9.95, 11.46, 10.43, 13.84, 26.63, 5.85, 18.81, 9.71, 10.22, 24.23, 15.91, 31.52, 25.16, 13.09, 38.02, 26.73, 27.69, 26.47, 12.04, 14.33, 7.21, 33.34, 14.82, 18.77, 25.99, 17.54, 29.07, 20.91, 24.77, 19.25, 29.67, 30.18, 28.7, 29.73, 28.83, 30.71, 31.01, 23.44, 18.97, 14.11, 14.27, 20.22, 14.15, 23.03, 22.12, 24.05, 25.68, 27.57, 26.49, 28.32, 25.23, 27.03, 27.74, 26.55, 26.23, 28.19, 26.75, 27.42, 27.53, 27.53, 25.06, 22.55, 29.88, 25.77, 24.26, 25.38, 26.16, 25.56, 25.47, 23.7, 26.17, 24.39, 26.47, 23.97, 24.23, 24.59, 17.74, 29.01, 25.59, 24.47, 24.21, 24.12, 24.2, 25.28, 21.32, 24.69, 22.75, 23.26, 23.94, 23.68, 24.84, 20.62, 26.27, 26.2, 20.3, 24.67, 21.17, 23.09, 22.83, 23.08, 25.52, 25.23, 22.55, 22.87, 18.05, 29.36, 21.4, 22.84, 22.72, 24.12, 19.8, 25.23, 18.81, 26.95, 22.92, 25.87, 22.51, 20.91, 27.93, 21.7, 23.65, 24.57, 21.73, 20.31, 26.52, 23.38, 23.56, 22.52, 22.36, 22.13, 21.19, 22.24, 22.11, 24.15, 20.78, 22.53, 22.24, 22.72, 23.28, 24.85, 20.11, 23.59, 22.54, 22.25, 23.28, 16.1, 27.93, 23.19, 21.5, 22.52, 22.38, 13.13, 28.99, 21.83, 21.82, 22.55, 15.19, 27.78, 20.58, 10.38, 22.24, 22.84, 14.92, 15.09, 32.32, 21.18, 11.02, 32.92, 17.06, 14.14, 18.27, 28.71, 17.15, 21.57, 20.9, 11.94, 29.27, 20.25, 9.36, 22.96, 18.54, 18.62, 20.39, 25.48, 21.72, 14.63, 22.8, 20.66, 19.15, 17.95, 21.46, 21.42, 17.74, 21.43, 19.3, 22.52, 16.14, 20.26, 21.93, 19.33, 22.54, 18.74, 20.49, 17.73, 19.12, 15.18, 19.05, 20.39, 18.64, 20.71, 22.96, 15.51, 18.95, 18.14, 20.18, 22.56, 11.7, 29.63, 18.4, 22.79, 18.46, 18.99, 19.29, 12.74, 22.11, 10.76, 19.27, 18.44, 16.94, 18.91, 19.06, 18.37, 20.34, 14.81, 22.29, 9.97, 17.93, 26.23, 18.03, 8.85, 26.12, 18.08, 9.4, 19.26, 17.14, 17.96, 15.82, 22.31, 16.08, 8.26, 23.51, 11.16, 23.77, 13.97, 9.88, 27.77, 10.47, 24.46, 11.21, 23.71, 9.61, 19.24, 15.56, 8.67, 16.79, 16.5, 16.6, 15.76, 17.82, 15.53, 15.83, 17.13, 9.47, 22.68, 15.89, 14.93, 16.28, 15.51, 15.35, 13.07, 16.88, 14.84, 15.63, 14.79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6.59, 9.28, 11.31, 9.16, 15.27, 14.11, 22.5, 22.12, 16.56, 30.92, 22.76, 24.15, 22.23, 24.94, 24.26, 25.88, 28.13, 26.93, 16.58, 40.31, 27.44, 26.7, 25.69, 26.45, 24.35, 15.45, 27.32, 33.7, 29.25, 14.58, 32.52, 45.27, 30.21, 30.59, 29.56, 29.57, 18.63, 37.61, 30.5, 29.89, 29.89, 28.43, 28.39, 30.45, 30.98, 33.21, 27.77, 31.75, 32.19, 30.81, 26.93, 30.02, 29.4, 29.83, 29.93, 30.43, 28.76, 33.74, 30.09, 29.76, 29.66, 32.71, 28.56, 32.37, 31.21, 29.83, 10.88 |
Elle est représentée ici.
Il semblerait que la différencier une fois suffise à la rendre stationnaire : https://github.com/Vayel/MPF/blob/master/data/views/differenced/8936.pdf
En considérant l'ACF et la PACF, je suis parti sur un modèle ARIMA(1, 1, 1). Dans le doute, j'en ai tracés plusieurs.
Le code est le suivant :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import statsmodels.api as sm def arma(data, p, d, q, start, end): model = sm.tsa.ARIMA(data, (p, d, q)).fit() fig, ax = plt.subplots() fig.suptitle('{}, {}, {}'.format(p, d, q)) ax.plot(data) ax = model.plot_predict(start, end, ax=ax, plot_insample=False) fig.savefig('./arma_({}, {}, {}).png'.format(p, d, q)) start = 10 end = 1700 arma(dta, 1, 0, 1, start, end) arma(dta, 2, 0, 1, start, end) arma(dta, 1, 1, 1, start, end) arma(dta, 0, 1, 1, start, end) arma(dta, 2, 1, 1, start, end) |
Deux choses me paraissent étranges :
- Le modèle correspond très bien avec les données mais à partir de la zone de prévision, ça devient n'importe quoi ;
- La prévision ne change quasiment pas avec les paramètres.
Malheureusement, je ne comprends pas d'où ça peut provenir.
Je me suis inspiré de ça.
Merci !
PS : plot_predict
+1
-0