  The semiparametric factor model serves as a vital tool to describe the
dependence patterns in the data. It recognizes that the common features
observed in the data are actually explained by functions of specific exogenous
variables.Unlike traditional factor models, where the focus is on selecting the
number of factors, our objective here is to identify the appropriate number of
common functions, a crucial parameter in this model. In this paper, we develop
a novel data-driven method to determine the number of functional factors using
cross validation (CV). Our proposed method employs a two-step CV process that
ensures the orthogonality of functional factors, which we refer to as
Functional Twice Cross-Validation (FTCV). Extensive simulations demonstrate
that FTCV accurately selects the number of common functions and outperforms
existing methods in most cases.Furthermore, by specifying market volatility as
the exogenous force, we provide real data examples that illustrate the
interpretability of selected common functions in characterizing the influence
on U.S. Treasury Yields and the cross correlations between Dow30 returns.
