Description Usage Arguments Value
This function is useful to explore the correlation of returns within a time series. A price series is given, and returns are calculated for the specified periods. Higher moments of returns are also calculated up to the quintic returns (power of 5). Autocorrelations and cross-correlations are then computed and plotted.
1 2 | acf_highmoments(prices, on = c("days", "weeks", "months"),
moments = c(1, 2, 3, 4, 5))
|
prices |
An xts of prices for the asset under analysis. Only the first column is used. |
on |
A character vector specifying the return granularity to calculate. Valid granularities include any or all of: "days", "weeks" and "months". |
moments |
Specifies which moments of returns to calculate. The autocorrelations and cross-correlations will be performed for all permutations. |
No value is explicitly returned, but several plots are generated using the acf function from the stats package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.