Skip to content

Commit

Permalink
rename scale.range to scale_range
Browse files Browse the repository at this point in the history
  • Loading branch information
xinran1228 committed Jul 1, 2024
1 parent 575a6c0 commit 2afa3e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 2 additions & 3 deletions R/ac_ranking.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 2afa3e5

Please sign in to comment.