diff --git a/DESCRIPTION b/DESCRIPTION index ab98e9fd..cfda6dea 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -38,13 +38,13 @@ Imports: RCurl, tseries, robustbase, - RobStatTM, - rugarch + RobStatTM Suggests: R.rsp, tinytest, corrplot, lmtest, + rugarch, strucchange, HH VignetteBuilder: R.rsp diff --git a/NAMESPACE b/NAMESPACE index 79c58077..588cca37 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -146,8 +146,6 @@ importFrom(parallel,makeCluster) importFrom(parallel,stopCluster) importFrom(robustbase,covOGK) importFrom(robustbase,scaleTau2) -importFrom(rugarch,ugarchfit) -importFrom(rugarch,ugarchspec) importFrom(sandwich,vcovHAC.default) importFrom(sandwich,vcovHC.default) importFrom(sn,dst) diff --git a/R/fitFfm.R b/R/fitFfm.R index 82a0789f..76ec9f65 100644 --- a/R/fitFfm.R +++ b/R/fitFfm.R @@ -19,8 +19,10 @@ #' sample variace, EWMA, Robust EWMA and GARCH(1,1). The inverse of these residual variances #' are used as the weights. For EWMA model, lambda = 0.9 is used as default and for GARCH(1,1) #' omega = 0.09, alpha = 0.1, and beta = 0.81 are used as default as mentioned in Martin & Ding (2017). -#' These default parameters can be changed using the arguments \code{lambda}, \code{GARCH.params} for EWMA and GARCH respectively. -#' To compute GARCH parameters via MLE, set \code{GARCH.MLE} to \code{TRUE}. +#' These default parameters can be changed using the arguments \code{lambda}, +#' \code{GARCH.params} for EWMA and GARCH respectively. To compute GARCH +#' parameters via MLE, set \code{GARCH.MLE} to \code{TRUE}. Make sure you have +#' the rugarch package installed and loaded, as is merely listed as SUGGESTS. #' #' Standardizing style factor exposures: The exposures can be standardized into #' z-scores using regular or robust (see \code{rob.stats}) measures of location @@ -52,7 +54,6 @@ #' @importFrom PerformanceAnalytics checkData skewness kurtosis #' @importFrom robustbase scaleTau2 covOGK #' @importFrom RobStatTM lmrobdetMM covRob covClassic -#' @importFrom rugarch ugarchspec ugarchfit #' @importFrom stats lm as.formula coef contr.treatment fitted mad median #' model.matrix na.exclude na.fail na.omit var #' @@ -87,16 +88,16 @@ #' sample variance, classic EWMA, robust EWMA or GARCH model. Valid values are #' \code{stdDev}, \code{EWMA}, \code{robEWMA}, or \code{GARCH}.Default is #' \code{stdDev} where the inverse of residual sample variances are used as the -#' weights. +#' weights. If using GARCH option, make sure to install and load rugarch package. #' @param lambda lambda value to be used for the EWMA estimation of residual #' variances. Default is 0.9 #' @param GARCH.params list containing GARCH parameters omega, alpha, and beta. #' Default values are 0.09, 0.1, 0.81 respectively. Valid only when -#' \code{GARCH.MLE} is set to \code{FALSE}. +#' \code{GARCH.MLE} is set to \code{FALSE}. Make sure to load rugarch package. #' @param analysis method used in the analysis of fundamental law of active #' management; one of "none", "ISM", or "NEW". Default is "none". #' @param stdReturn logical; If \code{TRUE}, the returns will be standardized -#' using GARCH(1,1) volatilities. Default is \code{FALSE} +#' using GARCH(1,1) volatilities. Default is \code{FALSE}. Make sure to load rugarch package. #' @param targetedVol numeric; the targeted portfolio volatility in the analysis. #' Default is 0.06. #' @param ... potentially further arguments passed. diff --git a/man/fitFfm.Rd b/man/fitFfm.Rd index 1a798589..4c0cba27 100644 --- a/man/fitFfm.Rd +++ b/man/fitFfm.Rd @@ -80,17 +80,17 @@ W-Rob. The weights used in the weighted regression are estimated using sample variance, classic EWMA, robust EWMA or GARCH model. Valid values are \code{stdDev}, \code{EWMA}, \code{robEWMA}, or \code{GARCH}.Default is \code{stdDev} where the inverse of residual sample variances are used as the -weights.} +weights. If using GARCH option, make sure to install and load rugarch package.} \item{lambda}{lambda value to be used for the EWMA estimation of residual variances. Default is 0.9} \item{GARCH.params}{list containing GARCH parameters omega, alpha, and beta. Default values are 0.09, 0.1, 0.81 respectively. Valid only when -\code{GARCH.MLE} is set to \code{FALSE}.} +\code{GARCH.MLE} is set to \code{FALSE}. Make sure to load rugarch package.} \item{stdReturn}{logical; If \code{TRUE}, the returns will be standardized -using GARCH(1,1) volatilities. Default is \code{FALSE}} +using GARCH(1,1) volatilities. Default is \code{FALSE}. Make sure to load rugarch package.} \item{analysis}{method used in the analysis of fundamental law of active management; one of "none", "ISM", or "NEW". Default is "none".}