#' fun_Lag_list
#'
#' @param listData List with volatility adjusted excess return
#' @param lag number of lags between period
#'
#' @return List with excess return adjusted for volatility and with ags
#'
#' @export
#'
fun_Lag_list <- function(listData, lag) {
out.list <- lapply(listData, function(x) {
nameVol = as.numeric(c(rep(NA, lag), x[-c((nrow(x) - lag + 1):nrow(x)), "exReVol"]))
nameSign = sign(nameVol)
out <- cbind(x, nameVol, nameSign)
colnames(out) <- c(colnames(x), paste0("exReVol_", lag),
paste0("exReVol_sign", lag))
return(out)
})
return(out.list)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.