Frequency Domain
Semester 2 2021
©Fidelio Statistical Services Frequency Domain Semester 2 2021 1 / 21
Time domain and Frequency Domain
Up to now we have done analyse in the time domain. That is, uur x-axis is time
In the frequency domain our x-axis is frequency
Useful for long series, or series were you can set how often you measure e.g. engineering, physics, medicine
Not often used for social or economic time series, though a good way to think about your time series
Consider simple unobserved components model Ct + St + It St is stuff with annual frequency – cycles over a year
Ct could be considered all stuff with cycles (frequency) greater than annual. That is, long-term effects
It is stuff with frequency less than annual. Short term effects
©Fidelio Statistical Services Frequency Domain Semester 2 2021 2 / 21
So How Do We Work in the Frequency Domain?
Consider seasonal component St, which I have commented is really a nuisance term in most social and economic time series.
What if we could pass our series through a black box (aka a piece of software) that could split series into bit with seasonal frequency and the rest? We could see whether there is a significant seasonal component.
Also useful to compare the original series with the series where we have modelled and removed the seasonal pattern
So how does it work?
©Fidelio Statistical Services Frequency Domain Semester 2 2021 3 / 21
So why frequency domain rather than time domain?
A function of one dimension can be “transformed” to that of another domain and sometimes this makes analysis or representation easier.
A function of time f ({Xt }) can be transformed to a function of “frequency” f (w ) where w is related to 1t
e.g {Xt} = αsin(w0t) can be represented by a “sine function” in the time domain but just w0 and α in the frequency domain where a number w is considered to be of the form sin(wt)
©Fidelio Statistical Services Frequency Domain Semester 2 2021 4 / 21
In the time domain
©Fidelio Statistical Services Frequency Domain Semester 2 2021 5 / 21
In the Frequency domain
©Fidelio Statistical Services Frequency Domain Semester 2 2021 6 / 21
In the Frequency domain
©Fidelio Statistical Services Frequency Domain Semester 2 2021 7 / 21
Fourier Analysis
The key to being able to work in the frequency domain is Fourier Analysis. Named for – and is an example of Stigler’s Law – who claimed that any time series can be exactly represented as an infinite sum of sine and cosine waves.
This includes even square waves!
Of course, infinity is a big number, but we are used to dealing with theory that is asymptotically true, but we can get a useful approximation well before we approach infinity
©Fidelio Statistical Services Frequency Domain Semester 2 2021 8 / 21
Building a Square Wave From Three
©Fidelio Statistical Services Frequency Domain Semester 2 2021 9 / 21
Three
©Fidelio Statistical Services Frequency Domain Semester 2 2021 10 / 21
Four
©Fidelio Statistical Services Frequency Domain Semester 2 2021 11 / 21
Ten
©Fidelio Statistical Services Frequency Domain Semester 2 2021 12 / 21
Forty
©Fidelio Statistical Services Frequency Domain Semester 2 2021 13 / 21
One Hundred
©Fidelio Statistical Services Frequency Domain Semester 2 2021 14 / 21
Three
So we can use sine waves to build any time series. Going from a time series to a frequency representation was tricky until we got computing power
Some general comments
Each sine wave has an amplitude and frequency
In general terms you need five cycles of any frequency to be able to put it into our Fourier analysis e.g. a 20-year cycle requires 100 years of data
Low amplitude waves are contributing little.
Large amplitude waves will be seen in spectrum
A time series with periodic DGP components has a series of lines in the spectrum
As usual, noise adds to complexity
©Fidelio Statistical Services Frequency Domain Semester 2 2021 15 / 21
Noise has An Effect
©Fidelio Statistical Services Frequency Domain Semester 2 2021 16 / 21
How Does It Look With Time Domain Analysis?
©Fidelio Statistical Services Frequency Domain Semester 2 2021 17 / 21
Why We Call It White Noise
©Fidelio Statistical Services Frequency Domain Semester 2 2021 18 / 21
Time Series Analysis in the Frequency Domain
The “spectral distribution”, F(w) of a time series is the power in the signal up to frequency w.
F(π) contains all the power in the process and a scaled variance of the process
A periodic function have distinct peaks in the frequency domain. An aperiodic function gives a curve in frequency domain.
The spectrum of a time series is best found by taking the Fourier Transform of the acvf. The spectral distribution F(w) of a time series and its acvf c(k) is related by
π 0
c(k) =
cos(wk)dF(w)
©Fidelio Statistical Services Frequency Domain Semester 2 2021 19 / 21
Time Series Analysis in the Frequency Domain
Generally a time series has both periodic and aperiodic parts – we have noise
The spectral distribution F(w) of the times series is the power in the signal up to frequency w. If there is a periodic part, then there is a jump at that (those) frequencies. We see it by a spike in f (w ) around those frequencies.
©Fidelio Statistical Services Frequency Domain Semester 2 2021 20 / 21
So Why Am I Talking About This?
Frequency domain useful for thinking about components or the behaviour of components of the DGP
Periodogram useful if looking for specific frequencies e.g. seasonal, weekly, trading day
Used a lot in physics, engineering, medicine, etc.
A reminder that is helps to have a long series, so its long enough to have many cycles for those periodic components. For example, how long would you want a series to be able to characterise its seasonal variation?
How frequently you measure limits what high frequencies you can see. Measure every quarter and you won’t see monthly frequencies.
Also have problems with aliasing. This is where frequencies appear from measurement times
©Fidelio Statistical Services Frequency Domain Semester 2 2021 21 / 21