R/active_premium.R

Defines functions premium.active

Documented in premium.active

#' @title Active Premium
#' @description Calculates the active premium
#' @param R1 Returns of Portfolio as xts
#' @param R2 Risk Free Return as xts
#' @examples
#' premium.active(funds$ret1, funds$rfr)
#' @return Calculates the active premium of the portfolio
#' @import xts
#' @import zoo
#' @rdname premium.active
#' @export
premium.active = function(R1, R2){
  active_premium = returns.cal(R1) - returns.cal(R2)
  active_premium
}

Try the rportfolio package in your browser

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

rportfolio documentation built on July 1, 2020, 10:35 p.m.