Econometría 2: Análisis de series de Tiempo

Transcripción

Econometría 2: Análisis de series de Tiempo
Econometrı́a 2: Análisis de series de Tiempo
Karoll GOMEZ
[email protected]
http://karollgomez.wordpress.com
Primer semestre 2016
I. Introduction
Modelos de series de tiempo
Content:
1. General overview
2. Times-Series vs Cross-section data
3. Time series components
4. How to deal with trend and seasonal components?
5. Stationarity concept
Modelos de series de tiempo
Introduction: Definition
I. Overview:
I
A time series is a set of observations Xt (or denoted by Yt ),
each one being recorded at a specific time t with 0 < t < T .
I
Time series analysis refers to the branch of statistic where
observation are collected sequentially in time, usually but no
necessarily at equally spaced time points.
Modelos de series de tiempo
Introduction: Data
Modelos de series de tiempo
Introduction: Data
Modelos de series de tiempo
Introduction: Goals
Modelos de series de tiempo
Introduction: The importance of forecasting
Modelos de series de tiempo
Introduction: Times-Series in Economics
Macro vs Financial Time series
I
Macro limited by small number of observations available over
long horizon. A typical data set has at best 20 years of
monthly or 40 years of quarterly data, which sum up to less
than 300 observations. This allows us to study linear relations
between variables or model means.
I
Macro Time series mostly focuses on means
I
Financial data usually high-frequency over short period of
time. This allows us to model volatility and higher moments.
Examples: stock prices.
I
Financial data mostly focuses on variances and higher
moments.
Modelos de series de tiempo
Introduction: Examples
Modelos de series de tiempo
Introduction: Examples
Modelos de series de tiempo
Introduction: Examples
Modelos de series de tiempo
Introduction: Examples
Modelos de series de tiempo
Introduction: Examples
Modelos de series de tiempo
Introduction: Times-Series vs Cross-section
II. Times-Series vs Cross-section data
I
The main difference between time series and cross-section
data is in dependence structure.
I
Cross-section econometrics mainly deals with i.i.d.
observations, while in time series each new arriving
observation is stochastically depending on the previously
observed.
The dependence is our best friend and a great enemy.
I
I
I
On one side, the dependence screw up your inferences: the
Central Limit Theorem should be corrected to hold for
dependent observations. That bring us to the task of
correcting our procedures for dependence.
On the other side, the dependence allow us to do more by
exploiting it. For example, we can make forecasts (which are
almost non-sense in cross-section).
Modelos de series de tiempo
Introduction: iid vs no-iid data
Modelos de series de tiempo
Introducción: iid vs no-iid data
I
Then if the underlying common probability model for the X’s
is N(µ, σ 2 ) the sample mean and the sample variance are
independently distributed.
Question:
What can one expect regarding the status of independence or
dependence between sample mean and sample variance when the
random variables X’s are allowed to be non-iid or non-normal?
Answer:
The sample mean and the variance may or may not follow
independent probability models !
Modelos de series de tiempo
Introducción: Consequences no-iid data
The main consequences of long-range correlations in supposedly
i.i.d. data are:
I
The effects are mild for point estimation,
I
but drastic for standard errors, confidence intervals and tests
for not very small samples, and they increase exponentially
with the size of the data set.
Typical example:
The true variance of the arithmetic mean of 130 observations can
easily be 20 times the variance derived under the independence
assumption.
Modelos de series de tiempo
Introduction: Time series Plot
Times-Series components (types of dynamic variation)
Modelos de series de tiempo
Introduction: Types of variation
Are the series completely random?
Modelos de series de tiempo
Introduction: types of variation
Modelos de series de tiempo
Modelos de series de tiempo
Introduction: types of variation
Modelos de series de tiempo
Introduction: Types of variation
Trend Component
Modelos de series de tiempo
Introduction: Types of variation
Sesonal Component
Modelos de series de tiempo
Introduction: Types of variation
Cyclical Component
Modelos de series de tiempo
Introduction: Types of variation
Irregular Component
Modelos de series de tiempo
Introduction: Types of variation
Modelos de series de tiempo
Introduction: Types of variation
Modelos de series de tiempo
Introduction: Types of variation
Modelos de series de tiempo
Introduction: Types of variation
How to deal with trend and seasonal components?
A. Time series with a trend component:
curve Fitting, Filtering and differencing methods.
B. Time series with a seasonal component:
Seasonal filtering and Seasonal differencing methods
Modelos de series de tiempo
Introduction: Time series with trend
A. Time series with a trend component
There are two types of trends:
I
Deterministic
I
Stochastic
A trending mean is a common violation of stationarity.
Modelos de series de tiempo
Introduction: Stochastic vs determisnistic
There are two popular models for nonstationary series with a
trending mean:
1. Trend stationary:
The mean trend is deterministic.
Once the trend is estimated and removed from the data, the
residual series is a stationary stochastic process.
2. Difference stationary:
The mean trend is stochastic.
Differencing the series one or several times yields a stationary
stochastic process.
Modelos de series de tiempo
Introduction: Trend features
The distinction between a deterministic and stochastic trend has
important implications for the long-term behavior of a process:
* Time series with a deterministic trend always revert to the
trend in the long run (the effects of shocks are eventually
eliminated). Forecast intervals have constant width.
** Time series with a stochastic trend never recover from shocks
to the system (the effects of shocks are permanent)
Modelos de series de tiempo
Introduction: Deterministic and Stochastic component of a trend
Example:
Considering the following process (Random walk plus drift):
Xt = Xt−1 + α + εt
The solution is given by:
Xt = X0 + αt +
T
X
εt
t=1
where X0 is an initial value, and the average behavior of Xt in the
long-run will be determined by the parameter α, which is the
(unconditional) expected change in Xt .
Modelos de series de tiempo
Introduction: Deterministic vs Stochastic Trends
We see that the random walk with drift has a trend, which includes
a stochastic and deterministic component (that can account for a
time series tendency to increase on average over time).
1 Deterministic part: series always changes by the same fixed
amount from one period to the next.
E [Xt ] = X0 + αt
2 Stochastic part: series changes from one period to the next is
totally stochastic.
T
X
E [Xt ] = X0 +
εt
t=1
Modelos de series de tiempo
Introduction: Transitory vs Permanent effect of a trend
What happend when a εt shock occurs?
1 Deterministic part:
E [Xt ] = X0 + αt
which means Xt will exhibit only temporary departures from the
trend when a εt shock occurs.
2 Stochastic part:
E [Xt ] = X0 +
T
X
εt
t=1
which means Xt will exhibit permanent departures from the trend
when a εt shock occurs.
Modelos de series de tiempo
Introduction: Deterministic vs Stochastic Trends
The appropriate way to remove the trend components is the
following (necessary to attained a stationary series):
I Deterministic trend: Detrending (Curve-fitting or Filtering)
II Stochastic trend: Differentiation
Modelos de series de tiempo
Introduction: Time series with trend
I. Deterministc trend
Modelos de series de tiempo
Introduction: Time series with trend
Modelos de series de tiempo
Introduction: Time series with trend
Modelos de series de tiempo
Introduction: Curve fitting method
Modelos de series de tiempo
Introduction: Smoothing methods
Modelos de series de tiempo
Introduction: Smoothing methods
Modelos de series de tiempo
Introduction: Smoothing methods
Modelos de series de tiempo
Introduction: Differencing method
II. Stochastic trend
Modelos de series de tiempo
Introduction: Modeling Seasonal variation
B. Time series with a seasonal component
Modelos de series de tiempo
Introduction: Modeling Seasonal variation
Modelos de series de tiempo
Introduction: Eliminating seasonal variation
Modelos de series de tiempo
Introduction: Modeling Seasonal variation
Modelos de series de tiempo
Introduction: Stationary vs Non-stationary series
Stationarity in Time Series:
I
A key idea in time series is that of stationarity.
I
Roughly speaking, a time series is stationary if its behavior
does not change over time.
I
This means, for example, that the values always tend to vary
about the same level and that their variability is constant over
time.
I
Obviously, not all time series are stationary. Indeed,
non-stationary series tend to be the rule rather than the
exception.
I
However, some time series are related in simple ways to
models which are stationary. Two important examples of this
are:
Modelos de series de tiempo
Introduction: Stationary vs Non-stationary series
Modelos de series de tiempo
Introduction: Stationary vs Non-stationary series
Are always those models a valid representation of trending time
series?
Answer: NO !
Why might the trend model not be a valid representation ?
I
The trend and cyclical components of the time series might
not be determined independently of one another.
I
For instance, technology shocks might affect both the cyclical
and trend behavior of the series.
Modelos de series de tiempo
Introduction: Stationary vs Non-stationary series
What about integrated models?
I
The Integrated model ( or random walk model) has a
stochastic trend and may be a good starting point for
describing the way many financial market prices and returns
seem to behave.
I
However, realizations of random walks will not usually be
characterized by the tendency to grow over time that is so
apparent in many macroeconomic time series.
I
That is, the stochastic trend in the random walk is not
sufficient to explain the kind of trend behavior we observe in
the typical macroeconomic time series.
Modelos de series de tiempo
Introduction: Stationary vs Non-stationary series
I
The general pattern of this data does not change over time so
it can be regarded as stationary
Modelos de series de tiempo
Introduction: Stationary vs Non-stationary series
I
There is a steady long-term increase in the yields.
I
Over the period of observation a trend-plus-stationary series
model looks like it might be appropriate.
I
An integrated stationary series is another possibility (if trend
is stochastic instead of deterministic).
Modelos de series de tiempo
Introduction: Stationary vs Non-stationary series
I
There is clearly a strong seasonal effect on top of a general
upward trend.
Modelos de series de tiempo
Introduction: Stationary vs Non-stationary series
In summary:
We know there are differences in the dynamic behavior of times series:
the nature of the trend, the long-run behavior, and seasonal and/or
components.
In fact, there are different approaches to modeling trends in time series.
Which process will be a valid representation of a trending time series ?
and How should we choose?
I
It will not be obvious just by looking at the data. Time series plot
helps but it is not enough !
I
Does one or the other seem more plausible based on the economic
theory (if there is any) that underlies the econometric model?
I
How to apply formal tests to help select the appropriate form of the
model ?
Modelos de series de tiempo
Introduction: Stationary vs Non-stationary series
Objectives of this course:
I
Description - summary statistics, graphs.
I
Analysis and interpretation - find a model to describe the time
dependence in the data, can we interpret the model?
I
Forecasting or prediction - given a sample from the series,
forecast the next value, or the next few values
Modelos de series de tiempo
Exercise in R
Exercise 1 in R
We are going to analyze three time series:
1. Age of Death of Successive Kings of England
2. The number of births per month in New York city, from
January 1946 to December 1959
3. The monthly sales for a souvenir shop at a beach resort town
in Queensland, Australia, for January 1987-December 1993.
Goals:
I
Plot and to do a basic statistical analysis of the series
I
Identify what components are presents in the series
I
Decompose a time series into different components and
interpret the results

Documentos relacionados