Fundamentos para Pronosticar Una Serie de Tiempo Estacionaria Con Información de Su Propio Pasado
Fundamentos para Pronosticar Una Serie de Tiempo Estacionaria Con Información de Su Propio Pasado
INTRODUCCIÓN
RESUMEN
Dado que el comportamiento del mercado es volátil, Los riesgos negativos que afectan a las organizaciones empre-
la presente investigación pretende coadyuvar a que sariales requieren ser gestionados, ello con el fin de planificar
inversionistas y organizaciones empresariales puedan respuestas que los eviten, transfieran, mitiguen o, de ser nece-
realizar pronósticos con certeza y, en consecuencia,
con el mínimo error posible, a fin de lograr el éxito en sario, los acepten. Lledó (2017) se interesa en cuantificar la pro-
la gestión de sus proyectos y operaciones. Elementos babilidad de ocurrencia (%) y el impacto ($) con el objetivo de
como la tasa de inflación, el tipo de cambio, el precio identificar los riesgos y jerarquizar la atención de los mismos.
de las acciones, los resultados económicos financieros, La preocupación recurrente de las organizaciones, según Berk
las ventas, entre otras variables, son preocupaciones
para los inversionistas. Estos instrumentos financieros, y DeMarzo (2008), surge cuando invierten en proyectos o ins-
por su estructura de datos, corresponden a las series trumentos financieros, como bonos y acciones, o cuando se ven
de tiempo, las cuales toman valores o realizaciones, afectadas por la inflación y el tipo de cambio, entre otras varia-
precisamente, a lo largo del tiempo y, a la vez, están bles, por lo cual es importante que los inversionistas y las orga-
espaciadas cronológicamente. El comportamiento
previo es utilizado para pronosticar el valor de la serie, nizaciones busquen estimar el futuro (Hanke y Wichern, 2010) y,
su rendimiento y volatilidad. Y ello debe considerar que a su vez, sean lo más certeros posible, con miras a planificar sus
pronosticar con las técnicas tradicionales tiene riesgos procedimientos. Esto considerando que un buen pronóstico ga-
de imprecisión, por lo que es necesario hacerlo con rantiza la continuidad de sus operaciones en este sistema volátil,
modelos econométricos por su robustez y precisión,
también conocidos como modelos univariados de series competitivo, cambiante y disruptivo.
de tiempo.
Por otra parte, Mun (2016) señala lo siguiente:
Palabras clave: series de tiempo; estacionariedad; raíz
unitaria; ruido blanco; varianza.
Pronosticar es el acto de predecir el futuro; ya sea en
base a en [sic] datos históricos o en una simple es-
peculación sobre el futuro, en caso de que los datos
no existan. Cuando se cuenta con datos históricos, es
recomendable hacer una aproximación estadística o
cuantitativa; mientras que, si se carece de estos datos,
el único recurso es un juicio de valor o un acercamien-
to cualitativo (p. 429).
Fundamentos para pronosticar una serie de tiempo estacionaria con información de su propio pasado
tef
20
18
16
14
12
10
2
2000 2002 2004 2006 2008 2010 2012 2014 2016 2018
Wilfredo Bazán
Fundamentos para pronosticar una serie de tiempo estacionaria con información de su propio pasado
la Bolsa de Valores, la renta de factores, los términos medias móviles), conocidos también como metodo-
de intercambio y el consumo privado―, las predic- logías Box-Jenkins; además, Box, Jenkins y Rein-
ciones serán útiles, porque sus resultados tendrán sel (2008) sostienen la necesidad de que las series
consistencia; en caso contrario, dichos resultados sean estables en el tiempo. La metodología indi-
no tendrían credibilidad y, por tanto, serían espurios. cada consiste en cuatro pasos: la identificación, la
Los autores agregan además que estimación, la validación y el pronóstico.
Las series son sometidas a esta veri- En la identificación, se verifica si la serie es estacio-
ficación mediante correlogramas y el naria con pruebas de raíz unitaria (RU) y si tiene rui-
test de raíz unitaria de Dickey-Fuller Au- do blanco o memoria para poder pronosticar. Dado
mentado. Para llevar a cabo esta tarea, que la serie de precios de cierre de las acciones de
los datos de las series son ajustados a TEF no es estacionaria, se tiene que diferenciarla
modelos autorregresivos (AR), de me- para estabilizarla. En la Figura 2, se puede apreciar
dia móvil (MA) y de caminata aleatoria o la serie estabilizada.
Random Walk, con el propósito de simu-
lar, por ejemplo, condiciones de no esta- Esta investigación tiene por objetivo pronosticar
cionariedad que luego son confirmadas series de tiempo univariadas a partir de su propio
por los distintos indicadores obtenidos comportamiento pasado, para lo cual se necesi-
en esta evaluación. Finalmente, en caso ta estabilizar, vale decir, convertir en estaciona-
de encontrar series no estacionarias, se rias tanto a la media como a la varianza, a fin de
propone eliminar esta condición con pro- que puedan ser modeladas con las metodologías
cesos de diferenciación (s/p). de Box y Jenkins. Tomando el caso específico de
TEF, este estudio busca determinar cómo influye la
Este tipo de series, como las producidas por las va- diferenciación en el rendimiento constante de sus
riables financieras de la TEF, no pueden ser mode- acciones, resolviendo, para este propósito, cómo
ladas con las técnicas de pronóstico tradicionales, influye la diferenciación del precio de cierre en el
sino con modelos de series de tiempo univariados rendimiento constante de sus acciones, en su vola-
o ARIMA (modelos autorregresivos integrados de tilidad constante y en su autocorrelación.
RTEF01
.20
.15
.10
.05
.00
-.05
-.10
-.15
-.20
2000 2002 2004 2006 2008 2010 2012 2014 2016 2018
Figura 2. Estabilización de la media y la varianza de las diferencias de los retornos de TEF.
Fuente: Elaboración propia.
Wilfredo Bazán
Fundamentos para pronosticar una serie de tiempo estacionaria con información de su propio pasado
este modelo, se presentan los siguientes pasos a valores críticos de MacKinnon. Se dice que una se-
través de escenarios de ensayo y error: rie presenta RU si algunos de los valores críticos
en valores absolutos de MacKinnon son mayores
0. Evaluación de la estacionariedad que el estadístico de la prueba DFA en valores ab-
solutos. En este caso, el valor de la DFA es igual
1. Identificación
a |42.39815|, por lo que es mayor que cualquiera
2. Estimación de los valores críticos, al 1% = |2.565457|, 5% =
|1.940892| y 10% = |1.616654|, lo que significa que
3. Validación la serie no presenta raíz unitaria y, por tanto, es una
serie estacionaria. Los resultados se muestran en
4. Pronóstico la Figura 3 y se comprueba con la primera diferen-
cia que la serie es estacionaria.
Interpretación 1
Interpretación 2
De acuerdo a la Figura 2, se buscó comprobar
que la serie diferenciada fuera estacionaria, para Dentro de la fase de identificación, además de la
esto, se realizó la prueba de RU con la prueba de comprobación de que la serie sea estacionaria,
Dickey-Fuller Aumentada (DFA). En este caso, el se verificó que la serie no tuviera ruido blanco,
objetivo fue rechazar la hipótesis nula, vale decir, es decir, que tenga memoria. Este es un proceso
que la serie tuviera al menos una raíz unitaria. Las aleatorio, ya que su media es igual a cero, su va-
pruebas indicaron la no presencia de raíz unitaria, rianza es constante y la autocovarianza es igual a
según la comparación entre el estadístico de la cero; con este proceso que no tiene memoria no
prueba de Dickey-Fuller Aumentada y los distintos podría pronosticarse una serie de tiempo con la
Wilfredo Bazán
metodología Box-Jenkins o ARIMA, sino con proce- Validación de ruido blanco (PH)
sos estocásticos, como el movimiento geométrico
browniano (MGB) o con los modelos de la familia Estadístico Q-prueba conjunta:
ARCH-GARCH. Cuando una serie tiene memoria,
H0: 𝜌1 = 𝜌2 = 𝜌3 = ⋯ = 𝜌𝑘 = 0; ruido blanco
se usará su pasado para pronosticar la serie.
H1: ∃𝜌𝑖 ≠ 0; 𝑖 = 1,…, k; la serie no es ruido blanco
{Ɛ𝑡𝑡 }𝑇𝑇𝑡𝑡=1 → es un proceso ruido blanco si
Estadístico LB, pero para muestras pequeñas
(𝜀𝜀𝑡𝑡) = 0, ∀𝑡𝑡 (Ec. 7) Ljung-Box:
𝑟𝑟𝑖𝑖2
𝐸𝐸(Ɛ2𝑡𝑡 ) = 𝑉𝑉(Ɛ𝑡𝑡 ) = 2Ɛ , ∀𝑡𝑡 (Ec. 8) LB = 𝑄𝑄𝑘𝑘 = 𝑛𝑛(𝑛𝑛 + 2) ∑𝑘𝑘𝑖𝑖=1 (Ec. 10)
𝑛𝑛−1
𝐸𝐸(Ɛ𝑡𝑡 , Ɛ𝑡𝑡+τ ) = τ = 0, ∀𝑡𝑡, τ ǂ 0 (Ec. 9) El objetivo fue rechazar la hipótesis nula (H0), que sig-
nifica ruido blanco, si no se rechaza H0, no se podría
pronosticar con la metodología Box-Jenkins. Bello
Es este caso, se buscó validar que la serie tuviera (2018) agrega que una serie se considera ruido blan-
memoria con correlogramas, el estadístico Ljung- co si los p-valores son mayores que el nivel de signifi-
Box y el p-valor, tal como se aprecia en los resulta- cancia de la prueba y que, en la práctica, siempre que
dos contenidos en la Figura 4. no sean los primeros rezagos, se permite que sea
Fundamentos para pronosticar una serie de tiempo estacionaria con información de su propio pasado
mayor el p-valores en uno de cada 20 rezagos para como se ve en la Figura 6, que el comportamiento
considerar la serie ruido blanco, tal como se dio en de los residuos constituye ruido blanco, porque su
el primer rezago. En este caso, no se rechaza la hi- p-valor es mayor al 5% y, por tanto, pueden pronos-
pótesis nula, pues la varianza no es homocedástica ticarse por los modelos ARCH-GARCH, que, a decir
o constante. de Mansilla (2 de abril de 2020), junto a los modelos
ARIMA de Box y Jenkins, son de la misma familia.
Interpretación 3
Wilfredo Bazán
Sin embargo, la varianza no es homocedástica, H1: Las medias de los periodos 2005-2006 y 2007-
precisamente porque hubo lapsos de alta volatili- 2008 no son iguales.
dad en los retornos y ya no podrían ser modelados
con la metodología Box-Jenkins, sino con los mo- Nivel de significancia
delos de la familia ARCH-GARCH. En la Tabla 1, Nivel de significancia (alfa) a = 5% o 0.05.
se muestran los resultados de la comparación de
medias y la prueba de Levene para la igualdad de Estadístico de prueba
varianzas.
Prueba t para 2 muestras independientes.
A continuación, se presentan las siguientes prue- Valor de P
bas estadísticas llevadas a cabo.
0.0000%.
1. Prueba de hipótesis para la igualdad de
medias La prueba demuestra una significancia bilateral de
0.828 > 0.05, por lo tanto, no se rechaza la hipóte-
H0: Las medias de los periodos 2005-2006 y 2007- sis de igualdad de medias y se acepta la hipótesis
2008 son iguales. nula de que existe igualdad de medias.
Fundamentos para pronosticar una serie de tiempo estacionaria con información de su propio pasado
Prueba de
Levene de
Prueba t para la igualdad de medias
igualdad de
varianzas
Se
asumen
80.291 0.000 0.217 1042 0.828 0.00019580271 0.00090108264 -0.00157234060 0.00196394602
varianzas
iguales
Retorno
No se
asumen
0.217 742.929 0.828 0.00019580271 0.00090108264 -0.00157316870 0.00196477411
varianzas
iguales
Las medias de los grupos a comparar no son diferentes. Las varianzas de los grupos a comparar no son ho-
mocedásticas o no son diferentes.
Interpretación
Interpretación
Las medias de los 2 grupos son constantes.
Las varianzas de los 2 grupos son heterocedásticas
2. Prueba de hipótesis para la igualdad de o son diferentes.
varianza
CONCLUSIONES
H0: Las varianzas de los periodos 2005-2006 y 2007-
2008 son homocedásticas o no son diferentes. 1. La serie original del precio de cierre de las ac-
ciones de TEF presenta tendencia y, para re-
H1: Las varianzas de los periodos 2005-2006 y moverla, fue necesario diferenciarla con el fin
2007-2008 son heterocedásticas o son diferentes. de volverla estacionaria, condición necesaria
para que, con la metodología Box-Jenkins, el
Nivel de significancia pronóstico sea estable a lo largo del periodo,
pues es necesario que tanto el primer como el
Nivel de significancia (alfa) a = 5% o 0.05. segundo momento de la estadística sean inva-
riantes, para lo cual se realizó la prueba de raíz
Estadístico de prueba unitaria (RU).
Wilfredo Bazán
3. Empero, los residuos sí tienen ruido blanco, es [10] Larios-Meoño, J., González-Taranco, C. y
por ello que podrían modelarse según los mo- Álvarez, V. (2016). Investigación en economía
delos de la familia ARCH-GARCH, dado que su y negocios. Metodología con aplicaciones en
varianza es heterocedástica. E-views. Lima, Perú: Fondo Editorial de la
Universidad San Ignacio de Loyola.
REFERENCIAS BIBLIOGRÁFICAS [11] Lledó, P. (2017). Director de proyectos. Cómo
aprobar el examen PMP® sin morir en el intento.
[1] Álvarez-Pallete, J. (14 de mayo de 2018). [Carta Estados Unidos: Pablo Lledó.
a nuestros accionistas: El ilusionante reto de
reinventar Telefónica]. Copia en posesión de [12] Mansilla, F. (2 de abril del 2020). Modelos de
volatilidad condicional con EViews. [Apuntes de
Wilfredo Bazán Ramírez.
clase]. Recuperado de [Link]
[2] Bello, M. (2018). Modelos econométricos con [Link]/formacion/formacion-info/5391.
EViews: Modelos de regresión lineal y series
[13] Meléndez, J. (2017). Entrenamiento
de tiempo. [Apuntes de clase]. Recuperado
especializado en modelos econométricos
de [Link] de series de tiempo en EViews [Apuntes de
formacion-info/4404. clase]. Recuperado de [Link]
[3] Berk, J. y DeMarzo, P. (2008). Finanzas com/formacion/formacion-info/2979.
Corporativas. México D. F., México: Pearson [14] Mun, J. (2016). Modelación de riesgos.
Educación. Aplicación de la simulación de Monte Carlo,
[4] Box, G., Jenkins, G. y Reinsel, G. (2008) Time análisis de opciones reales, pronóstico
Series Analysis: Forecasting and Control. estocástico, optimización de portafolio, análisis
Nueva York, Estados Unidos: Wiley. de datos, inteligencia de negocios y modelación
de decisiones (2 volúmenes). California,
[5] Court, E. y Rengifo, E. (2011). Estadísticas Estados Unidos: IIPER Press.
y Econometría Financiera. Buenos Aires,
[15] Newbold, P., Carlson, W. y Thorne, B. (2008).
Argentina: Cengage Learning Argentina.
Estadística para Administración y Economía.
[6] Gujarati, D. y Porter, D. (2010). Econometría. Madrid, España: Pearson Educación.
México D. F., México: McGraw-Hill. [16] Ramón, N. y López, J. (2016). Econometría.
[7] Hanke, J. y Wichern, D. (2010). Pronósticos en Series temporales y modelos de ecuaciones
los negocios. México D. F., México: Pearson simultáneas. Elche, España: Universidad
Educación. Miguel Hernández.
[8] Herrera, J. (2013). Modelo estocástico a [17] Telefónica (2018). Presencia en bolsas.
partir de razonamiento basado en casos Telefónica. Recuperado de [Link]
para la generación de series temporales. [Link]/es/web/shareholders-investors/
(Tesis doctoral). Universidad Nacional de la_accion/presencia-en-bolsas.
San Agustín de Arequipa, Perú. Recuperado [18] Villalba, F. y Flores-Ortega, M. (2014). Análisis
de [Link] de la volatilidad del índice principal del mercado
bitstream/20.500.12390/346/6/2013_Herrera_ bursátil mexicano, del índice de riesgo país y de
[Link]. la mezcla mexicana de exportación mediante un
modelo GARCH trivariado asimétrico. Revista
[9] Hossain, A., Kamruzzaman, M. y Ali, A. (2015).
de Métodos Cuantitativos para la Economía y
ARIMA with GARCH Family Modeling and la Empresa, 17, 3-22. Recuperado de https://
Projection on Share Volume of DSE. Economics [Link]/revistas/[Link]/RevMetCuant/
World, 3(7-8), 171-184. article/view/2191.
Basics forIndustrial
Revista ForecastingData
a Stationary
23(1):T207-228
ime Series Using Information from Its Past
(2020) ISSN: 1560-9146 (Impreso) / ISSN: 1810-9993 (Electrónico)
DOI: [Link] Facultad de Ingeniería Industrial - UNMSM
INTRODUCTION
ABSTRACT
Since market behavior is volatile, this research intends to Negative risks affecting business organizations need to be man-
help investors and business organizations make forecasts aged in order to plan responses that avoid, transfer, mitigate or,
with certainty and, as a consequence, with the least if necessary, accept them. Lledó (2017) is interested in quanti-
possible error in order to succeed in the management of
their projects and operations. Elements such as inflation fying the probability of occurrence (%) and impact ($) in order
rate, exchange rate, stock prices, economic and financial to identify risks and prioritize them. According to Berk and De-
results, sales, among other variables, are causes of Marzo (2008), the recurrent concern of business organizations
concern for investors. Due to their data structure, these arises when they invest in projects or financial instruments, such
financial instruments correspond to time series, which
take values or realizations along time and are spaced as bonds and shares, or when they are affected by inflation and
over time. The previous behavior of the series is used exchange rate, among other variables. Thus, it is important that
to forecast its value, return and volatility. It must be investors and business organizations aim to estimate the future
taken into consideration that forecasting using traditional (Hanke & Wichern, 2010) and, in turn, be as accurate as possi-
techniques might result in imprecisions, so it is necessary
to forecast using econometric models because of their ble, focusing on planning their procedures and considering that a
robustness and precision. These are also known as good forecast guarantees the continuity of their operations in this
univariate time series models. volatile, competitive, changing and disruptive system.
Keywords: time series; stationarity; unit root; white
noise; variance. Moreover, Mun (2016) notes the following:
1 Master in Finance and Industrial Engineering from the Universidad Nacional Federico Villareal
(Lima, Peru). Currently working as analyst for Telefónica del Perú S. A. and professor on a
contract basis at the Agro-Industrial Engineering Academic Program of the Industrial and
Systems Engineering School of the Universidad Nacional Federico Villarreal. Certified in PMP
and CQRM. (Lima, Peru).
ORCID: [Link]
E-mail: wbazan@[Link]
Wilfredo Bazán
14, 2018) in a letter to shareholders, is a technolo- Time series analysis involves methods that
gy company whose vision and great foundation are help interpret this type of data, extracting
recognized by financial analysts. In line with this, representative information regarding their
the adjusted closing prices of TEF shares listed on origins or underlying relationships and the
the New York Stock Exchange (NYSE) were con- possibility of extrapolating and predicting
sidered, and the behavior of the closing price from their future behavior] (p. 12).
January 2, 2000 to August 1, 2018 was analyzed.
The point here is that the closing price of TEF takes In Figure 1, the closing prices behavior of TEF
a value or realization over a time horizon, so that shares is shown at levels and it has not yet been
in financial terms it is considered a sample of time converted into a stationary series. Considering the
series. These, in the words of Ramón and López components of a time series, this series presents a
(2016), are defined as trend and has a volatile or irregular behavior. It is
worth adding, following Gujarati and Porter (2010),
“[…] una secuencia de datos, observa- that when a time series is non-stationary, the mean,
ciones o valores, medidos en determi- the variance, or both, are variable in time.
nados momentos del tiempo, ordenados
cronológicamente y, normalmente, espa- Components of a time series
ciados entre sí de manera uniforme. El
análisis de series temporales comprende Newbold, Carlson and Thorne (2008) state that time
métodos que ayudan a interpretar este series have four components: a trend component,
tipo de datos, extrayendo información rep- a seasonal component, a cyclical component and
resentativa, tanto referente a los orígenes an irregular component. When the irregular compo-
o relaciones subyacentes como a la posi- nent is presented, time series follow a random path
bilidad de extrapolar y predecir su com- and, as Gujarati and Porter (2010) have pointed
portamiento futuro (p. 12).” [a sequence out, so do stock prices or financial instruments (e.g.
of data, observations or values, measured shares or exchange rates). If an original time series
at particular moments in time, chronologi- is non-stationary, its behavior could only be studied
cally arranged and usually evenly spaced. during a period in consideration.
tef
20
18
16
14
12
10
2
2000 2002 2004 2006 2008 2010 2012 2014 2016 2018
Basics for Forecasting a Stationary Time Series Using Information from Its Past
Each set of time series data will therefore conjunta y sus funciones de distribución
be for a particular episode. As a conse- marginales. Habitualmente, conocer
quence, it is not possible to generalize it to esas funciones de distribución resulta
other time periods. Therefore, for the pur- complejo de forma que, para caracterizar
pose of forecasting, such (nonstationary) un proceso estocástico, basta con espe-
time series may be of little practical value. cificar la media y la varianza para cada yt
(p. 741) y la covarianza para variables referidas
a los distintos valores de t” [Each Yt var-
Thus, the initial series must become stationary. iable that makes up a stochastic process
However, before continuing, it is important to define will have its own distribution function with
some concepts. its corresponding moments. Moreover,
each set of variables will have its corre-
Stochastic processes and stationarity sponding joint distribution function and
The stochastic process is described as its marginal distribution functions. Usu-
ally, knowing these distribution functions
“[…] una secuencia de números aleato- is complex, so in order to characterize a
rios. El proceso estocástico se escribirá stochastic process, it is enough to speci-
como {yi} para i = 1, 2… Si este índice fy the mean and variance for each yt and
representa tiempo, el proceso estocástico the covariance for variables referred to
se llamará serie de tiempo. Si se asigna the different values of t]:
un posible valor de y por cada i se estará
construyendo una posible realización del 𝑡𝑡 = 𝐸𝐸(𝑦𝑦𝑡𝑡 ) (Eq. 1)
proceso estocástico” [a sequence of ran-
dom numbers. The stochastic process will 2
be represented as yi} (i = 1, 2...); if this 0 = 𝑉𝑉𝑉𝑉𝑉𝑉(𝑦𝑦𝑡𝑡 ) = 𝐸𝐸 [(𝑦𝑦𝑡𝑡 − 𝑡𝑡 ) ] (Eq. 2)
index represents time, the stochastic pro-
cess will be called a time series. If a pos- = 𝐶𝐶𝐶𝐶𝐶𝐶(𝑦𝑦𝑡𝑡 , 𝑦𝑦𝑠𝑠 ) = 𝐸𝐸[(𝑦𝑦𝑡𝑡 − )(𝑦𝑦𝑠𝑠 − )] (Eq. 3) (p. 63)
𝑡𝑡,𝑠𝑠 𝑡𝑡 𝑠𝑠
sible value is assigned to y for each i, a
possible realization of the stochastic pro-
cess will be constructed (Court & Rengifo, These authors identify two types of stationarity:
2011, p. 400)]. strong stationary stochastic process and weak sta-
tionary stochastic process. In the first process, the
Herrera (2013) has questioned the use of tradition- four moments of the joint distributions are constant
al models using linear approximations, considering or invariant to a change in time. In the second, only
them not very efficient and of limited applicability; the first two moments, the expected value and the
therefore, he highlights the use of the stochastic variance of the random variables, are constant and
process model, which makes it possible to more not time-dependent, while the covariances between
ably derive time series to identify hidden data de- two random variables of different periods depend
tails. On the other hand, Ramón and López (2016) only on the time elapsed between them.
point out that “un proceso estocástico es un con-
cepto matemático que sirve para caracterizar una When analyzing the volatility behavior of the Price
sucesión de variables aleatorias (Yt) que evolu- and Quotation Index (IPC) of the Mexican stock
cionan en función de otra variable, generalmente market, with the purpose of estimating the trend of
el tiempo” [a stochastic process is a mathematical its stock prices, Villalba and Flores-Ortega (2014)
concept that serves to characterize a succession of verified the importance of the stationarity in said se-
random variables (Yt) that evolve depending on an- ries. These were transformed applying logarithmic
other variable, generally, time] (p. 63). According to differentiation to convert them into continuous and
these authors, each variable of the process is ran- stationary returns.
dom and may or may not be related to each other.
Hossain, Kamruzzaman and Ali (2015) explored a
“Cada una de las variables Yt que con- suitable statistical model to resolve the future esti-
figuran un proceso estocástico tendrá su mation of stock volume by using daily stock volume
propia función de distribución con sus data from the Dhaka Stock Exchange (DSE); for
correspondientes momentos. Asimismo, this, the time series chart was used to explore the
cada conjunto de variables tendrá su data. However, the time series plot transgressed
correspondiente función de distribución the original trend and the irregular variation in the
Wilfredo Bazán
data series could not be removed. Subsequently, con el propósito de simular, por ejemplo,
the series were differentiated by showing the mean condiciones de no estacionariedad que
was constant, but not the variance. To demonstrate luego son confirmadas por los distintos
the stationary condition of the series, the Augment- indicadores obtenidos en esta evaluación.
ed Dickey-Fuller (ADF) test was used, which was Finalmente, en caso de encontrar series
significant at 5%. Therefore, the data series at lev- no estacionarias, se propone eliminar
els are non-stationary at first; however, after differ- esta condición con procesos de diferen-
entiating them and according to the ADF test for unit ciación.” [The series are verified by using
root, it is found that the series are stationary. correlograms and the Augmented Dick-
ey-Fuller unit root test. For this, the series
Larios-Meoño, González-Taranco and Álvarez data are adjusted to autoregressive (AR),
(2016) refer to the stationarity of time series, and moving average (MA) and random walk
after verifying their presence in economic and finan- models, with the purpose of simulating,
cial variables frequently used in Peru–such as the for example, non-stationary conditions
General Index of the Lima Stock Exchange, prima- that are later confirmed by the indicators
ry income account, terms of trade and private con- obtained in this evaluation. Finally, in case
sumption–they conclude that forecasting would be of finding non-stationary series, it is pro-
useful, because the results will have consistency; posed to eliminate this condition with dif-
otherwise, such results would not have credibility ferentiation processes.]
and, therefore, would be spurious. The authors also
add that This type of series, such as those produced by
TEF financial variables, cannot be modelled with
“Las series son sometidas a esta verifi- traditional forecasting techniques, but with univar-
cación mediante correlogramas y el test iate time series models or ARIMA (autoregressive
de raíz unitaria de Dickey-Fuller Aumenta- integrated moving average model), also known as
do. Para llevar a cabo esta tarea, los datos Box-Jenkins methods; furthermore, Box, Jenkins
de las series son ajustados a modelos au- and Reinsel (2008) argue that the series need to be
torregresivos (AR), de media móvil (MA) stable over time. This method consists of four steps:
y de caminata aleatoria o Random Walk, identification, estimation, validation and prediction.
RTEF01
.20
.15
.10
.05
.00
-.05
-.10
-.15
-.20
2000 2002 2004 2006 2008 2010 2012 2014 2016 2018
Figure 2. Stabilization of the mean and variance of the differences in TEF returns
Source: Prepared by the author.
Basics for Forecasting a Stationary Time Series Using Information from Its Past
This analysis aims to explain the behavior of a time σ2𝑥𝑥𝑡𝑡 = 2σ2𝑥𝑥𝑡𝑡−1 + 2Ɛ → σ2𝑥𝑥𝑡𝑡 − 2σ2𝑥𝑥𝑡𝑡 = 2Ɛ → σ2𝑥𝑥𝑡𝑡 (1 − 2) = 2Ɛ (Eq. 5)
series by stabilizing its mean and its variance in or-
der to forecast the returns and daily volatility of the 2Ɛ
adjusted closing prices of Telefónica de España S. σ2𝑥𝑥𝑡𝑡 = (Eq. 6)
(1−2)
A. (TEF) shares on the New York Stock Exchange
(NYSE). If α = 1, the process is not stationary (unit root).
The unit of analysis are TEF shares. The population If α > 1, the process is explosive.
is represented by the stock exchange listings where
TEF lists its shares, which can be found on its web- If α < 1, the process is stationary.
site ([Link]
ers-investors/la_accion/presencia-en-bolsas). Ac- Then, the Augmented Dickey-Fuller (ADF) unit root
cording to Telefónica (2018), the company is present test was performed; according to Bello (2018), it is
on the following listings: Buenos Aires, Lima, Lon- one of the most used. About this test, it is added
don, Madrid and New York. The sample size covers that “at the formal level, stationarity can be checked
by finding out if the time series contains a unit root.”
TEF shares between January 3, 2000 and August
(Gujarati & Porter, 2010, p. 768), and, in this case:
1, 2018, taken from NYSE from the website https://
[Link]/quote/TEF/history?p=TEF. H0: 𝜙 = 0; x𝑡 has unit root (at least one) → x𝑡 is a
non-stationary series.
When selecting the sample, access to all the data
was difficult, but scientific research recommends the H1: 𝜙 < 0; x𝑡 has no unit root → x𝑡 is a stationary se-
largest number of data. In this case, the research ries. The series is I(0).
considered 4848 observations of daily closing pric-
es of shares between January 3, 2000 and August I(d), expresses the number of times a time series
1, 2018, obtaining: must be differentiated to become stationary.
Wilfredo Bazán
RESULTS Interpretation 1
The results using ARIMA or Box-Jenkins method- According to Figure 2, an attempt was made to
ology are shown below. This methodology, formal- verify that the differentiated series was stationary;
ized by George Box and Gwilym Jenkins in 1976, therefore, the UR test was performed with the Aug-
is based on the fact that the time series they try to mented Dickey-Fuller (ADF) test. In this case, the
forecast are supported by the stochastic processes objective was to reject the null hypothesis, which is
that the series had at least one unit root. The tests
characterized through a model. Meléndez (2017)
indicated the absence of unit roots, according to the
argues that, when attempting to predict with this
comparison between the Augmented Dickey-Fuller
model, the following steps are presented through
test statistic and the different MacKinnon critical val-
trial and error scenarios: ues. A series is said to have UR if some of the criti-
cal values in absolute MacKinnon values are great-
0. Evaluation of stationarity
er than the ADF test statistic in absolute values. In
1. Identification this case, the value of ADF test is |42.39815|, so it
is greater than any of the critical values, at 1% =
2. Estimation |2.565457|, 5% = |1.940892| and 10% = |1.616654|,
which means that the series does not have unit
3. Validation roots and, therefore, is a stationary series. The re-
sults are shown in Figure 3 and the first difference
4. Forecast shows that the series is stationary.
Basics for Forecasting a Stationary Time Series Using Information from Its Past
Wilfredo Bazán
long as they are not the first lags, the p-values are white noise because its p-value is greater than 5%
allowed to be greater in one of every 20 lags to con- and, therefore, can be forecasted by the ARCH-
sider the series to be white noise, as was the case GARCH models, which, according to Mansilla (April
in the first lag. In this case, the null hypothesis is not 2, 2020), together with the ARIMA models of Box
rejected, since the variance is not homoscedastic and Jenkins, belong to the same family.
or constant.
DISCUSSION
Interpretation 3
To forecast the return and volatility of TEF financial
From the same results in Figure 4, it was found that
series with the Box-Jenkins methodology, it is nec-
autocovariance is neither constant nor invariant in
time; in other words, the series does not depend on essary to differentiate its closing price at time t with
its past. The autocovariances between the value of its immediate previous period (t-1) to stabilize or
a series and its own lag do not depend on the time make constant both the first and second moments
distance that separates them; to correct it, the mod- (mean and variance). It can be seen that the se-
el was centered to determine if the residuals or er- ries is stationary during the time between January
rors have white noise with the equation dlog(tef01) 3, 2000 and August 1, 2018, which means that its
C AR(10) MA(2) MA(3), whose results can be found mean is constant and it is proved by taking 522 re-
in Figure 5 and show that the coefficients are signif- turns from the period between 2005-2006, a time in
icant as they are below 5%. which there was low volatility compared to another
522 observations from the period between 2007-
These models need the residuals to be white noise, 2008, in which there was high volatility. However,
so a diagnosis of the residuals was made based on the variance is not homoscedastic, because there
its correlogram; as shown in Figure 6, it was veri- were periods of high volatility in the returns and they
fied, that the behavior of the residuals constitutes could no longer be modeled with the Box-Jenkins
Basics for Forecasting a Stationary Time Series Using Information from Its Past
The statistical tests that have been carried out are 0.0000%.
shown below.
The test shows a two-tailed significance of 0.828 >
1. Hypothesis Testing for Equality of Means 0.05; therefore, the hypothesis of equality of means
is not rejected and the null hypothesis of equality of
H0: The means for periods 2005-2006 and 2007- means is accepted.
2008 are the same.
Decision making
H1: The means for periods 2005-2006 and 2007- The means of the groups to be compared are not
2008 are not the same. different.
Significance level Interpretation
Significance level (alpha) a = 5% or 0.05. The means of the two groups are constant.
Wilfredo Bazán
Table 1. Test for Equality of Means and Levene’s Test for Equality of Variances.
Levene’s Test
for Equality of t-test for Equality of Means
Variances
Equal
variances 80.291 0.000 0.217 1042 0.828 0.00019580271 0.00090108264 -0.00157234060 0.00196394602
assumed
Return
Equal
variances
0.217 742.929 0.828 0.00019580271 0.00090108264 -0.00157316870 0.00196477411
not
assumed
H0: The variances of periods 2005-2006 and 2007- 1. The original closing price series of TEF shares
2008 are homoscedastic or not different. shows a trend, which had to be removed by
differentiation to make it stationary. The lat-
H1: The variances of periods 2005-2006 and 2007- ter is a necessary condition so that, with the
2008 are heteroscedastic or different. Box-Jenkins methodology, the forecast is stable
throughout the period, since it is necessary that
Significance level
both the first and the second moment of the sta-
Significance level (alpha) a = 5% or 0.05. tistic are invariant, for which the unit root (UR)
test was performed.
Test statistic
2. Using correlograms, the Ljung-Box statistic and
Levene’s Test. the p-value, an attempt was made to validate:
1) the variable rtef01, which is the calculation of
P-value the logarithmic difference of the original series
and 2) that the series has memory; but it was
0.0000%. concluded that it is not homoscedastic or, in oth-
er words, its variance is not constant over time,
P-value reading: With 0.000 probability of error, the
so it cannot be predicted with the Box-Jenkins
variances of the groups to be compared are hetero-
methodology.
scedastic or different.
3. However, the residuals are white noise, which
Decision making
is why it could be modelled according to the
The variances of the groups to be compared are not ARCH-GARCH family models, since its vari-
homoscedastic or not different. ance is heteroscedastic.
Interpretation REFERENCES
The variances of the 2 groups are heteroscedastic [1] Álvarez-Pallete, J. (May 14, 2018). [Carta a
or different. nuestros accionistas: El ilusionante reto de
Basics for Forecasting a Stationary Time Series Using Information from Its Past
reinventar Telefónica]. Copy in possession of [11] Lledó, P. (2017). Director de proyectos. Cómo
Wilfredo Bazán Ramírez. aprobar el examen PMP® sin morir en el intento.
United States: Pablo Lledó.
[2] Bello, M. (2018). Modelos econométricos con
EViews: Modelos de regresión lineal y series [12] Mansilla, F. (April 2, 2020). Modelos de
de tiempo. [Lecture notes]. Retrieved from volatilidad condicional con EViews. [Lecture
[Link] notes]. Retrieved from [Link]
formacion-info/4404. [Link]/formacion/formacion-info/5391.
[3] Berk, J. & DeMarzo, P. (2008). Finanzas [13] Meléndez, J. (2017). Entrenamiento
Corporativas. México D. F., Mexico: Pearson especializado en modelos econométricos de
Educación. series de tiempo en EViews [Lecture notes].
Retrieved from [Link]
[4] Box, G., Jenkins, G. & Reinsel, G. (2008) Time
formacion/formacion-info/2979.
Series Analysis: Forecasting and Control. New
York, United States: Wiley. [14] Mun, J. (2016). Modelación de riesgos.
Aplicación de la simulación de Monte Carlo,
[5] Court, E. & Rengifo, E. (2011). Estadísticas
análisis de opciones reales, pronóstico
y Econometría Financiera. Buenos Aires,
estocástico, optimización de portafolio, análisis
Argentina: Cengage Learning Argentina.
de datos, inteligencia de negocios y modelación
[6] Gujarati, D. & Porter, D. (2010). Econometría. de decisiones (2 volúmenes). California, United
México D. F., Mexico: McGraw-Hill. States: IIPER Press.
[7] Hanke, J. & Wichern, D. (2010). Pronósticos en [15] Newbold, P., Carlson, W. & Thorne, B. (2008).
los negocios. México D. F., Mexico: Pearson Estadística para Administración y Economía.
Educación. Madrid, Spain: Pearson Educación.
[8] Herrera, J. (2013). Modelo estocástico a [16] Ramón, N. & López, J. (2016). Econometría.
partir de razonamiento basado en casos Series temporales y modelos de ecuaciones
para la generación de series temporales. simultáneas. Elche, Spain: Universidad Miguel
(Doctoral thesis). Universidad Nacional de Hernández.
San Agustín de Arequipa, Peru. Retrieved
[17] Telefónica (2018). Presencia en bolsas.
from [Link]
Telefónica. Retrieved from [Link]
bitstream/20.500.12390/346/6/2013_Herrera_
[Link]/es/web/shareholders-investors/
[Link].
la_accion/presencia-en-bolsas.
[9] Hossain, A., Kamruzzaman, M. & Ali, A. (2015).
[18] Villalba, F. & Flores-Ortega, M. (2014). Análisis
ARIMA with GARCH Family Modeling and
de la volatilidad del índice principal del mercado
Projection on Share Volume of DSE. Economics
bursátil mexicano, del índice de riesgo país y de
World, 3(7-8), 171-184.
la mezcla mexicana de exportación mediante un
[10] Larios-Meoño, J., González-Taranco, C. & modelo GARCH trivariado asimétrico. Revista
Álvarez, V. (2016). Investigación en economía de Métodos Cuantitativos para la Economía y
y negocios. Metodología con aplicaciones en la Empresa, 17, 3-22. Retrieved from https://
E-views. Lima, Peru: Fondo Editorial de la [Link]/revistas/[Link]/RevMetCuant/
Universidad San Ignacio de Loyola. article/view/2191.