1 / 60

Power 2

Power 2. Econ 240C. Lab 2 Retrospective. Exercise: GDP_CAN = a +b*GDP_CAN(-1) + e GDP_FRA = a +b*GDP_FRA(-1) + e. Data in Excel. Stacking. So for stacking, the data start with 1951. Data in Excel. Stacking.

oberon
Download Presentation

Power 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Power 2 Econ 240C

  2. Lab 2 Retrospective • Exercise: • GDP_CAN = a +b*GDP_CAN(-1) + e • GDP_FRA = a +b*GDP_FRA(-1) + e

  3. Data in Excel

  4. Stacking • So for stacking, the data start with 1951

  5. Data in Excel

  6. Stacking • So the dependent variable starts with gdp_can(1951) and goes through gdp_can(1992). Then the next value in the stack is gdp_fra(1951) and the data continues ending with gdp_fra(1992). • The independent variable for Canada starts with gdp_can(1950) and goes through gdp_can(1991). Then the rest of the stack is 42 zeros

  7. Stacking • The independent variable for France starts with a stack of 42 zeros. Then the next observation is gdp_fra(1950), the following is gdp_fra(1951) etc. ending with gdp_fra(1991) • The constant stack for Canada is 42 ones followed by 42 zeros • The constant term for France is 42 zeros followed by 42 ones

  8. Outline • Time Series Concepts • Inertial models • Conceptual time series components • Simulation and synthesis • Simulated white noise, wn(t) • Spreadsheet, trace, and histogram of wn(t) • Independence of wn(t)

  9. Univariate Time Series Concepts • Inertial models: Predicting the future from own past behavior • Example: trend models • Other example: autoregressive moving average (ARMA) models • Assumption: underlying structure and forces have not changed

  10. Conceptual time series components model • Time series = trend + seasonal + cycle + random • Example: linear trend model • Y(t) = a + b*t + e(t) • Example linear trend with seasonal • Y(t) = a + b*t + c1*Q1(t) + c2*Q2(t) + c3*Q3(t) + e(t)

  11. How to model the cycle? • We have learned how to model: • Trend: linear and exponential • Seasonality: dummy variables • Error: e.g. autoregressive • How do you model the cyclical component?

  12. Cyclical time series behavior • Many economic time series vary with the business cycle • Model the cycle using ARMA models • That is what the first half of 240C is all about

  13. Simulation and Synthesis • Build ARMA models from noise, white noise, in a process called synthesis • The idea is to start with a time series of simple structure, and build ARMA models by transforming white noise

  14. Simulated white noise • Generate a sequence of values drawn from a normal distribution with mean zero and variance one, i.e. N(0, 1) • In EViews: Gen wn = nrnd

  15. The first ten values of simulated white noise, wn(t) Valuedraw = time index -0.628093683959 1 -0.627803051549 2 0.00723255412415 3 1.94192735344 4 -1.10119663665 5 0.514236967572 6 -0.843129585702 7 -0.0153352207678 8 1.25353192311 9 1.48589824393 10

  16. Trace (plot) of first 100 values of wn(t) No obvious time Dependence, i.e. Stationary, not Trended, not seasonal

  17. Histogram and Statistics, 1000 Obs.

  18. Independence • We know each drawn value is from the same distribution, i.e. N(0,1) • We know every value drawn is independent from all other values • So wn(t) should be iid, independent and identically distributed

  19. Independence: conceptual • Suppose the mean series, m(t), of white noise is zero, i.e. E wn(t) = m(t) = 0 • This is a good suppose because every generated value has expectation zero since it is from N(0,1) • Then E[wn(t)*wn(t-1)] = 0, i.e. a value is independent from the previous or lagged value

  20. Independence: conceptual • In general: cov [wn(t)*wn(t-u)], where wn(t-u) is lagged u periods from t is defined as cov[wn(t)*wn(t-u)] = E{[wn(t) – Ewn(t)]*[wn(t-u) – Ewn(t-u)]} = E [wn(t)*wn(t-u)], since E wn(t) = 0 • This is called the autocovarince, i.e. the covariance of white noise with lagged values of itself

  21. Independence: Conceptual • For every value of lag except zero, the autocovarince function of white noise is zero by independence • At lag zero, the autocovariance of white noise is just its variance, equal to one cov [wn(t)*wn(t)] = E[wn(t)*wn(t)] =1

  22. Independence: Conceptual • the autocovariance function can be standardized, i,e, made free of units or scale, by dividing by the variance to obtain the autocorrelation function, symbolized for wn(t) by rwn, wn (u) = cov [wn(t)*wn(t-u)/Var wn(t) • In general, the autocorrelation function for a time series depends both on time, t, and lag, u. However, for stationary time series it depends only on lag.

  23. Theoretical Autocorrelation Function: White Noise

  24. What use is the autocorrelation function in practice? • Estimated Autocorrelations in EViews

  25. 1000 observations of White Noise

  26. Analysis • Breaking down the structure of an observed time series, i.e. modeling it • Example: weekly closing price of gold, Handy & Harmon, $ per ounce

  27. PRICE OF GOLD

  28. Price of gold does Not look like white noise

  29. What now? • How about week to week changes in the price of gold? • In EViews: Gen dgold = gold –gold(-1)

  30. Changes in the price of gold • If changes in the price of gold are not significantly different from white noise, then we have a use for our white noise model: dgold(t) = c + wn(t) • Ignore the constant for the moment • What sort of time series is the price of gold?

  31. The price of gold • dgold(t) = gold(t) – gold(t-1) = wn(t) • i.e. gold(t) = gold(t-1) + wn(t) • Lag by one: dgold(t-1) = gold(t-1) – gold(t-2) =wn(t-1) • i.e., gold (t-1) = gold(t-2) + wn (t-1), so gold(t) = wn(t) + wn(t-1)+ gold(t-2)

  32. The price of gold • Keep lagging and substituting, and • gold(t) = wn(t) + wn(t-1) + wn(t-2) + …. • i.e. the price of gold is the current shock, wn(t), plus last week’s shock, wn(t-1), plus the shock from the week before that, wn(t-2) etc. • These shocks are also called innovations

  33. The price of gold • This time series for gold, i.e. the sum of current and previous shocks is called a random walk, rw(t) • So rw(t) = wn(t) + wn(t-1) + wn(t-2) + … • Lagging by one: • rw(t-1) = wn(t-1) + wn(t-2) + wn(t-3) + … • So drw(t) = rw(t) –rw(t-1) = wn(t)

  34. The first difference of a random walk • The first difference of a random walk is white noise

  35. Random walk plus trend • If the price of gold is trend plus a random walk: gold(t) = a + b*t + rw(t), it is said to be a random walk with drift • Lagging by one, gold(t-1) = a + b*(t-1) + rw(t-1) • And subtracting, dgold(t) = b + drw(t), i.e. • dgold(t) = constant + white noise

  36. The time series is too short for the constant To be significant

  37. Simulated Random walk • EViews, sample 1 1, gen rw = wn • Sample 2 1000, gen rw = rw(-1) + wn

  38. Simulated random walk

More Related