diff --git a/NAMESPACE b/NAMESPACE index b94daf1..60e9361 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -67,7 +67,6 @@ S3method(print,portfolio.list) S3method(print,regime.portfolios) S3method(print,summary.optimize.portfolio) S3method(print,summary.optimize.portfolio.rebalancing) -S3method(scale,range) S3method(summary,efficient.frontier) S3method(summary,optimize.portfolio) S3method(summary,optimize.portfolio.parallel) diff --git a/R/ac_ranking.R b/R/ac_ranking.R index e4078f4..89f60ae 100644 --- a/R/ac_ranking.R +++ b/R/ac_ranking.R @@ -38,7 +38,7 @@ ac.ranking <- function(R, order, ...){ max.value <- median(colMeans(R)) } # Compute the scaled centroid - c_hat <- scale.range(centroid(nassets), max.value) + c_hat <- scale_range(centroid(nassets), max.value) # Here we reorder the vector such that the highest centroid value is assigned # to the asset index with the highest expected return and so on and so forth @@ -69,8 +69,7 @@ centroid <- function(n){ # What is a valid value for max.value? # - by default we use the median of the asset mean returns -#' @export -scale.range <- function(x, max.value){ +scale_range <- function(x, max.value){ new.max <- 0.05 new.min <- -new.max old.range <- max(x) - min(x)