- Notifications
You must be signed in to change notification settings - Fork0
Corbae-Ouliaris Frequency Domain Filtering
License
cadam00/corbouli
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Corbae and Ouliaris (2006) Frequency Domain Filter in R
The official(CRAN) version of the package can beinstalled using
install.packages("corbouli")Alternatively, the development version of the package can be installed via
if (!require(remotes)) install.packages("remotes")remotes::install_github("cadam00/corbouli")
To cite the official(CRAN) version of thepackage, please use
Adam, C. (2025). corbouli: Corbae-Ouliaris Frequency DomainFiltering. R package version 0.1.5. doi:10.32614/CRAN.package.corbouli
Alternatively, to cite the latest development version, please use:
Adam, C. (2025). corbouli: Corbae-Ouliaris Frequency DomainFiltering. (v0.1.5). Zenodo. doi:10.5281/zenodo.13740089
Corbae and Ouliaris (2006) FrequencyDomain Filter is used for extracting cycles from either both on stationary andnon-stationary time series. This is one approximation of the ideal band passfilter of the series. The result is close to the one of the Baxter-King(1999) filter, but end-points are directly estimated and sofacing the end-point issue is not faced.
The main idea of this filtering algorithm is illustratedin Fig.1 and2. The main idea of the DFTSEsubroutine is shown in Fig.1, where DFT (DiscreteFourier Transform) of the times series, then frequencies lower and higherby periods of oscillation thresholds are assigned to zero and finally IDFT(Inverse Discrete Fourier Transform) are performed. Additional implementationdetails of this subroutine can be found at source code of the functioncorbouli::dftse.
Fig. 1: DFTSE subroutine.
The final algorithm is described in Fig.2,where filtered series is the residuals of the regression of
Fig. 2: Corbae-Ouliaris main algorithm.
The minimum and the maximum periods of oscillation should be determined whenusing this method, so as to irrelevant to filtering frequencies are removed.As an example from Shaw (1947), a business cycle usually hasa lower period of 1.5 years and a higher period of 8 years. This information canbe used while for filtering as expressed from the followingTable1.
| Sample Frequency | Lower | Higher |
| Month | 18 | 96 |
| Quarter | 6 | 32 |
| Year | 2 | 8 |
Table 1: Lower and higher periods of oscillation.
The same table in fragments of
| Sample Frequency | Lower | Higher |
| Month | 0.0208 | 0.1111 |
| Quarter | 0.0625 | 0.3333 |
| Year | 0.25 | 1 |
Table 2: Low and high frequency in fragments of
The longer the series, the more the long run frequency is expressed by alower frequency as fragment of
For this example, the quarterly US GDP in billions of chained 2017 dollars(Seasonally adjusted) will be used.
# Import package to workspacelibrary(corbouli)# Import "USgdp" datasetdata(USgdp)plot(USgdp,main="Quarterly US GDP in billions of chained 2017 dollars(Seasonally adjusted)",ylab="",lwd=2)
Fig. 3: USgdp dataset.
# Extract cyclesco<- corbae_ouliaris(USgdp,low_freq=0.0625,high_freq=0.3333)# Plot cycles of filtered seriesplot(co,main="Corbae-Ouliaris FD Filter cycles for USgdp",ylab="",lwd=2)
Fig. 4: Corbae-Ouliaris FD Filter cycles.
# Plot real data with the ones after removing cycles# Removing cycles from original dataUSgdp_rmco<-USgdp-co# Plot Original vs Decycled dataplot(USgdp,main="Quarterly US GDP in billions of chained 2017 dollars(Seasonally adjusted)",col="black",lwd=2,ylab="")lines(USgdp_rmco,col= adjustcolor("red",alpha.f=0.7),lwd=2)legend(x="topleft",lwd=2,text.font=2,col= adjustcolor(c("black","red"),alpha.f=0.7),legend=c("Original data","Decycled data"))
Fig. 5: Original vs Decycled USgdp data.
As noted by Ouliaris (2009), for settinghigh_freq = 1the output gap series than business cycle one will have higher volatility (Fig.6).
# Extract output gapog<- corbae_ouliaris(USgdp,low_freq=0.0625,high_freq=1)# Plot Business cycle vs Output gapplot(co,main="Business cycle vs Output gap for USgdp",col= adjustcolor("blue",alpha.f=0.7),lwd=2,ylab="")lines(og,col= adjustcolor("orange",alpha.f=0.7),lwd=2)legend(x="bottomleft",lwd=2,text.font=2,col= adjustcolor(c("blue","orange"),alpha.f=0.7),legend=c("Business cycle","Output gap"))
Fig. 6: Business cycle vs Output gap.
Baxter, M., & King, R. (1999),Measuring Business Cycles: Approximate Band-Pass Filters for Economic TimeSeries.Review of Economics and Statistics81(4), pp.575-593.
Corbae, D., Ouliaris, S., & Phillips, P. (2002), Band Spectral Regression withTrending-Data.Econometrica70(3), pp. 1067-1109.
Corbae, D. & Ouliaris, S. (2006),Extracting Cycles from Nonstationary Data,in Corbae D., Durlauf S.N.,& Hansen B.E. (eds.).Econometric Theory and Practice: Frontiers ofAnalysis and Applied Research. Cambridge: Cambridge University Press, pp.167–177.doi:10.1017/CBO9781139164863.008
Ouliaris, S. (2009),Ideal Band PassFilter For Stationary/Non-Stationary Series.
Pérez Pérez, J. (2011),COULIARI: Statamodule to implement Corbae-Ouliaris frequency domain filter to time seriesdata.Statistical Software Components, S457218, Boston CollegeDepartment of Economics.
Shaw, E.S. (1947),Burns and Mitchell onBusiness Cycles.Journal of Political Economy,55(4):pp. 281-298.doi:10.1086/256533
About
Corbae-Ouliaris Frequency Domain Filtering
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.





