eval_factors: Evaluate extracted factors against target returns

View source: R/eval_factors.R

eval_factorsR Documentation

Evaluate extracted factors against target returns

Description

Computes the two performance measures from He, Huang, Li, Zhou (2023), Section 2.4: Total adj-R^2 (Equation 19) and root-mean-squared pricing error (RMSPE, Equation 20).

Usage

eval_factors(ret, factors)

Arguments

ret

Numeric matrix or data frame (T x N) of excess returns for the target portfolios.

factors

Numeric matrix (T x K) of extracted factors, e.g. fit$factors from pca_est, pls_est, or rra_est.

Value

A named numeric vector with four elements:

RMSPE

Root-mean-squared pricing error (percent). Average over assets of the per-asset RMSE of R_{it} - \hat\beta_i' f_t (intercept excluded from the fitted value), as in Equation 20. Multiplied by 100 when ret is in decimal units.

TotalR2

Total adjusted R^2 (percent), as in Equation 19.

SR

Mean absolute alpha-to-residual-volatility ratio (Sharpe ratio of pricing errors).

A2R

Mean absolute alpha-to-mean-return ratio.

References

He, J., Huang, J., Li, F., and Zhou, G. (2023). Shrinking Factor Dimension: A Reduced-Rank Approach. Management Science, 69(9). \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1287/mnsc.2022.4563")}

Examples

set.seed(1)
ret <- matrix(rnorm(100 * 10) / 100, 100, 10)
X   <- matrix(rnorm(100 * 8), 100, 8)
fit <- pca_est(X = X, nfac = 3)
eval_factors(ret = ret, factors = fit$factors)

sdim documentation built on July 15, 2026, 1:10 a.m.