New answers tagged

0

Just add the k=6 to the endpoints() wrapper and use that function instead... optimize.portfolio.rebalancing2 = function (R, portfolio = NULL, constraints = NULL, objectives = NULL, optimize_method = c("DEoptim", "random", "ROI"), search_size = 20000, trace = FALSE, ..., rp = NULL, rebalance_on = NULL, training_period = NULL, ...


1

Check this out: library(quadprog) Dmat <- matrix(0,15,15) diag(Dmat) <- 1 dvec <- matrix(0,1,15) bvec <- c(-0.02269294, 0.07120749, -0.01830448, 0.04465172, 0.03508689, -0.0003176476, 0.01089419, 0.06466093, 0.01265293, -0.02748855, 0.04753743, -0.000408749, 0.03108376, -0.07378021, -0.0608137, 1, 0, 0, 0, ...


1

In theory, the Ledoit and Wolf shrinkage estimator is supposed to guarantee a positive-definite matrix, given that it adds a positive-definite matrix (the target) to a semi-positive one (the sample covariance). I can see four reasons why you didn't get a positive-definite matrix: Your true covariance is effectively not full rank, i..e you have perfect ...


Top 50 recent answers are included