The APT is represented as a multivariate regression model with across-equations restrictions. Both observed and unobserved (latent) macroeconomic factors are included, thus generalizing and unifying two previous strands of literature. Large portfolios representing unobserved factors are treated as endogenous, and nonlinear 3SLS estimates are shown to differ sharply from estimates that ignore this endogeneity. Using monthly stock returns and six factors, we cannot reject January effects. The following results are invariant with respect to the inclusion of January effects: we reject the CAPM in favor of the APT; however, we cannot reject the APT restrictions on the linear factor model.