View source: R/ecd-ts-lag-stats-method.R
ecd.ts_lag_stats | R Documentation |
Lag statistics on log returns are added to the xts attributes. It takes
a vector of lags and calculates the mean, stdev, var, skewness, and kurtosis
for cumulative log returns of each lag. The data is stored as a list of vectors
under lagstats
attribute. Be aware this function uses multicore lapply.
ecd.ts_lag_stats(ts = "dji", lags, absolute = FALSE)
ts |
the xts object from sample data. The ts must have the logr column. If a string is given, it will be replaced with sample data of the symbol. |
lags |
a numeric vector of integers greater than 0. |
absolute |
logical, if |
The xts object containing lagstats
attribute
## Not run: dji <- ecd.ts_lag_stats(ecd.data("dji"), 2) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.