We use a panel cointegration model with multiple time- varying individual effects to control for the missing factors in the credit spread puzzle. Our model specification enables as to capture the unobserved dynamics of the systematic risk premia in the bond market. In order to estimate the dimensionality of the hidden risk factors jointly with the model parameters, we rely on a modified version of the iterated least squares method proposed by Bai, Kao, and Ng (2009). Our result confirms the presence of four common risk components affecting the U.S. corporate bonds during the period between September 2006 and March 2008. However, one single risk factor is sufficient to describe the data for all time periods prior to mid July 2007 when the subprime crisis was detected in the financial market. The dimensionality of the unobserved risk components therefore seems to reflect the degree of difficulty to diversify the individual bond risks.