Learn R Programming

fAssets (version 3002.80)

starsPlot: Stars Plots of Assets.

Description

Displays star plots to compare assets sets.

Usage

assetsStarsPlot(x, method = c("segments", "stars"), locOffset = c(0, 0),
    keyOffset = c(0, 0), ...)
    
assetsBoxStatsPlot(x, par = TRUE, oma = c(0,0,0,0), mar = c(4, 4, 4, 4), 
    keyOffset = c(-0.65, -0.50), main = "Assets Statistics", 
    title = "Assets", titlePosition = c(3, 3.65), 
    description = "Box Plot Statistics", descriptionPosition = c(3, 3.50), ...)
assetsBasicStatsPlot(x, par = TRUE, oma = c(0,0,0,0), mar = c(4, 4, 4, 4), 
    keyOffset = c(-0.65, -0.50), main = "Assets Statistics", 
    title = "Assets", titlePosition = c(3, 3.65), 
    description = "Basic Returns Statistics", descriptionPosition = c(3, 3.50), ...)
assetsMomentsPlot(x, par = TRUE, oma = c(0,0,0,0), mar = c(4, 4, 4, 4), 
    keyOffset = c(-0.65, -0.50), main = "Assets Statistics", 
    title = "Assets", titlePosition = c(3, 3.65), 
    description = "Moments Statistics", descriptionPosition = c(3, 3.50), ...)
assetsNIGFitPlot(x, par = TRUE, oma = c(0,0,0,0), mar = c(4, 4, 4, 4), 
    keyOffset = c(-0.65, -0.50), main = "Assets Statistics", 
    title = "Assets", titlePosition = c(3, 3.65), 
    description = "NIG  Parameters", descriptionPosition = c(3, 3.50), ...)

Arguments

description
a destription string.
descriptionPosition
the position of the description string.
method
a character string from to select the plot method. Eiter a "star" or a "segment" plot.
keyOffset
a numeric vector of lenght two, specifying an offset in the legend with respect to x and y direction.
locOffset
a numeric vector of lenght two, specifying an offset in the location of the stars/circles with respect to x and y direction.
main
to set the main title.
mar
to set the number of lines of margin to be specified on the four sides of the plot. The default is c(5,4,4,2)+0.1.
oma
to set the size of the outer margins in lines of text.
par
a logical flag. Should be internal par() setting be used?
title
a character string, the plot title.
titlePosition
the position of the title string.
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.
...
optional arguments to be passed.

Details

assetsStarsPlot draws segment or star diagrams of data sets, assetsBasicStatsPlot displays a segment plot of box plot statistics, assetsMomentsPlot displays a segment plot of distribution moments, assetsBoxStatsPlot displays a segment plot of box plot statistics, assetsNIGFitPlot displays a segment plot NIG parameter estimates.

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
## LPP2005REC -
   LPP = as.timeSeries(data(LPP2005REC))

## assetsBasicStatsPlot -
   # par(mfrow = c(1, 1))
   assetsBasicStatsPlot(LPP, 
     title = "", description = "")
   
## assetsMomentsPlot -
   assetsMomentsPlot(LPP, 
     title = "", description = "")
   
## assetsBoxStatsPlot -
   assetsBoxStatsPlot(LPP, 
     title = "", description = "")

## assetsNIGFitPlot -
   assetsNIGFitPlot(LPP[, 7:9], 
     title = "", description = "")

Run the code above in your browser using DataLab