R/residualsewmaVol.R

#' @title residuals.ewmavol()
#' 
#' @author Eric Zivot
#' 
#' @description
#' residuals.ewmavol()
#' 
#' @param object object
#' @param standardize standardize=FALSE
#' 
#' @return
#' object$returns/object$sigma
#' 
#' @examples
#' \dontrun{
#' residuals.ewmavol(r)
#' }
#' 
#' @export residuals.ewmaVol
residuals.ewmaVol <- function(object, standardize=FALSE) {
  if (!standardize) {
    return(object$returns)
  } else {
    return(object$returns/object$sigma)
  }
}

Try the MFTSR package in your browser

Any scripts or data that you put into this service are public.

MFTSR documentation built on May 2, 2019, 5:26 p.m.