Learn R Programming

fAssets (version 3002.80)

assetsTest: Testing Normality of Multivariate Asset Sets

Description

Tests if the returns of a set of assets are normally distributed.

Usage

assetsTest(x, method = c("shapiro", "energy"), Replicates = 100, 
    title = NULL, description = NULL)

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 allows to select the test. If method="shapiro" then Shapiro's multivariate Normality test will be applied as implemented in R's contributed package mvnormtest. If method="e
Replicates
an integer value, the number of bootstrap replicates, by default 100. This value is only used if method="energy".
title
a character string, assigning a title to an "fASSETS" object.
description
a character string, assigning a brief description to the returned object.

Value

  • returns an object of class fHTEST.

References

Rizzo M.L. (2002); A New Rotation Invariant Goodness-of-Fit Test, PhD dissertation, Bowling Green State University.

Szekely G.J., Rizzo, M.L. (2005); A New Test for Multivariate Normality, Journal of Multivariate Analysis 93, 58--80. Szekely G.J. (1989); Potential and Kinetic Energy in Statistics, Lecture Notes, Budapest Institute of Technology, TechnicalUniversity.

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
## LPP -
   LPP = as.timeSeries(data(LPP2005REC))[, 1:6]
   colnames(LPP)
   
   # Multivariate Shapiro Test:
   assetsTest(LPP, "shapiro")
   
   # Multivariate Energy Test:
   assetsTest(LPP, "energy")

Run the code above in your browser using DataLab