assetsArrange {fAssets}R Documentation

Rearranging Assets Columnwise

Description

Allows to rearrange a set of assets columnwise.

Usage

assetsArrange(x, method = c("pca", "hclust", "abc"), ...)

Arguments

x any rectangular time series object which can be converted by the function as.matrix() into a matrix object, e.g. like an object of class timeSeries, data.frame, or mts.
method a character string, which method should be applied to reaarnage the assests? Either "pca" which arranges the columns by an eigenvalue decomposition, "hclust" which arrangtes the columns by hierarchical clustering, or "abc" which arrangtes the columns alphabetically.
... optional arguments to be passed.

Value

a character vector with the rearranged assets names.

Author(s)

Diethelm Wuertz for the Rmetrics port.

References

Wuertz, D., Chalabi, Y., Chen W., Ellis A. (2009); Portfolio Optimization with R/Rmetrics, Rmetrics eBook, Rmetrics Association and Finance Online, Zurich.

Examples

  
## lppData -
   lppData = as.timeSeries(data(LPP2005REC))
    
## assetsArrange -
   assetsArrange(lppData, "pca")
   assetsArrange(lppData, "hclust")
   assetsArrange(lppData, "abc")

[Package fAssets version 2100.77 Index]