Various ways of extracting macroeconomic information from a data-rich environment are compared with the objective of forecasting yield curves using the Nelson-Siegel model. Five issues in factor extraction are addressed, namely, selection of a subset of the available information, incorporation of the forecast objective in constructing factors, specification of a multivariate forecast objective, data grouping before constructing factors, and selection of the number of factors in a data-driven way. Our empirical results show that each of these features helps to improve forecast accuracy, especially for the shortest and longest maturities. The data-driven methods perform well in relatively volatile periods, when simpler models do not suffice.