Skip to main content

get_factor_stats

Calculate factor weights (n_components, symbols) based on PCA, intercepts and betas based on estimator.
It must be applied to the train set.
Parameters: Returns:

get_eigenportfolio_residuals

Calculate residuals by regressing asset returns on eigenportfolio returns. Parameters: Returns:

fit_factor_model

Fit model to asset returns by extracting risk-adjusted eigenvectors using PCA and applying to the returns data.
It must be applied to the train set.
Parameters: Returns:

predict_factor_model

Predict residuals for the test set by applying the trained model on the returns and factor weights. Parameters: Returns:

residuals

Compute residual returns using PCA and regression, separating training and test data. Parameters: Returns:

residuals_cv

Cross-validation wrapper to apply residuals decomposition split-wise. Parameters: Returns: