This paper develops new methods for determining the cointegration rank in a nonstationary fractionally integrated system, extending univariate optimal methods for testing the degree of integration. We propose a simple wald test based on the singular value decomposition of the unrestricted estimate of the long run multiplier matrix. When the “strength” of the cointegrating relationship is less than 1/2, the test statistic has a standard asymptotic distribution, like lagrange multiplier tests exploiting local properties. We consider the behavior of our test under estimation of short run parameters and local alternatives. We compare our procedure with other cointegration tests based on different principles and find that the new method has better properties in a range of situations by using information on the alternative obtained through a preliminary estimate of the cointegration strength.