Learn R Programming

PerformanceAnalytics (version 2.0.8)

table.Autocorrelation: table for calculating the first six autocorrelation coefficients and significance

Description

Produces data table of autocorrelation coefficients \(\rho\) and corresponding Q(6)-statistic for each column in R.

Usage

table.Autocorrelation(R, digits = 4, max.lag = 6)

Arguments

R

an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns

digits

number of digits to round results to for display

max.lag

the maximum autocorrelation lag to include in the table

Author

Peter Carl

References

Lo, Andrew W. 2001. Risk Management for Hedge Funds: Introduction and Overview. SSRN eLibrary.

See Also

Examples

Run this code
 # CRAN does not allow examples to load suggested packages in one of its tests

data(managers)
t(table.Autocorrelation(managers))

result = t(table.Autocorrelation(managers[,1:8]))

textplot(result, rmar = 0.8, cmar = 2,  max.cex=.9, halign = "center", 
         valign = "top", row.valign="center", wrap.rownames=15, 
         wrap.colnames=10, mar = c(0,0,3,0)+0.1)
         
title(main="Autocorrelation")

Run the code above in your browser using DataLab