R/calculate_sd.R

Defines functions calculate_sd

Documented in calculate_sd

#' @title calculate_sd
#' @description A minimal PerformanceAnalytics::StdDev().
#' @param rets_xts xts, an xts of returns
#' @return A matrix of standard deviations.
#' @export 
#' @importFrom stats sd
calculate_sd <- function(rets_xts)
{
  apply(rets_xts, 2, stats::sd) %>% t %>% `rownames<-`('StdDev')
}
causality-loop/clhelpers documentation built on Aug. 31, 2022, 3:39 a.m.