Looking for fast cointegration function in R

Viewed 33

I am looking for a cointegration function that can execute cointegration test faster than functions available in urca library.

Here is my test data from timeSeries package

library(timeSeries)
data = LPP2005REC
test_dt = data.table(data$MPI, data$SBI)

Here are the performance results of cointegration test using urca library.

library(urca)
microbenchmark::microbenchmark(
ca.po.pu = summary(urca::ca.po(test_dt, type = "Pu", demean = "trend", lag = "short"))@testreg$coefficients[2, 1],
ca.jo = urca::ca.jo(test_dt, type = "trace", ecdet = "trend", spec = "longrun", K = 2)@teststat[1],
times = 5)
Unit: milliseconds
     expr      min       lq      mean    median        uq       max neval cld
 ca.po.pu 9.105962 9.509942 10.777335 10.651319 11.219605 13.399847     5   b
    ca.jo 3.646501 3.959293  4.581624  4.926513  5.043406  5.332409     5  a 

I will appreciate it if someone can suggest a faster cointegration test function.

0 Answers
Related