Learn R Programming

fAssets (version 3002.80)

assetsArrange: 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 hierar
...
optional arguments to be passed.

Value

  • a character vector with the rearranged assets names.

References

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

Examples

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

Run the code above in your browser using DataLab