Docsity

METODOS DE PREVISION, Apuntes de Métodos de Enseñanza

Vista previa parcial del texto

¡Descarga METODOS DE PREVISION y más Apuntes en PDF de Métodos de Enseñanza solo en Docsity!

Forecasting Methods

Session 6: ARIMA models

Luis Guirola Spring 2026

UB-AQR-IREA

Stationarity

Definition If {𝑦𝑡} is a stationary time series, then for all 𝑠, the distribution of (𝑦𝑡, … , 𝑦𝑡+𝑠) does not depend on 𝑡.

Defining Stationarity Formally

  1. Constant Mean: 𝐸[𝑦𝑡] = 𝜇 for all 𝑡
  2. Constant Variance:

𝑉 𝑎𝑟(𝑦𝑡) = 𝐸[(𝑦𝑡 − 𝜇)^2 ] = 𝜎^2 for all 𝑡

  1. Covariance depends only on lag 𝑘:

𝐶𝑜𝑣(𝑦𝑡, 𝑦𝑡−𝑘) = 𝛾𝑘 (Independent of 𝑡)

Can you tell which time series are stationary?

500 600700 Jan 2015 Apr 2015 Jul 2015 Day Oct 2015 Jan 2016

$US

(a) Google closing price 0

50 Jan 2015 Apr 2015 Jul 2015 Day Oct 2015 Jan 2016

$US

(b) Change in google price 40005000

6000

Number of strikes^1950 1960 Year^1970

(^) (c) Strikes: US

4060

80

Number of houses^ 1975 Jan1980 Jan1985 Jan1990 Jan1995 Jan Month

(^) (d) House sales: US

100200

300

$US (constant prices)^1900 1925 Year^1950

(e) Egg prices: US

4000080000

120000160000 Number of pigs 1980 Jan1990 Jan2000 Jan2010 Jan2020 Jan Month

(^) (f) Pigs slaughtered: Victoria, Australia

(^200000) 4000060000

80000

Number of lynx (^1860 1880) Year 1900 1920

(^) (g) Lynx trapped: Canada

400450

500550 Megalitres 1991 Q1 1992 Q1 1993 Q1 1994 Q1 1995 Q1 Quarter

(h) Beer production: Australia (^500) 100150

200250 Petajoules 1960 Q1 1980 Q1 Quarter 2000 Q

(i) Gas production: Australia

Stationarity

Definition If {𝑦𝑡} is a stationary time series, then for all 𝑠, the distribution of (𝑦𝑡, … , 𝑦𝑡+𝑠) does not depend on 𝑡.

Stationarity

Definition If {𝑦𝑡} is a stationary time series, then for all 𝑠, the distribution of (𝑦𝑡, … , 𝑦𝑡+𝑠) does not depend on 𝑡.

  • Transformations help to stabilize the variance.
  • For ARIMA modelling, we also need to stabilize the mean.

Example: Google stock price -overview of the dataset

google_2018 <- gafa_stock |> filter(Symbol == "GOOG", year(Date) == 2018) head(google_2018)

# A tsibble: 6 x 8 [!]

# Key: Symbol [1]

Symbol Date Open High Low Close Adj_Close Volume

1 GOOG 2018-01-02 1048. 1067. 1045. 1065 1065 1237600

2 GOOG 2018-01-03 1064. 1086. 1063. 1082. 1082. 1430200

3 GOOG 2018-01-04 1088 1094. 1084. 1086. 1086. 1004600

4 GOOG 2018-01-05 1094 1104. 1092 1102. 1102. 1279100

5 GOOG 2018-01-08 1102. 1111. 1102. 1107. 1107. 1047600

6 GOOG 2018-01-09 1109. 1111. 1101. 1106. 1106. 902500

Example: Google stock price

google_2018 |>autoplot(Close) +labs(y = "Closing stock price

1000

1100

1200

Jan 2018 Apr 2018 Jul 2018 Date [!] Oct 2018 Jan 2019

Closing stock price ($USD)

The series wanders without a fixed mean. This “random walk” behavior is a classic sign of non-stationarity. 9

Example: Google stock price

google_2018 |>autoplot(difference(Close)) +ggthemes::theme_tu labs(y = "Change in Google closing stock price ($USD)")

−

−

0

30

60

Jan 2018 Apr 2018 Jul 2018 Date [!] Oct 2018 Jan 2019

Change in Google closing stock price ($USD)

Observation: By computing the change (𝑦𝑡 − 𝑦𝑡−1), we remove the trend. The series now looks like random noise around zero (Stationary). 11

Example: Google stock price

google_2018 |> ACF(difference(Close)) |> autoplot()+ggthemes:

−0.

−0.

−0.

(^0 5 10) lag [1] 15 20

acf

Second-order differencing

Occasionally the differenced data will not appear stationary and it may be necessary to difference the data a second time:

Second-order differencing

Occasionally the differenced data will not appear stationary and it may be necessary to difference the data a second time:

𝑦″𝑡 = 𝑦′𝑡 − 𝑦𝑡−1′ = (𝑦𝑡 − 𝑦𝑡−1) − (𝑦𝑡−1 − 𝑦𝑡−2) = 𝑦𝑡 − 2𝑦𝑡−1 + 𝑦𝑡−2.

Seasonal differencing (YoY gorwth)

A seasonal difference is the difference between an

observation and the corresponding observation from the

previous year.

where 𝑚 = number of seasons.

Seasonal differencing (YoY gorwth)

A seasonal difference is the difference between an

observation and the corresponding observation from the

previous year.

where 𝑚 = number of seasons.

• For monthly data 𝑚 = 12.

• For quarterly data 𝑚 = 4.

• Seasonally differenced series will have 𝑇 − 𝑚 obs.