TVMVP {TVMVP}R Documentation

Time Varying Minimum Variance Portfolio (TVMVP) Class

Description

This class implements a time-varying minimum variance portfolio using locally smoothed principal component analysis (PCA) to estimate the time-dependent covariance matrix.

This class provides a flexible interface to:

Looking for package description? See TVMVP-package.

Usage

# Initial object of class TVMVP
tv <- TVMVP$new()

# Set data
tv$set_data(returns) # Returns must be T times p matrix

# Determine number of factors
tv$determine_factors(max_m=10)

# Test for constant loadings
tv$hyptest()

# Estimate time-dependent covariance matrix
cov <- tv$time_varying_cov()

# Evaluate TVMVP performance on historical data
mvp_results <- tv$expanding_tvmvp(
                 initial_window = 60,
                 rebal_period   = 5,
                 max_factors    = 10,
                 return_type    = "daily")
                 
# Make out-of-sample prediction and compute weights
predictions <- tv$predict_portfolio(horizon=5,
                                   min_return = 0.01,
                                   max_SR = TRUE)
# Extract weights
predictions$getWeights("MVP")

#'

Arguments

data

T × p (time periods by assets) matrix of returns.

bandwidth

Numerical. Bandwidth parameter used for local smoothing in the local PCA

max_m

Integer. Maximum number of factors to be tested when determining the optimal number of factors.

optimal_m

The optimal number of factors to use in covariance estimation.

Methods

$new(data = NULL)

Initialize object of class TVMVP. Optionally pass returns matrix.

$set_data(data)

Set the data. Must be T × p (time periods by assets) matrix.

$get_data()

Get the data.

$set()

Manually set arguments of the object.

$determine_factors()

Determines optimal number of factors based on BIC-type information criterion.

$get_optimal_m{}

Prints optimal number of factors, optimal_m.

$get_IC_values()

Prints IC-values for the different number of factors tested using determine_factors.

$hyptest()

Hypothesis test of constant loadings.

$get_bootstrap()

Prints bootstrap test statistics from the hypothesis test.

$predict_portfolio()

Optimizes portfolio weights for out-of-sample prediction of portfolio performance.

$expanding_tvmvp()

Evaluates MVP performance in a expanding window framework.

$time_varying_cov()

Estimates the time-varying covariance matrix.

$silverman()

Silverman's rule of thumb bandwidth formula.


[Package TVMVP version 1.0.5 Index]