# Is there a way to “regularize” the Johansen cointegration test?

I'm using a Johansen cointegration test to check for cointegration among a large number of time series. I've found that while the eigenvectors look great in-sample, the cointegrating relationships often don't hold up out of sample. However, if I manually "regularize" the eigenvectors by setting the smaller weights to zero, then the OOS performance is much better.

Is there a more robust or principled way to perform this regularization?