ammasjk / unitroot

Java library for testing unitroot and cointegration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unitroot

A Java library implementing the Augmented Dickey-Fuller (ADF) test to check for unit roots.

The core implementation is a port of the Fortran code referenced in:

James G. MacKinnon, "Numerical Distribution Functions for Unit Root and Cointegration Tests", Journal of Applied Econometrics, Vol. 11, No. 6, 1996, pp. 601-618.

The Fortran source code is available here http://qed.econ.queensu.ca/pub/faculty/mackinnon/numdist/.

The results produced by this Java port match the values generated by the program urcdist.exe for the inputs described in the paper. The values match the Fortran output values to 3 decimal places and up to 4 decimals places in some cases. This is a rather basic validation of the port. It is your responsibility to validate this more extensively if you are planning to use this implementation in any critical applications.

The Java files corresponding to the port are available in the package io.datanapis.unitroot.distribution. The distribution data which the implementation relies on is in the resources folder.

For ease of use, this version is wrapped in a simpler to use API - UnitRootEvaluator. However, this wrapper only provides an API to test for unit root. The core implementation can test for both unit roots and cointegration for up to 12 series. The core implementation can also calculate critical-value for a given confidence level.

The wrapper API and implementation is ported from the R-package fUnitRoots. Specifically, it is a port of the function unitrootTest.

About

Java library for testing unitroot and cointegration

License:Apache License 2.0


Languages

Language:Java 100.0%