The site has moved. If you are not immediately redirected, you can
find the new site at
Download [web:reg] - Programs
[web:reg] Homepage

Here you will find and be able to download my econometric programs. Most of them are written in VBA and can be used as Excel-Add-Ins.

join my free newsletter

Hodrick-Prescott-Filter Excel Add-In (freeware and source code)

The Hodrick Prescott Filter (HP-Filter) is the most popular method to separate a time series into its components. Let's suppose that the original series $x_{t}$ is composed of a trend component MATH and a cyclical component MATH. Hodrick Prescott Filter


The HP-Filter isolates the cycle component by following minimization problem.


The first term is a measure of the fitness of the time series while the second term is a measure of the smoothness. There is a conflict between "goodness of fit" and "smoothness". To keep track of this problem there is a "trade-off"-parameter $\lambda $. Note that $\lambda $ is 0, the trend component becomes equivalent to the original series while $\lambda $ diverges to infinity, the trend component approaches a linear trend.

Solving the minimization problem is quite simple. This Excel Add-In decomposes a times series by the Hodrick Prescott Filter. To accelerate the computation the Add-In makes use of the penta-diagonal structure of the coefficient-matrix. So detrending a lot of data points is not a problem for this program.

Download Hodrick-Prescott Filter Add-In

TOP © 2004 Kurt Annen

Hodrick-Prescott-Filter for JAVA (freeware and source code)

There is also a JAVA-program to compute the Hodrick-Prescott-Filter. To use it you will need the JRE from SUN. To compile the source code you need also the JDK.

Download Hodrick-Prescott JAVA source code

Download Hodrick-Prescott JAVA application

TOP © 2004 Kurt Annen

Hodrick-Prescott-Filter for Octave/Matlab (freeware and source code)

This Matlab-files isolates the cycle component and returns the trend component. This version uses the optimized algorithm, this approach increases speed and perfomance. There is also an option to plot the filtered and original series.

Download Hodrick-Prescott Octave/Matlab source code

TOP © 2004 Kurt Annen

The Band-Pass-Filter Excel-Add-In (freeware and source code)

Band Pass Filter Excel Add-InThe Hodrick-Prescott Problem has a boundary value problem. To reduce this problem, Christiano and Fitzgerald suppose an approximation of an ideal band-pass-filter. I wrote an Excel Add In, which computes the cycle component of a time series using this approximation. This program only contains the default filter recommended in Christiano and Fitzgerald (1999).

You can read the original manuscript here:




Download Band-Pass Filter Excel Add-In

TOP © 2004 Kurt Annen

[WEB:REG] Correlogram Excel Add-In (freeware)


[web:reg] correlogram is a Microsoft Excel Add-In for estimating the autocorrelation and partial autocorrelation function of a time series.

When installed, [web:reg] correlogram adds a new menu item to Excel's main menu. Also included in [web:reg] correlogram are the Ljung-Box-Q Statistics and plotting the autocorrelation function (ACF) and the partial autocorrelation function (PACF) with standard error bounds.

ACF as well as PACF are very important tools for the Box-Jenkins-method. Box-Jenkins is a "methodology for identifying, estimating, and forecasting" ARMA models.

A documentation is also included.


[WEB:REG] Correlogram Excel Add-In

TOP © 2004 Kurt Annen

[WEB:REG] unit root test (ADF-test) Excel Add-In (freeware but you can sponsor me)

ADF Test

An augmented Dickey-Fuller test (ADF-Test) is a test for a unit-root in a time series sample.

I developed an unit root test (ADF-test) add in for Excel. Choose your time series and test it to stationarity. After you tested your time series you will get the results in a new worksheet (coefficients, t-ratio, Durbin Watson, log likelihood, Akaike information criterio (AIC), Scharz info criterio (SC),...).The calculation of the p-values and critical values follows James G. MacKinnon suggestion. Unfortunality Microsoft Excel is not very accurate in the calculation of an inverse matrix (first i thought there was a bug but then i found that it was Excel's fault). But please do not scared because the error is very small and i think you can accept it. You get also two new Excel functions. A function to calculate p-values and a function to calculate critical values using the interpolation technique of MacKinnon.

I have never found such a tool for Excel. So i believe i am the first one who developed the unit root test with calculating p-value and critical values for Excel.

A documentation is also included but if somebody wants to help me to write a better documentation I will be grateful.

[WEB:REG] unit root test (ADF-test) Excel Add-In

TOP © 2004 Kurt Annen

[WEB:REG] Nonlinear Least Squares Estimation (NLS) Excel Add-In (freeware but you can sponsor me)

ADF Test

Often econometrics want to estimate a nonlinear model. Sometimes it ist possible to transform a nonlinear model into a linear model, but sometimes it is not possible.

If transformation does not work the paramters of a model can not be estimated by OLS. There are no analytical solutions but there are numerical methods to estimate the model which are working well.

This Add-In uses the Solver Add-In to solve the model iterative. I think the Solver Add-In is a powerful tool to opimize a nonlinear System.

Neverless the Solver solves the model iterative. The solution may be the best but it can be that the estimation is a second best solution.

Note, etimation of lot of data points may be slow. (Depends on your computer)

A documentation is also included but if somebody wants to help me to write a better documentation I will be grateful.

[WEB:REG] Nonlinear Least Squares Estimation (NLS) Excel Add-In

TOP © 2004 Kurt Annen

[WEB:REG] ARMA Excel Add-In (freeware)

The determination of an appropriate ARIMA(p,q) model to represent an observed stationary time series involves a number of interrelated problems. These includes the choice of p and q, the coefficients and some other statistics.

In this Add-In an Excel function is included to estimate the coefficients of an ARMA(p,q) model (p is the order of autoregressive terms AR, q is the order of moving average term MA).

and useful statistics will be displayed. (std. errors, t-statistics, p-values, (adjusted) R-squared, SSR, Akaike information criterion, Schwartz criterion, Durbin Watson,...). The impulse response function, predictions and inverted MA/AR roots will also be computed.[web:reg] ARMA Add-In

To estimate the coefficient this tool uses a non linear estimation technique (Levenberg-Marquardt algorithm). Note that on the one hand estimation of non linear models is much more expensive then solving a model by OLS, on the other hand estimation is an approximation by numerical techniques. If moving average terms are included this [web:reg] ARMA back forecast the moving average terms. (Box and Jenkins: "Time series analysis: forecasting and control", 1976)

The output of the function is difficult for many persons to recognize. For this reason I integrated a VBA form. The input is simplified and the outputs is formatted and diagrams will be created.

There are also some time series functions included to transform a time series.

An example worksheet to estimate an ARMA(p,q) model and a documentation is also included.

[WEB:REG] ARMA Excel Add-In

TOP © 2005 Kurt Annen

[WEB:REG] unit root test (ADF augmented Dickey Fuller) DLL (BETA) 14 day trial

Many persons have asked me if there is a possibility to use the [web:reg] unit root test (ADF-test) Excel Add-In programmatically within VisualBasic. This is not possible but with the [web:reg] unit root DLL you could do it.

[web:reg] unit root DLL is a programmers' tool that lets you add the augmented Dickey Fuller test to your programs quickly and easily. You do not have to know anything about numerical methods to use the ADF test – just add it to your project like any other DLL and call its functions.

You could call the ADF test with manual lag length selection as well as with automatic lag length selection (Akaike, Schwarz, Hannan Quinn). P-Values and critical Values will be calculated based on MacKinnon 1996.
There are examples for VisualBasic and C++ included. Please note that this DLL is a 14 day trial and not freeware.


Some persons asked me if there is a MatLab code. I have no MatLab code but you could use the DLL with MatLab. In MatLab there is a function "loadlibrary" to call C functions from a DLL. You only need the DLL and the Header file, which is included in the zip-file. I have not tried it, but I think it will work.

[web:reg] unit root DLL (Beta)

TOP © 2005 Kurt Annen

Lastminute Kroatien