plot-stars: Stars Plots of Assets.

Description Usage Arguments Details Author(s) References Examples

Description

Displays star plots to compare assets sets.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
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.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## LPP2005REC -
   # Load Swiss Pension Fund Data:
   LPP <- LPP2005REC
   head(LPP) 

## assetsBasicStatsPlot - 
   # Create a basic Stats Plot: assetsBasicStatsPlot -
   # par(mfrow = c(1, 1))
   assetsBasicStatsPlot(LPP, title = "", description = "")
   
## assetsMomentsPlot -
   # Create a Moments Plot: assetsMomentsPlot -
   assetsMomentsPlot(LPP, title = "", description = "")
   
## assetsBoxStatsPlot - 
   # Create a Box Stats Plot: assetsBoxStatsPlot -
   assetsBoxStatsPlot(LPP, title = "", description = "")

## assetsNIGFitPlot - 
   # Create a NIG Fit Plot: assetsNIGFitPlot -
   assetsNIGFitPlot(LPP[, 7:9], title = "", description = "")

Example output

Loading required package: timeDate
Loading required package: timeSeries
Loading required package: fBasics


Rmetrics Package fBasics
Analysing Markets and calculating Basic Statistics
Copyright (C) 2005-2014 Rmetrics Association Zurich
Educational Software for Financial Engineering and Computational Science
Rmetrics is free software and comes with ABSOLUTELY NO WARRANTY.
https://www.rmetrics.org --- Mail to: info@rmetrics.org


Rmetrics Package fAssets
Analysing and Modeling Financial Assets
Copyright (C) 2005-2014 Rmetrics Association Zurich
Educational Software for Financial Engineering and Computational Science
Rmetrics is free software and comes with ABSOLUTELY NO WARRANTY.
https://www.rmetrics.org --- Mail to: info@rmetrics.org
GMT
                    SBI          SPI          SII          LMI         MPI
2005-11-01 -0.000612745  0.008414595 -0.003190926 -0.001108882 0.001548062
2005-11-02 -0.002762009  0.002519342 -0.004117638 -0.001175939 0.000342876
2005-11-03 -0.001153092  0.012707292 -0.005209409 -0.000992456 0.010502959
2005-11-04 -0.003235750 -0.000702757 -0.001127165 -0.001198528 0.011679558
2005-11-07  0.001310970  0.006205226 -0.001795839  0.000360366 0.002709618
2005-11-08  0.000539312  0.000329260  0.002103374  0.002327040 0.000346843
                    ALT        LPP25        LPP40        LPP60
2005-11-01 -0.002572971 -0.000130008  0.000199980  0.000809672
2005-11-02 -0.001141604 -0.001561421 -0.001120404 -0.000469730
2005-11-03  0.005007442  0.001541418  0.003317548  0.005731589
2005-11-04  0.009482677  0.000439969  0.002421248  0.004838735
2005-11-07  0.004723952  0.001638182  0.002246611  0.003012363
2005-11-08  0.000853619  0.001087309  0.000962708  0.000828043
Warning messages:
1: In sqrt(diag(fit$cvar)) : NaNs produced
2: In sqrt(diag(fit$cvar)) : NaNs produced
3: In sqrt(diag(fit$cvar)) : NaNs produced

fAssets documentation built on Nov. 17, 2017, 2:12 p.m.

Related to plot-stars in fAssets...