plot-pairs: Assets Pairs Plot

Description Usage Arguments Details Author(s) References Examples

Description

Display several aspects of correlation bettween pairs of assets.

Usage

1
2
3
4
5
6
assetsPairsPlot(x, ...)
assetsCorgramPlot(x,
    method = c("pie", "shade"), ...)
assetsCorTestPlot(x, ...)
assetsCorImagePlot(x, labels = TRUE, show = c("cor", "test"), 
    use = c("pearson", "kendall", "spearman"), abbreviate = 3, ...)

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.

labels

a logical flag, if TRUE then default labels will be used, otherwise the plots will be displayed without labels and the user can add his own labels.

method

a character string, the type of graph used in the lower panel.

show

a character string, what should be pressented, correlations or results from correlation tests?

use

a character string indicating which correlation coefficient or covariance is to be computed. One of "pearson", the default, "kendall", or "spearman".

abbreviate

allows to abbreviate strings to at least abbreviate characters, such that they remain unique, if they were.

...

optional arguments to be passed.

Details

assetsPairsPlot
displays pairs of scatterplots of individual assets,

assetsCorgramPlot
displays correlations between assets,

assetsCorTestPlot
displays and tests pairwise correlations,

assetsCorImagePlot
displays an image plot of a correlations.

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[, 1:6]
   head(LPP)   
   
## assetsPairsPlot -
   # Create Pairs Plot:  
   assetsPairsPlot(LPP)
  
## assetsCorgramPlot - 
   # Create Corellogram Plot:  
   assetsCorgramPlot(LPP, method = "pie")
   assetsCorgramPlot(LPP, method = "shade")
   
## assetsCorTestPlot - 
   # Create Correlation Test Plot: 
   assetsCorTestPlot(LPP)
   
## assetsCorImagePlot -
   # Create Correlation Image Plot: 
   assetsCorImagePlot(LPP)    

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
2005-11-01 -0.002572971
2005-11-02 -0.001141604
2005-11-03  0.005007442
2005-11-04  0.009482677
2005-11-07  0.004723952
2005-11-08  0.000853619

fAssets documentation built on Nov. 17, 2017, 4:22 a.m.