Time Series Analysis (Econometrics II) Saarland University PD Dr. Stefan Klößner Summer Term 2017 U N I V E R S I T A S S A R A V I E N I S S Time Series Analysis (SS 2017) Lecture 1 Slide 1
Topics of first lecture Organizational issues (Preliminary) course outline Literature Introduction Time Series Analysis (SS 2017) Lecture 1 Slide 2
Organizational issues I Lecture: Tue 08:30-10, Bldg. C3 1, Room 3.01 Tutorial: Mon 10-12, Bldg. C3 1, Room 3.01 Additional information, materials, and online registration for tutorial can be found on www.oekonometrie.uni-saarland.de Contact: Bldg. C3 1, Room 2.19 Office hours: by appointment Phone: +49 681 302 3179 E-Mail: S.Kloessner@mx.uni-saarland.de Time Series Analysis (SS 2017) Lecture 1 Slide 3
Organizational issues II Credit points: 6 ECTS (4 BP) Exam: either written (2 hours) or oral (30 minutes) Course is eligible for Master BWL: Zusatzbereich BWL Master Economics, Finance, and Philosophy: Pflichtbereich Econometrics Master Wirtschaftsinformatik: Ökonometrie & Statistik Time Series Analysis (SS 2017) Lecture 1 Slide 4
Aims and scope of Journal of Time Series Analysis (since 1980), according to journal s homepage: During the last 25 years Time Series Analysis has become one of the most important and widely used branches of Mathematical Statistics. Its fields of application range from neurophysiology to astrophysics and it covers such well-known areas as economic forecasting, study of biological data, control systems, signal processing and communications and vibrations engineering. Time Series Analysis (SS 2017) Lecture 1 Slide 5
This course: time series analysis with a view to financial econometrics (Finanzmarktökonometrie) Journal of Financial Econometrics (since 2003), editor s introduction (vol. 1, no. 1, p. 1): Financial Econometrics has become one of the most active areas of research in econometrics. Twenty years ago, least-squares methods were the main econometric tool used to analyze issues such as efficient markets, tests of the capital asset pricing model or arbitrage pricing theory, and stock returns forecasts. The availability of reliable financial data (often at very high frequency) as well as increased computing power have spurred the development of new and sophisticated econometric techniques. These techniques are often unique to the field of finance. Time Series Analysis (SS 2017) Lecture 1 Slide 6
They involve statistical modeling based on continuous time, focus on nonlinear features of time series, require a structural approach imposed by equilibrium or by the absence of arbitrage for pricing an increasingly complex array of financial products, and necessitate a delicate analysis of conditioning information. The Journal of Financial Econometrics intends to be the statement of record for these developments. The scope of our new journal reflects the diversity of themes that animate the field today. Estimation, testing, learning, predicition, and calibration in the framework of asset pricing models or risk management represent our core focus. More specifically, topics relating to volatility processes, continuous-time processes, dynamic conditional moments, extreme values, long memory, dynamic mixture models, endogenous sampling, transaction data, or microstructure of financial markets will almost certainly appear in this journal.... Time Series Analysis (SS 2017) Lecture 1 Slide 7
(Preliminary) outline 1 Introduction, notations, basics 2 Univariate linear time series models: ARIMA processes 3 Univariate non-linear time series models: ARCH and GARCH processes 4 Multivariate time series models Time Series Analysis (SS 2017) Lecture 1 Slide 8
Literature I Box & Jenkins: Time Series Analysis: Forecasting and Control, Holden-Day, San Francisco et al., 1970 Brockwell & Davis: Introduction to Time Series and Forecasting, 2nd ed., Springer, New York et al., 2002 Brockwell & Davis: Time Series: Theory and Methods, 2nd ed., Springer, New York et al., 2006 Brooks: Introductory econometrics for finance, Cambridge Univ. Press, Cambridge et al., 2002 Campbell, Lo & MacKinlay: The Econometrics of Financial Markets, 2nd ed., Princeton Univ. Press, Princeton, 1997 Franke, Härdle & Hafner: Einführung in die Statistik der Finanzmärkte, 2. Aufl., Springer, Berlin et al., 2004 Time Series Analysis (SS 2017) Lecture 1 Slide 9
Literature II Franses & van Dijk: Non-linear time series models in empirical finance, Springer, Cambridge Univ. Press, Cambridge et al., 2000 Gouriéroux & Jasiak: Financial Econometrics, Princeton University Press, Princeton, 2001 Greene: Econometric Analysis, 7th ed., Prentice Hall Internat., Upper Saddle River, 2012 Hamilton: Time Series Analysis, Princeton Univ. Press, Princeton, 1994 Mills: The econometric modeling of financial time series, Cambridge Univ. Press, Cambridge et al., 1993 Lütkepohl: New Introduction to Multiple Time Series Analysis, Springer, Berlin et al., 2005 Time Series Analysis (SS 2017) Lecture 1 Slide 10
Literature III Rinne & Specht: Zeitreihen: Statistische Modellierung, Schätzung und Prognose, Vahlen, München, 2002 Schlittgen, Streitberg: Zeitreihenanalyse, Oldenbourg, 9. Aufl., München, Wien, 2001 Schröder (Hrsg.): Finanzmarkt-Ökonometrie, Schäffer-Poeschel, Stuttgart, 2002 Shiryaev: Essentials of Stochastic Finance: Facts, Models, Theory, Advanced Series on Statistical Science & Applied Probability, Vol. 3, World Scientific, Singapur et al., 1999 Tsay: Analysis of Financial Time Series, Wiley, 3rd ed., Hoboken, NJ, 2010 Time Series Analysis (SS 2017) Lecture 1 Slide 11
Introduction commodity prices in the future are uncertain stochastic models to describe this uncertainty aim of these models: assess the risk inherent in an investment Risikomessung und Value at Risk decision on how to combine assets to form an optimal portfolio of assets (portfolio optimization) Portfolio Selection pricing of derivative instruments (options, swaps, etc.) on these commodities (option pricing) Einführung in die Optionsbewertung Derivative Finanzinstrumente Time Series Analysis (SS 2017) Lecture 1 Slide 12
Important tasks of time series analysis finding an adequate stochastic model that properly describes the data (model building) testing the specified model estimating model parameters testing of hypotheses about the parameters forecasting Time Series Analysis (SS 2017) Lecture 1 Slide 13
R A Language and Environment for Statistical Computing in practice: time series analysis essentially impossible without computer and suitable software software used for this course: statistical software R (open source, can be downloaded from www.r-project.org) R is non-commercial, widely used in statistical and econometric research units, and gains importance in industry many time series methods are available in R or some of its user-written packages it is highly recommended to use R to get familiar with time series methods, however: knowing R not necessary for passing final exam R is used in several other econometrics courses Time Series Analysis (SS 2017) Lecture 1 Slide 14
Notations P t : price of some commodity at time t, 1 R t := Pt P t 1 P t 1 : returns, with 1 < R t < due to P t > 0, 2 p t := ln P t : log-prices, 3 r t := ln P t ln P t 1 : continuously compounded returns, with r t = ln Pt P t 1 = ln(1 + R t ), e rt = 1 + R t, and r t R t for small returns. If, for every t in some index set T, observations x t of some interesting quantity are given, we think of x t as realisations of a random process, a stochastic process (X t ) t T. Time Series Analysis (SS 2017) Lecture 1 Slide 15
Example (prices) closing prices of BMW (adjusted) P t 20 30 40 50 60 70 2006 2008 2010 2012 Date Time Series Analysis (SS 2017) Lecture 1 Slide 16
Example (log-prices) logarithmic closing prices of BMW (adjusted) p t 3.0 3.5 4.0 2006 2008 2010 2012 Date Time Series Analysis (SS 2017) Lecture 1 Slide 17
Example (continuously compounded returns) continuously compounded daily returns BMW (adjusted) r t 0.15 0.10 0.05 0.00 0.05 0.10 2006 2008 2010 2012 Date Time Series Analysis (SS 2017) Lecture 1 Slide 18
Definition (Stochastic process) Given a probability space (Ω, F, P), an index set T, and, for every t T, a random variable X t on (Ω, F, P), we call 1 X := (X t ) t T stochastic process, 2 the mapping X (ω) : T R, t X t (ω) path of the stochastic process X (for every ω Ω), 3 (X t ) t T time series, if T is a subset of the integer numbers Z. Time Series Analysis (SS 2017) Lecture 1 Slide 19
Remarks The elements ω Ω are interpreted as scenarios, P then gives the probability of the scenarios. T is usually interpreted as a set of points in time. X t (ω) may then be interpreted as the process value at time t T, given that scenario ω Ω has occured. If we have a path (x t ) t T of some time series, we often call (x t ) t T time series, too. Usually we only observe some part of the path, i.e. (x t ) t T for some finite subset T T. Time Series Analysis (SS 2017) Lecture 1 Slide 20
Examples of time series: I Air passengers on international flights Number (in thousands) 100 200 300 400 500 600 1950 1952 1954 1956 1958 1960 Month Time Series Analysis (SS 2017) Lecture 1 Slide 21
Examples of time series: II Mean annual temperature, New Haven, Conneticut Degrees (Fahrenheit) 48 49 50 51 52 53 54 1910 1920 1930 1940 1950 1960 1970 Year Time Series Analysis (SS 2017) Lecture 1 Slide 22
Examples of time series: III Water depth of Lake Huron Depth (feet) 576 577 578 579 580 581 582 1880 1900 1920 1940 1960 Jahr Time Series Analysis (SS 2017) Lecture 1 Slide 23
Definition (Stationarity) We call a stochastic process (X t ) t Z 1 strongly stationary, if, for all m N, t 1,..., t m Z, and h N, the distributions of (X t1,..., X tm ) and (X t1 +h,..., X tm+h) are identical: (X t1,..., X tm ) d = (X t1 +h,..., X tm+h), 2 (weakly) stationary or covariance stationary, if 1 X t has finite moments of second order for all t Z, 2 EX t = EX t for all t, t Z, 3 and Cov(X t, X t ) = Cov(X t+h, X t+h ) for all h N 0, t, t Z. Time Series Analysis (SS 2017) Lecture 1 Slide 24
Remarks It is possible to define (strict, weak) stationarity analogously for other index sets T as well. In general, strict stationarity does not imply weak stationarity. Strict stationarity together with existing second moments implies weak stationarity. In general, weak stationarity does not imply strict stationarity. Weak stationarity implies strict stationarity, if all marginal distributions of the time series are Gaussian. Time Series Analysis (SS 2017) Lecture 1 Slide 25
Theorem If (X t ) t Z is a strictly stationary time series and f : R R is a measurable mapping, then the transformed process is also strictly stationary. Remark: f (X ) := (f (X t )) t Z An analogous assertion for weak stationarity does not hold, even if the existence of second moments is guaranteed! Time Series Analysis (SS 2017) Lecture 1 Slide 26
Examples We take as given uncorrelated (independent) and identically distributed random variables ε t with zero mean and variance σ 2 ε for t Z. Then, for every θ R, we can define a weakly (strictly) stationary process X θ by setting X θ t := ε t + θε t 1. Given uncorrelated random variables A and B with zero mean and unit variance, we can for every θ [ π, π] define a weakly stationary time series X θ by setting X θ t := A cos(θt) + B sin(θt). Time Series Analysis (SS 2017) Lecture 1 Slide 27
Examples of paths of stationary time series I 20 10 0 10 20 2 1 0 1 2 Paths of X t 0.25 = ε t + 0.25ε t 1 t x t Time Series Analysis (SS 2017) Lecture 1 Slide 28
Examples of paths of stationary time series II Paths of X t 0.25 = Acos(0.25t) + Bsin(0.25t) x t 1.5 1.0 0.5 0.0 0.5 1.0 1.5 o o o A= 1, B=0.25 A=0, B=0.5 A=0.5, B=1 20 10 0 10 20 t Time Series Analysis (SS 2017) Lecture 1 Slide 29
Introduction to complex numbers I (Mathematical) Interlude In time series analysis, it is sometimes necessary to solve equations of the form x 2 + 4 = 0. We need to augment the real numbers R by moving on to complex numbers C. We introduce the imaginary unit i with the property i 2 = 1. Complex numbers z C can be written as z = a + b i with a, b R. We call a = Re(a + b i) real part and b = Im(a + b i) imaginary part of the complex number a + b i. Most algebraic rules carry over to complex numbers. Time Series Analysis (SS 2017) Lecture 1 Slide 30
Introduction to complex numbers II Algebraic rules Addition: (a + b i) + (c + d i) = (a + c) + (b + d) i Subtraction: (a + b i) (c + d i) = (a c) + (b d) i Multiplication: (a + b i) (c + d i) = (ac bd) + (ad + bc) i Division: a + b i c + d i ac + bd bc ad = + i (for c + d i 0) c 2 + d 2 c 2 + d 2 Absolute value: a + b i = a 2 + b 2 For z C with z = a + b i, we define the conjugate of z by z = a b i. We then have z z = z 2 z + z = 2 Re(z) z z = 2 i Im(z) Time Series Analysis (SS 2017) Lecture 1 Slide 31
Introduction to complex numbers III Factorisation of polynomials Huge advantage of complex numbers: for n N, a 0,..., a n R (C), every polynomial p(x) = n a j x j = a n x n + a n 1 x n 1 + + a 1 x + a 0 j=0 can be completely decomposed into linear factors, i.e. there exist c, b 1,... b n C with p(x) = c n (x b j ) = c (x b 1 ) (x b 2 )... (x b n ). j=1 Every polynomial of order n has n (possibly non-distinct) roots in C. Time Series Analysis (SS 2017) Lecture 1 Slide 32
Introduction to complex numbers IV Solving equations in C (example) Example: finding the roots of x 2 2x + 5 Alternative 1: x 2 2x + 5 = 0 (x 1) 2 = 4 x 1 = 2 i x 1 = 2 i x = 1 + 2 i x = 1 2 i Alternative 2: ( p q formula : x = p ± p 2 q solves x 2 + px + q = 0) 2 4 x = 2 + 4 5 x = 2 4 5 2 4 2 4 x = 1 + 4 x = 1 4 x = 1 + 2 i x = 1 2 i (with a := a i for a R + ) Time Series Analysis (SS 2017) Lecture 1 Slide 33
White noise, Gaussian processes Definition (White noise, Gaussian process) 1 A stochastic process is called Gaussian if all its marginal distributions are Gaussian. 2 A stochastic process (ε t ) t T is called white noise, if: σ 2, t = s E(ε t ) = 0, Cov(ε t, ε s ) = t, s T. 0, t s 3 A white noise ε is called independent, if ε t and ε s are stochastically independent for all t s. 4 A white noise that is also Gaussian is called Gaussian white noise. Time Series Analysis (SS 2017) Lecture 1 Slide 34
Gaussian white noise Path of Gaussian white noise, with t = 1,..., 100, σ 2 = 1 0 20 40 60 80 100 2 1 0 1 Gaussian white noise t ε t Time Series Analysis (SS 2017) Lecture 1 Slide 35
Remarks For a white noise ε, the random variables ε t and ε s are in general only uncorrelated, but not independent! Therefore, it is possible that Cov(ε 2 t, ε 2 s) 0, although ε t and ε s are uncorrelated. For an independent white noise ε, we have in particular: ε 2 t, ε 2 s are stochastically independent, entailing Cov(ε 2 t, ε 2 s) = 0 (given that this covariance exists). A Gaussian white noise is always independent, as normally distributed random variables are uncorrelated if and only if they are independent. Therefore, we have for Gaussian white noise: iid ε t N(0, σ 2 ). (Gaussian) white noise is a central building block which is used to construct more complicated stochastic processes. Time Series Analysis (SS 2017) Lecture 1 Slide 36
Random Walk Definition (Random Walk) 1 Given a white noise (ε t ) t Z, we call a stochastic process (X t ) t Z 1 random walk (without drift), if we have for all t Z: X t = X t 1 + ε t, 2 random walk with drift α 0 R, if we have for all t Z: X t = α 0 + X t 1 + ε t. 2 Given a white noise (ε t ) t N, we call a stochastic process (X t ) t N0 1 random walk (without drift) with initial value x R, if we have for all t N 0 : X t = x + t n=1 ε n, 2 random walk with drift α 0 R and initial value x R, if we have for all t N 0 : X t = x + α 0 t + t n=1 ε n. Time Series Analysis (SS 2017) Lecture 1 Slide 37
Random walk (without drift) Path of random walk, with t = 0,..., 100, ε t iid N(0, 1), x = 0 Random walk X t 10 8 6 4 2 0 0 20 40 60 80 100 Time Series Analysis (SS 2017) Lecture 1 Slide 38 t
Random walk with drift and initial value Path of random walk with drift, with t = 0,..., 100, ε t iid N(0, 1), x = 5, α 0 = 0.3 Random walk with drift, initial value= 5 X t 10 5 0 5 10 15 20 25 0 20 40 60 80 100 Time Series Analysis (SS 2017) Lecturet 1 Slide 39
Remarks Random walks without initial value and their distribution are not uniquely specified. It is possible to completely specify such a process by nailing down the process distribution at some time t 0 Z. For a random walk X, we call e X geometric or exponential random walk. To emphasize the difference, X then is often called arithmetic random walk. A random walk is not stationary. For a random walk (without drift) with initial value 0, we have Var(X t ) = σεt 2 and Corr(X t, X t+h ) = for all h N. t t+h Time Series Analysis (SS 2017) Lecture 1 Slide 40