Compute the centroid for expressing views on the relative ranking of assets within sectors.
centroid.sectors(sectors, simulations = 1000)
a list where each list element contains the order of each asset in the given sector
number of simulations
the centroid vector
# NOT RUN { # Express a view on the assets in two sectors # Sector 1 View: R_2 < R_1 < R_3 # Sector 2 View: R_5 < R_4 x <- list() x[[1]] <- c(2, 1, 3) x[[2]] <- c(5, 4) centroid.sectors(x) # }
Run the code above in your browser using DataLab