K. Ensor, STAT Spring 2005 The Basics: Outline What is a time series? What is a financial time series? What is the purpose of our analysis? Classification of Time Series. Correlation –Autocorrelation –Partial Autocorrelation –Cross Correlation Basic transformation to stationarity –Differencing
K. Ensor, STAT Spring 2005 What is a time series? Review –Random variable –Distribution (cdf, pdf) –Moments Mean Variance Covariance Correlation Skewness Kurtosis Time Series –Random process – random variable is a function of time –Distribution? –Moments Mean Variance Covariance Correlation Skewness Kurtosis
K. Ensor, STAT Spring 2005
K. Ensor, STAT Spring 2005
K. Ensor, STAT Spring 2005 Further examples of a time series Anything observed sequentially (by time?) Returns, volatility, interest rates, exchange rates, bond yields, … Hourly temperature, hourly ozone levels ???
K. Ensor, STAT Spring 2005 What is different? The observations are not independent. There is correlation from observation to observation. Consider the log of the J&J series. Is there correlation in the observations over time?
K. Ensor, STAT Spring 2005 What are our objectives? Making decisions based on the observed realization requires: –Descriptive: Estimating summary measures (e.g. mean) –Inferential: Understanding / Modeling –Prediction / Forecasting –Control of the process If correlation is present between the observations then our typical approaches are not correct (as they assume iid samples).
K. Ensor, STAT Spring 2005 Classification of a Time Series Dimension of T –Time, space, space- time Nature of T –Discrete Equally Unequally spaced –Continuous Observed continuously Observed by some random process Dimension of X –Univariate –Multivariate State spce –Discrete –Continuous Memory types –Stationary No memory Short memory Long memory –Nonstationary
K. Ensor, STAT Spring 2005 Stationarity Strictly Stationary All finite dimensional distributions are the same. First and second moment structure does not change with time. Covariance Stationary What doesstationarityprovide?
K. Ensor, STAT Spring 2005 Autocorrelation
K. Ensor, STAT Spring 2005 Autocorrelation Function for a CSTS In theory… How to estimate this quantity?
K. Ensor, STAT Spring 2005 Autocorrelation? How would you determine or show correlation over time?
K. Ensor, STAT Spring 2005 Sample ACF and PACF Sample ACF – sample estimate of the autocorrelation function. –Substitute sample estimates of the covariance between X(t) and X(t+h). Note: We do not have “n” pairs but “n-h” pairs. –Subsitute sample estimate of variance. Sample PACF – correlation between observations X(t) and X(t+h) after removing the linear relationship of all observations in that fall between X(t) and X(t+h).
K. Ensor, STAT Spring 2005 Summary Plots
K. Ensor, STAT Spring 2005 Cross Correlation
K. Ensor, STAT Spring 2005 Multivariate Series How can we study the relationship between 2 or more time series? U.S. weekly interest rate series measured in percentages –Time: From 1/5/1962 to 9/10/1999. –Variables: r1(t) = The 1-year Treasury constant maturity rate r2(t) = The 3-year Treasury constant maturity rate And the corresponding change series –c1(t)=(1-B)r1(t) –c2(t)=(1-B)r2(t)
K. Ensor, STAT Spring 2005
K. Ensor, STAT Spring 2005 Scatterplots between series simultaneous in time and the change in each series. The two series are highly correlated.
K. Ensor, STAT Spring 2005
K. Ensor, STAT Spring 2005 What is the cross-correlation between the two series?
K. Ensor, STAT Spring 2005 Differencing to achieve Stationarity
K. Ensor, STAT Spring 2005 Detrending by taking first difference. Y(t)=X(t) – X(t-1) What happens to the trend? Suppose X(t)=a+bt+Z(t) Z(t) is a random variable.
K. Ensor, STAT Spring 2005 Sumary Plots of Detrended J&J log earnings per share.
K. Ensor, STAT Spring 2005 Removing Seasonal Trend – one way to proceed. Suppose Y(t)=g(t)+W(t) where g(t)=g(t-s) where s is our “season” for all t. W(t) is again a new random variable Form a new series U(t) by taking the “s” difference U(t)=Y(t)-Y(t-s) =g(t)-g(t-s) + W(t)-W(t-s) =W(t)-W(t-s) again a random variable
K. Ensor, STAT Spring 2005 Summary of Transformed J&J Series
K. Ensor, STAT Spring 2005 Summary of Transformations: X(t) = log (Q(t)) Y(t)=X(t)-X(t-1) = (1-B)X(t) U(t)= (1-B 4 )Y(t) U(t)=(1-B 4 ) (1-B)X(t)
K. Ensor, STAT Spring 2005 An example of Forecasting
K. Ensor, STAT Spring 2005 What is the next step? U(t) is a time series process called a moving average of order 1 (or possibly a MA(1) plus a seasonal MA(1)) –U(t)=(t-1) + (t) Proceed to estimate and then we can estimate summary information about the earnings per share as well as predict the future earnings per share.
K. Ensor, STAT Spring 2005 Forecast of J&J series
K. Ensor, STAT Spring 2005 Wrap up Basics of distribution theory. Classification of time series. Basics of stationarity. Correlation functions –Autocorrelation –Partial autocorrelation –Cross correlation Transformations to a stationary series –differencing