time series analysis · the scope of our new journal re ects the diversity of themes that animate...
TRANSCRIPT
Time Series AnalysisSaarland University
PD Dr. Stefan Kloßner
Summer Term 2019U
N
IVE R S IT A
S
SA
RA V I E N
SI S
Time Series Analysis (SS 2019) Lecture 1 Slide 1
Topics of first lecture
Organizational issues
(Preliminary) course outline
Literature
Introduction
Time Series Analysis (SS 2019) Lecture 1 Slide 2
Organizational issues I
Lecture: Tue 08:30-10, Bldg. C3 1, Room 3.01
Tutorial: Mon 10-11:30, Bldg. C3 1, Room 3.01
Additional information & materials can be found at website
http://www.oekonometrie.uni-saarland.de
as well as moodle:
https://bit.ly/2UpSfsq
Contact: Bldg. C3 1, Room 2.19
Office hours: by appointment
Phone: +49 681 302 3179
E-Mail: [email protected]
Time Series Analysis (SS 2019) 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 forI Master BWL: Zusatzbereich BWLI Master Economics, Finance, and Philosophy: Pflichtbereich
EconometricsI Master Wirtschaftsinformatik: Okonometrie & Statistik
Time Series Analysis (SS 2019) 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 ofthe most important and widely used branches of MathematicalStatistics. Its fields of application range from neurophysiology toastrophysics and it covers such well-known areas as economicforecasting, study of biological data, control systems, signalprocessing and communications and vibrations engineering.
Time Series Analysis (SS 2019) Lecture 1 Slide 5
This course: time series analysis with a view to financial econometrics(Finanzmarktokonometrie)
Journal of Financial Econometrics (since 2003), editor’sintroduction (vol. 1, no. 1, p. 1):Financial Econometrics has become one of the most active areasof research in econometrics. Twenty years ago, least-squaresmethods were the main econometric tool used to analyze issuessuch as efficient markets, tests of the capital asset pricing modelor arbitrage pricing theory, and stock returns forecasts. Theavailability of reliable financial data (often at very highfrequency) as well as increased computing power have spurredthe development of new and sophisticated econometrictechniques. These techniques are often unique to the field offinance.
Time Series Analysis (SS 2019) Lecture 1 Slide 6
They involve statistical modeling based on continuous time,focus on nonlinear features of time series, require a structuralapproach imposed by equilibrium or by the absence of arbitragefor pricing an increasingly complex array of financial products,and necessitate a delicate analysis of conditioning information.The Journal of Financial Econometrics intends to be thestatement of record for these developments.The scope of our new journal reflects the diversity of themesthat animate the field today. Estimation, testing, learning,prediction, and calibration in the framework of asset pricingmodels or risk management represent our core focus. Morespecifically, topics relating to volatility processes,continuous-time processes, dynamic conditional moments,extreme values, long memory, dynamic mixture models,endogenous sampling, transaction data, or microstructure offinancial markets will almost certainly appear in this journal. . . .
Time Series Analysis (SS 2019) 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 GARCHprocesses
4 Multivariate time series models
Time Series Analysis (SS 2019) 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 FinancialMarkets, 2nd ed., Princeton Univ. Press, Princeton, 1997
Franke, Hardle & Hafner: Einfuhrung in die Statistik derFinanzmarkte, 2. Aufl., Springer, Berlin et al., 2004
Time Series Analysis (SS 2019) Lecture 1 Slide 9
Literature II
Franses & van Dijk: Non-linear time series models in empiricalfinance, Springer, Cambridge Univ. Press, Cambridge et al., 2000
Gourieroux & Jasiak: Financial Econometrics, PrincetonUniversity 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
Lutkepohl: New Introduction to Multiple Time Series Analysis,Springer, Berlin et al., 2005
Time Series Analysis (SS 2019) Lecture 1 Slide 10
Literature III
Rinne & Specht: Zeitreihen: Statistische Modellierung,Schatzung und Prognose, Vahlen, Munchen, 2002
Schlittgen, Streitberg: Zeitreihenanalyse, Oldenbourg, 9. Aufl.,Munchen, Wien, 2001
Schroder (Hrsg.): Finanzmarkt-Okonometrie, Schaffer-Poeschel,Stuttgart, 2002
Shiryaev: Essentials of Stochastic Finance: Facts, Models,Theory, Advanced Series on Statistical Science & AppliedProbability, Vol. 3, World Scientific, Singapur et al., 1999
Tsay: Analysis of Financial Time Series, Wiley, 3rd ed.,Hoboken, NJ, 2010
Remark: new editions exist of several of the books mentionedabove
Time Series Analysis (SS 2019) Lecture 1 Slide 11
Introduction
commodity prices in the future are uncertain stochastic models to describe this uncertainty
aim of these models:I assess the risk inherent in an investment
F Risikomessung und Value at RiskI decision on how to combine assets to form an ’optimal’
portfolio of assets (portfolio optimization)F Portfolio Selection
I pricing of derivative instruments (options, swaps, etc.) on thesecommodities (option pricing)
F Einfuhrung in die OptionsbewertungF Derivative Finanzinstrumente
Time Series Analysis (SS 2019) Lecture 1 Slide 12
Important tasks of time series analysis
finding an adequate stochastic model that properly describes thedata (model building)
testing the specified model
estimating model parameters
testing of hypotheses about the parameters
forecasting
Time Series Analysis (SS 2019) Lecture 1 Slide 13
RA Language and Environment for Statistical Computing
in practice: time series analysis essentially impossible withoutcomputer and suitable software
software used for this course: statistical software R (opensource, can be downloaded from www.r-project.org)
R is non-commercial, widely used in statistical and econometricresearch units, and gains importance in industry
many time series methods are available in R or some of itsuser-written packages
it is highly recommended to use R to get familiar with timeseries methods, however: knowing R not necessary for passingfinal exam
R is used in several other econometrics courses
Time Series Analysis (SS 2019) Lecture 1 Slide 14
Notations
Pt : price of some commodity at time t,1 Rt := Pt−Pt−1
Pt−1: returns, with −1 < Rt <∞ due to Pt > 0 ,
2 pt := lnPt : log-prices,3 rt := lnPt − lnPt−1: continuously compounded returns, with
rt = ln PtPt−1
= ln(1 + Rt), ert = 1 + Rt , and rt ≈ Rt for smallreturns.
If, for every t in some index set T , observations xt of someinteresting quantity are given, we think of xt as realisations of arandom process, a stochastic process (Xt)t∈T .
Time Series Analysis (SS 2019) Lecture 1 Slide 15
Example (prices)
2006 2008 2010 2012
2030
4050
6070
Date
Pt
closing prices of BMW (adjusted)
Time Series Analysis (SS 2019) Lecture 1 Slide 16
Example (log-prices)
2006 2008 2010 2012
3.0
3.5
4.0
Date
p t
logarithmic closing prices of BMW (adjusted)
Time Series Analysis (SS 2019) Lecture 1 Slide 17
Example (continuously compounded returns)
2006 2008 2010 2012
−0.
15−
0.10
−0.
050.
000.
050.
10
Date
r t
continuously compounded daily returns BMW (adjusted)
Time Series Analysis (SS 2019) Lecture 1 Slide 18
Definition (Stochastic process)
Given a probability space (Ω,F ,P), an index set T 6= ∅, and, forevery t ∈ T , a random variable Xt on (Ω,F ,P), we call
1 X := (Xt)t∈T stochastic process,
2 the mappingX•(ω) : T → R, t 7→ Xt(ω)
path of the stochastic process X (for every ω ∈ Ω),
3 (Xt)t∈T time series, if T is a subset of the integer numbers Z.
Time Series Analysis (SS 2019) Lecture 1 Slide 19
Remarks
The elements ω ∈ Ω are interpreted as scenarios, P then givesthe probability of the scenarios.
T is usually interpreted as a set of points in time.
Xt(ω) may then be interpreted as the process’ value at timet ∈ T , given that scenario ω ∈ Ω has occured.
If we have a path (xt)t∈T of some time series, we often call(xt)t∈T time series, too.
Usually we only observe some part of the path, i.e. (xt)t∈T for
some finite subset T ⊂ T .
Time Series Analysis (SS 2019) Lecture 1 Slide 20
Examples of time series: I
Air passengers on international flights
Month
Num
ber
(in th
ousa
nds)
1950 1952 1954 1956 1958 1960
100
200
300
400
500
600
Time Series Analysis (SS 2019) Lecture 1 Slide 21
Examples of time series: II
Mean annual temperature, New Haven, Conneticut
Year
Deg
rees
(Fa
hren
heit)
1910 1920 1930 1940 1950 1960 1970
4849
5051
5253
54
Time Series Analysis (SS 2019) Lecture 1 Slide 22
Examples of time series: III
Water depth of Lake Huron
Jahr
Dep
th (
feet
)
1880 1900 1920 1940 1960
576
577
578
579
580
581
582
Time Series Analysis (SS 2019) Lecture 1 Slide 23
Definition (Stationarity)
We call a stochastic process (Xt)t∈Z1 strongly stationary, if, for all m ∈ N, t1, . . . , tm ∈ Z, and h ∈ N,
the distributions of (Xt1 , . . . ,Xtm) and (Xt1+h, . . . ,Xtm+h) are
identical: (Xt1 , . . . ,Xtm)d= (Xt1+h, . . . ,Xtm+h),
2 (weakly) stationary or covariance stationary, if1 Xt has finite moments of second order for all t ∈ Z,2 EXt = EXt for all t, t ∈ Z,3 and Cov(Xt ,Xt) = Cov(Xt+h,Xt+h) for all h ∈ N0, t, t ∈ Z.
Time Series Analysis (SS 2019) Lecture 1 Slide 24
Remarks
It is possible to define (strict, weak) stationarity analogously forother index sets T as well.
In general, strict stationarity does not imply weak stationarity.
Strict stationarity together with existing second moments impliesweak stationarity.
In general, weak stationarity does not imply strict stationarity.
Weak stationarity implies strict stationarity, if all marginaldistributions of the time series are Gaussian.
Time Series Analysis (SS 2019) Lecture 1 Slide 25
TheoremIf (Xt)t∈Z is a strictly stationary time series and f : R→ R is ameasurable mapping, then the transformed process
f (X ) := (f (Xt))t∈Z
is also strictly stationary.
Remark:
An analogous assertion for weak stationarity does not hold, evenif the existence of second moments is guaranteed!
Time Series Analysis (SS 2019) Lecture 1 Slide 26
Examples
We take as given uncorrelated (independent) and identicallydistributed 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 meanand unit variance, we can for every θ ∈ [−π, π] define a weaklystationary time series X θ by setting
X θt := A cos(θt) + B sin(θt).
Time Series Analysis (SS 2019) Lecture 1 Slide 27
Examples of paths of stationary time series I
−20 −10 0 10 20
−2
−1
01
2Paths of Xt
0.25 = εt + 0.25εt−1
t
x t
Time Series Analysis (SS 2019) Lecture 1 Slide 28
Examples of paths of stationary time series II
−20 −10 0 10 20
−1.
5−
1.0
−0.
50.
00.
51.
01.
5Paths of Xt
0.25 = Acos(0.25t) + Bsin(0.25t)
t
x t
ooo
A=−1, B=0.25A=0, B=0.5A=0.5, B=1
Time Series Analysis (SS 2019) Lecture 1 Slide 29
Introduction to complex numbers I(Mathematical) Interlude
In time series analysis, it is sometimes necessary to solveequations of the form x2 + 4 = 0.
We need to augment the real numbers R by moving on tocomplex numbers C.
We introduce the ’imaginary unit’ i with the property
i2 = −1 .
Complex numbers z ∈ C can be written as z = a + b i witha, 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 2019) Lecture 1 Slide 30
Introduction to complex numbers IIAlgebraic 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
c2 + d2+
bc − ad
c2 + d2i (for c + d i 6= 0)
Absolute value: |a + b i | =√a2 + b2
For z ∈ C with z = a + b i, we define the conjugate of z byz = 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 2019) Lecture 1 Slide 31
Introduction to complex numbers IIIFactorisation of polynomials
Huge advantage of complex numbers: for n ∈ N, a0, . . . , an ∈ R (C),every polynomial
p(x) =n∑
j=0
ajxj = anx
n + an−1xn−1 + · · ·+ a1x + a0
can be completely decomposed into linear factors, i.e. there existc , b1, . . . bn ∈ C with
p(x) = cn∏
j=1
(x − bj) = c · (x − b1) · (x − b2) . . . · (x − bn) .
Every polynomial of order n has n (possibly non-distinct) roots in C.
Time Series Analysis (SS 2019) Lecture 1 Slide 32
Introduction to complex numbers IVSolving equations in C (example)
Example: finding the roots of x2 − 2x + 5
Alternative 1:
x2 − 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 = −p2±
√p2
4− q solves x2 + px + q = 0)
x = −−22
+√
44− 5 ∨ x = −−2
2−√
44− 5
⇔ 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 2019) 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:
E (εt) = 0 , Cov(εt , εs) =
σ2 , t = s
0 , t 6= s∀t, s ∈ T .
3 A white noise ε is called independent, if εt and εs arestochastically independent for all t 6= s.
4 A white noise that is also Gaussian is called Gaussian white noise.
Time Series Analysis (SS 2019) Lecture 1 Slide 34
Gaussian white noisePath of Gaussian white noise, with t = 1, . . . , 100, σ2 = 1
0 20 40 60 80 100
−2
−1
01
Gaussian white noise
t
ε t
Time Series Analysis (SS 2019) Lecture 1 Slide 35
Remarks
For a white noise ε, the random variables εt and εs are in generalonly uncorrelated, but not independent! Therefore, it is possiblethat Cov(ε2t , ε
2s ) 6= 0, although εt and εs are uncorrelated.
For an independent white noise ε, we have in particular: ε2t , ε2s
are stochastically independent, entailing Cov(ε2t , ε2s ) = 0 (given
that this covariance exists).
A Gaussian white noise is always independent, as normallydistributed random variables are uncorrelated if and only if theyare independent. Therefore, we have for Gaussian white noise:
εtiid∼ N(0, σ2).
(Gaussian) white noise is a central building block which is usedto construct more complicated stochastic processes.
Time Series Analysis (SS 2019) Lecture 1 Slide 36
Random Walk
Definition (Random Walk)1 Given a white noise (εt)t∈Z, we call a stochastic process (Xt)t∈Z
1 random walk (without drift), if we have for all t ∈ Z:Xt = Xt−1 + εt ,
2 random walk with drift α0 ∈ R, if we have for all t ∈ Z:Xt = α0 + Xt−1 + εt .
2 Given a white noise (εt)t∈N, we call a stochastic process (Xt)t∈N0
1 random walk (without drift) with initial value x ∈ R, if we have
for all t ∈ N0: Xt = x +t∑
n=1εn,
2 random walk with drift α0 ∈ R and initial value x ∈ R, if we
have for all t ∈ N0: Xt = x + α0t +t∑
n=1εn.
Time Series Analysis (SS 2019) Lecture 1 Slide 37
Random walk (without drift)Path of random walk, with t = 0, . . . , 100, εt
iid∼ N(0, 1), x = 0
0 20 40 60 80 100
−10
−8
−6
−4
−2
0
Random walk
t
Xt
Time Series Analysis (SS 2019) Lecture 1 Slide 38
Random walk with drift and initial valuePath of random walk with drift, with t = 0, . . . , 100, εt
iid∼ N(0, 1), x = −5,α0 = 0.3
0 20 40 60 80 100
−10
−5
05
1015
2025
Random walk with drift, initial value=−5
t
Xt
Time Series Analysis (SS 2019) Lecture 1 Slide 39
Remarks
Random walks without initial value and their distribution are notuniquely specified. It is possible to completely specify such aprocess by nailing down the process’ distribution at some timet0 ∈ Z.
For a random walk X , we call eX geometric or exponentialrandom walk. To emphasize the difference, X then is oftencalled arithmetic random walk.
A random walk is not stationary. For a random walk (withoutdrift) with initial value 0, we have Var(Xt) = σ2
εt and
Corr(Xt ,Xt+h) =√
tt+h
for all h ∈ N.
Time Series Analysis (SS 2019) Lecture 1 Slide 40