#' Calculate linear returns for a matrix
#'
#' @param priceMatrix is an xts price matrix
#'
#' @return a linear return xts matrix
#'
#' @examples
#' none
#'
#' @export
retMatrixL<-function(priceMatrix)
{
LReturns <- lapply( X=priceMatrix
, FUN=retVectorL
)
LReturns <- do.call(merge, LReturns)
return(LReturns)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.