validate_MeanVar_portfolio {HDShOP}R Documentation

A validator for objects of class MeanVar_portfolio

Description

A validator for objects of class MeanVar_portfolio

Usage

validate_MeanVar_portfolio(w)

Arguments

w

Object of class MeanVar_portfolio.

Value

If the object passes all the checks, then w itself is returned, otherwise an error is thrown.

Examples

n<-3e2 # number of realizations
p<-.5*n # number of assets
gamma<-1

x <- matrix(data = rnorm(n*p), nrow = p, ncol = n)

# Simple MV portfolio
cov_mtrx <- Sigma_sample_estimator(x)
means <- rowMeans(x)

cust_port_simp <- new_MeanVar_portfolio(mean_vec=means,
                                        cov_mtrx=cov_mtrx, gamma=2)
str(validate_MeanVar_portfolio(cust_port_simp))

[Package HDShOP version 0.1.5 Index]