Documente Academic
Documente Profesional
Documente Cultură
Negative bias!
2.2 Time Series Analysis
Example: Bias
Implication
The above result can be used to assess the likehood of having ρ(τ)=0
1. Assume ρ(l)=0 for l ≥ τ
2. Substitute r(l), 1≤ l<τ, into the above equation to obtain an estimate of
Var(r(t))=σˆ r2(τ )
3. The variable Z=r(t)/ σˆ r (τ ) is standard normal distributed
The probability for having |ρ(τ)| being smaller than 1.96 × σˆ r (τ ) is then
95%. These values of r(τ) will be frequently observed, even when the
true correlation ρ(τ) is zero
2.2 Time Series Analysis
It can be shown (Bartlett, Box and Jenkins) The correlations between the auto-
1 ∞ correlation function estimates are roughly
Cov(r (τ ), r (τ + δ )) ≈ ∑ ρ (l ) ρ (l + δ )
T l = −∞ similar to those of the process itself.
Consequently, when the process is
and for an AR(1) process with parameter persistent, the estimated auto-correlation
α1>0 function will vary slowly around zero, even
when the real auto-correlation function has
Cov(r (τ ), r (τ + δ )) ≈ α1δ
decayed to zero.
at large lags τ Be careful with the interpretation!
± 1.96σˆ r (τ )
2.2 Time Series Analysis
j =1
¬ ¬
T T T
ω j = j / T , j = 1, L, q, q = , = the largest integer contained in , and
2 2 2
T T T
1 2 2
a0 = ∑ xt , a j = ∑ xt cos(2πω j t ), b j = ∑ xt sin( 2πω j t ), for j = 1, L, q.
T t =1 T t =1 T t =1
1 T
Note that, for even T , aq = ∑
T i =1
(−1) q xt , bq = 0
¬ ¬
⎛ T −1⎞ T
a j = a− j , b j = b− j and j = − ⎜ ⎟,L ,
⎝ 2 ⎠ 2
2.2 Time Series Analysis
∑ c(τ )e
− 2πiω jτ
I Tj =
τ
= −∞
2.2 Time Series Analysis
T t =1
T ⎝ t s ⎠
4
= 2 ∑∑ E ( X t X s )e
− 2πi (ω j t −ω k s ) T=10
T t s
4
= 2 ∑∑ γ (t − s )e
− 2πi (ω j t −ω k s )
T t s
1/ 2
4
=
T2
∑∑ ∫ Γ(ω )e π ω 2 i ( t − s ) − 2πi (ω j t −ω k s )
e dω
t s −1 / 2 As T increases, HT
4
1/ 2
(T +1)πi (ω −ω j ) develops into a function
=
T2 ∫ Γ(ω ) H
−1 / 2
T (ω − ω j )e × H T (ω − ω k )e (T +1)πi (ω −ω k ) dω
with a narrow central
⎛ ω j + ωk ⎞ (T +1)πi (ω k −ω j ) 1/ 2
spike of height T and
4
= 2 Γ⎜⎜ ⎟⎟e × ∫ H T (ω − ω j ) H T (ω − ω k )dω for large T width 1/T and with side
T ⎝ 2 ⎠ −1 / 2
lobes separated by zeros
⎧⎪ 0 for j ≠ k at
=⎨ 4
⎪⎩T 2 Γ(ω j ) for j = k
2.2 Time Series Analysis
( )
1/ 2
4 4
E | Z Tj | ≈ 2 Γ(ω ) ∫ H T (ω − ω j ) 2 dω = Γ(ω j )
2
T −1 / 2
T
⎪⎪ Γ(ω j ) 2
I Tj ~ ⎨ χ (2) 1 ≤ j ≤ the largest integer in (T - 1)/2
⎪ 2
⎪ Γ(1 / 2) χ 2 (1) j=
T
if T is even The sign ~ indicates
⎪⎩ 2 that the left side is a
The variance of the periodogram is random variable with
the distribution given
⎧ on the right hand side
⎪ Γ(0) j=0
2
⎪
Var ( I Tj ) = ⎨Γ(ω j ) 2 1 ≤ j ≤ the largest integer in (T - 1)/2
⎪ T
⎪Γ(1 / 2) j = if T is even
2
⎩ 2
Example I Example II
The periodogram of a white noise The periodogram of a time series of
time series of length T=120, 240 length T=240 generated by the
AR(2) process with (α1,α2)=(0.9,-
0.8), plotted in decibel scale, i.e. ωj
true versus 10log10(ITj)
spectrum
true
spectrum
true
spectrum
2.2 Time Series Analysis
In the time domain, the observed time series can be thought of as the
product of the infinite series and a data window
⎧1 if 1 ≤ t ≤ T
ht = ⎨ whose Fourier transform is H T (ω )
⎩0 otherwise
To reduce the variance leakage, this window is oft replaced by one of the
following tapers
Costs to be paid:
• While the contamination of the periodogram from remote frequencies is
reduced, information from adjacent frequencies tends to be smeared ‘together’
since smooth tapers have HT with wider central peaks
• While the asymptotical properties of the periodogram still hold, larger samples
are needed to achieve distributional approximations of the same quantity when
the data are tapered
2.2 Time Series Analysis
The estimator can be made consistent and asymptotically unbiased when both
m and M increase with increasing sample length
⎧ Γ(0) 2
⎪ m χ ( m) j=2
⎪ Γ(ω )
ˆΓ(ω j ) = 1 ∑ I Tjl ~ ⎪⎨
m
j
χ 2 ( 2m) 1 ≤ j ≤ the largest integer in ( M − 1) / 2
m l =1 ⎪ 2m
⎪ Γ(1 / 2) χ 2 (m) j=
M
if M is even
⎪⎩ m 2
Since asymptotically
2mΓˆ (ω j )
~ χ 2 ( 2 m)
Γ(ω j )
one has
⎛ 2mΓˆ (ω j ) ⎞ ⎛ 2mΓˆ (ω j ) 2mΓˆ (ω j ) ⎞
p = P⎜ a ≤
~ ≤ b ⎟ = P⎜ ≤ Γ(ω j ) ≤ ⎟
⎜ Γ (ω ) ⎟ ⎜ b a ⎟
⎝ j ⎠ ⎝ ⎠
~ ~
where a and b are the (1 − p ) / 2 and (1 + p ) / 2 critical values of the χ 2 (2m) distribution, or
using the log representation
⎛ 2m ⎞ ⎛ 2m ⎞
log⎜ ⎟ + log(Γˆ (ω j )) ≤ log(Γ(ω j )) ≤ log⎜ ⎟ + log(Γˆ (ω j ))
⎝ b ⎠ ⎝ a ⎠
When n is small relative to T and when the spectral density function is smooth enough so that it is
roughly constant in every frequency interval of the length n/T , the Daniell estimator has the
following properties
( )
1. E Γˆ (ω j ) ≈ Γ(ω j )
bandwidth
( )
2. Var Γˆ (ω j ) ≈ (Γ(ω j ) )
1
n
2
⎧ n− | j − k |
( ) ⎪
3. Cov Γˆ (ω j ), Γˆ (ω k ) ≈ ⎨ n2
Γ(ω j )Γ(ω k ), | j − k |≤ n
⎪⎩ 0 otherwise
Γ(ω j ) 2
4. Γˆ (ω j ) ~ χ ( 2 n)
2n
The last property allows the construction of asymptotic confidence intervals. The critical values are
obtained as in the case of the chunk estimator by replacing m by n.
2.2 Time Series Analysis
Periodogram
2.2 Time Series Analysis
∑w
− 2πiω jτ
Γˆ (ω j ) = D (τ ; n, T )c(τ )e ,
τ = − (T −1)
Proof
1 j + ( n −1) / 2
Γˆ (ω j ) = ∑ ITk
n k = j −( n −1) / 2
1 j + ( n −1) / 2 τ =T −1
= ∑ ∑ c(τ )e − 2πiω kτ
n k = j −( n −1) / 2 τ = − (T −1)
τ =T −1
1 j + ( n −1) / 2 − 2πi (ω k −ω j )τ
∑ c(τ )e ∑ e
− 2πiω jτ
=
τ = − (T −1) n k = j −( n −1) / 2
τ =T −1
∑ c(τ )e
− 2πiω jτ
= wD (τ ; n, T )
τ = − (T −1)
with
1 j + ( n −1) / 2 − 2πi (ω k −ω j )τ
wD (τ ; n, T ) = ∑ e
n k = j −( n −1) / 2
n / 2T
T
≈ ∫ e − 2πiωτ dω
n − n / 2T
sin(π nτ / T )
=
π nτ / T
2.2 Time Series Analysis
∑WD (ω k − ω j ; n, T ) ITj = ∑w
− 2πiω jτ
Γˆ (ω j ) = D (τ ; n, T )c(τ )e
k =− q τ = − (T −1)
⎨ ⎨ ⎜ ⎟ ⎜ ⎟
Window ⎩ 0 otherwise T ⎝ πω M ⎠ 4T ⎝ πωM / 2 ⎠
⎩ 0 otherwise
where m is the number of chunks used by the chunk estimator, M is either the length of the chunk estimator or the
cutoff point of the Bartlett or Parzen lag windows, T is the length of the time series and n is the number of periodogram
ordinates that are averaged to produce the Daniell estimator. * indicates that the window is applied to the average of
estimators of auto-covariance function or spectrum computed from the individual chunks.
2.2 Time Series Analysis
∑WD (ω k − ω j ; n, T ) ITj = ∑w
− 2πiω jτ
Γˆ (ω j ) = D (τ ; n, T )c(τ )e
k =− q τ = − (T −1)
Chunk Chunk
Bartlett Daniell
Parzen Bartlett
Daniell Parzen
2.2 Time Series Analysis
The problem:
Different from the Daniell estimator which places equal weight on a fixed number of
periodogram ordinates, the Bartlett and Parzen estimator do not weight the
periodogram ordinates equally. Consequently, the properties of the periodogram,
i.e. asymptotical independent and identically χ2(2n) distributed, cannot be directly
applied to the Bartlett and Parzen estimators to determine their bandwidth and
degrees of freedom.
The solution:
• The equivalent degrees of freedom r is found by matching the asymptotical mean
and variance of the spectral estimator with the mean and variance of a χ2 random
variable
• The equivalent bandwidth is r/2T
• Once the equivalent degrees of freedom is determined, confidence intervals can be
computed as described earlier
2.2 Time Series Analysis
Recommendation:
a smoothed
periodogram
estimator should
be used, with a
slight preference
for the Daniell and
Parzen estimators
over Bartlett
estimator.
2.2 Time Series Analysis
•Variance leakage: the contamination of the spectral estimate by contributions from periodogram
ordinates at frequencies far remoted from the frequency of interests. This problem is particularly
severe for the Bartlett estimator, and is correctly in the Parzen estimator whose spectral window
has no side lobes
• The Parzen estimator has somewhat lower variance than the Bartlett estimator for the same lag
cutoff, since its spectral window has a wider central peak and thus larger bandwidth
• For the same reason, the Parzen estimator has somewhat more bias
The Estimator:
Let (x1,…,xT) and (y1,…,yT) represent realizations of two ergodic weakly stationary
processes {Xt} and {Yt} at T consecutive times, (x1’,…,xT’) and (y1’,…,yT’) the time
series of deviations from the sample means. The estimators of the cross-covariance
and cross-correlation functions are
⎧ 1 T −τ
⎪ T ∑ x't y 't +τ τ ≥ 0
⎪ t =T1
⎪1
c xy (τ ) = ⎨ ∑ x't y 't +τ τ < 0
⎪ T t =1+|τ |
⎪0 | τ |≥ T
⎪⎩
c xy (τ )
rxy (τ ) =
(c xx (0)c yy (0))1/ 2 The types of problems that
occur when estimating the
auto-correlation function
also occur when estimating
the cross-correlation
function
2.2 Time Series Analysis
• The cross-periodogram has the same properties as the periodogram, i.e. its
variability cannot be reduced taking larger and larger samples
The Idea:
• Assume that the process is ergodic and weakly stationary
• fit an AR model of some order p which is chosen either objectively by means of a
criterion or subjectively
• estimate the spectrum with that of the fitted AR process described by the
estimated process parameters and the estimated noise variance
Advantages:
•An AR model can provide a dynamical interpretation
• the spectral estimates are generally smoother than those made by smoothed
periodogram estimators
2.2 Time Series Analysis
∫ ln(Γˆ (ω )) dω
−1 / 2
∫ Γˆ (ω )e
2πiωτ
dω = c(τ )
−1 / 2
for τ=0,…,M.