Learn R Programming

TVMVP (version 1.0.5)

residuals: Estimate Residuals from Factor Model

Description

This function estimates the residuals of asset returns after removing the effect of factor-driven returns.

Usage

residuals(factors, loadings_list, returns)

Value

A matrix of residuals where each row corresponds to a time period and each column corresponds to an asset.

Arguments

factors

A matrix containing the step-ahead-factors of from the localPCA function.

loadings_list

A list where each element is a matrix of loadings corresponding to the factors for each time period.

returns

A matrix of asset returns with rows representing time periods and columns representing assets.

Details

For each time period \(t\), the function models the asset returns as: $$R_t = F_t \Lambda_t + \epsilon_t$$ where \(R_t\) is the vector of asset returns, \(F_t\) is the t'th row of the factor matrix, \(\Lambda_t\) is the loadings matrix, and \(\epsilon_t\) represents the residuals.

The residuals are computed as the difference between actual returns and the modeled returns.