In this paper we present a generalized dynamic factor model for a vector of time series which seems to provide a general framework to incorporate all the common information included in a collection of variables. The common dynamic structure is explained through a set of common factors, which may be stationary or nonstationary, as in the case of cornmon trends. AIso, it may exist a specific structure for each variable. Identification of the nonstationary I(d) factors is made through the cornmon eigenstructure of the generalized covariance matrices, properly normalized. The number of common trends, or in general I(d) factors, is the number of nonzero eigenvalues of the above matrices. It is also proved that these nonzero eigenvalues are strictIy greater than zero almost sure. Randomness appears in the eigenvalues as well as the eigenvectors, but not on the subspace spanned by the eigenvectors