[Uwgarp-commits] r139 - in pkg/GARPFRM: . R demo man vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Mar 27 06:01:49 CET 2014


Author: rossbennett34
Date: 2014-03-27 06:01:48 +0100 (Thu, 27 Mar 2014)
New Revision: 139

Added:
   pkg/GARPFRM/demo/00Index
Removed:
   pkg/GARPFRM/demo/00Index.txt
   pkg/GARPFRM/man/garch11.Rd
Modified:
   pkg/GARPFRM/.Rbuildignore
   pkg/GARPFRM/DESCRIPTION
   pkg/GARPFRM/NAMESPACE
   pkg/GARPFRM/R/EWMA.R
   pkg/GARPFRM/R/backTestVaR.R
   pkg/GARPFRM/R/capm.R
   pkg/GARPFRM/R/garch11.R
   pkg/GARPFRM/R/generic_forecast.R
   pkg/GARPFRM/R/monte_carlo.R
   pkg/GARPFRM/demo/univariate_GARCH.R
   pkg/GARPFRM/man/GARP_FRM-package.Rd
   pkg/GARPFRM/man/backTestVaR.Rd
   pkg/GARPFRM/man/forecast.uvEWMAvol.Rd
   pkg/GARPFRM/man/getCor.Rd
   pkg/GARPFRM/man/getCov.Rd
   pkg/GARPFRM/man/hypTest.Rd
   pkg/GARPFRM/man/monteCarlo.Rd
   pkg/GARPFRM/man/plot.EWMA.Rd
   pkg/GARPFRM/man/plot.capm_mlm.Rd
   pkg/GARPFRM/man/plot.capm_uv.Rd
   pkg/GARPFRM/man/plotEndingPrices.Rd
   pkg/GARPFRM/man/uvGARCH.Rd
   pkg/GARPFRM/vignettes/DelineatingEfficientPortfolios.Rnw
   pkg/GARPFRM/vignettes/EstimatingVolatilitiesCorrelation.Rnw
   pkg/GARPFRM/vignettes/QuantifyingVolatilityVaRModels.Rnw
Log:
Cleaning up man files and vignettes

Modified: pkg/GARPFRM/.Rbuildignore
===================================================================
--- pkg/GARPFRM/.Rbuildignore	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/.Rbuildignore	2014-03-27 05:01:48 UTC (rev 139)
@@ -1,2 +1,5 @@
 ^.*\.Rproj$
 ^\.Rproj\.user$
+^\.Rhistory$
+^\.Rapp\.Rhistory$
+^\.DS_Store$
\ No newline at end of file

Modified: pkg/GARPFRM/DESCRIPTION
===================================================================
--- pkg/GARPFRM/DESCRIPTION	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/DESCRIPTION	2014-03-27 05:01:48 UTC (rev 139)
@@ -4,7 +4,7 @@
 Version: 0.1.0
 Date: 2013-11-17
 Author: Ross Bennett, Thomas Fillebeen, Guy Yollin
-Maintainer: Who to complain to <yourfault at somewhere.net>
+Maintainer: Thomas Fillebeen <tdf17 at uw.edu>
 Description: Global Association of Risk Professionals: Financial Risk Manager
 Depends:
     R (>= 2.15.0),
@@ -12,7 +12,9 @@
     PerformanceAnalytics (>= 1.0.0)
 Suggests:
     quadprog,
-    rugarch (>= 1.3.1)
+    rugarch (>= 1.3.1),
+    PortfolioAnalytics,
+    foreach (>= 1.4.1)
 License: GPL
 Collate:
     'backTestVaR.R'

Modified: pkg/GARPFRM/NAMESPACE
===================================================================
--- pkg/GARPFRM/NAMESPACE	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/NAMESPACE	2014-03-27 05:01:48 UTC (rev 139)
@@ -18,9 +18,7 @@
 export(estimateLambdaCov)
 export(estimateLambdaVol)
 export(EWMA)
-export(fcstGarch11)
 export(forecast)
-export(garch11)
 export(getAlphas)
 export(getBetas)
 export(getCor)
@@ -33,8 +31,6 @@
 export(hypTest)
 export(minVarPortfolio)
 export(monteCarlo)
-export(plot.capm_mlm)
-export(plot.capm_uv)
 export(plotEndingPrices)
 export(portReturnTwoAsset)
 export(portSDTwoAsset)
@@ -48,7 +44,6 @@
 export(simpleVolatility)
 export(tangentPortfolio)
 export(uvGARCH)
-S3method(fcstGarch11,DCCfit)
 S3method(forecast,uvEWMAvol)
 S3method(forecast,uvGARCH)
 S3method(getAlphas,capm_mlm)
@@ -64,6 +59,8 @@
 S3method(hypTest,capm_mlm)
 S3method(hypTest,capm_uv)
 S3method(plot,backtestVaR)
+S3method(plot,capm_mlm)
+S3method(plot,capm_uv)
 S3method(plot,efficient.frontier)
 S3method(plot,efTwoAsset)
 S3method(plot,EWMA)

Modified: pkg/GARPFRM/R/EWMA.R
===================================================================
--- pkg/GARPFRM/R/EWMA.R	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/R/EWMA.R	2014-03-27 05:01:48 UTC (rev 139)
@@ -569,7 +569,7 @@
 #' 
 #' Extract the covariance of two assets from an \code{mvEWMAcov} object
 #' 
-#' @param object an EWMA object created by \code{\link{EWMA}}
+#' @param EWMA an EWMA object created by \code{\link{EWMA}}
 #' @param assets character vector or numeric vector. The assets can be 
 #' specified by name or index.
 #' @examples
@@ -655,7 +655,7 @@
 #' 
 #' Extract the correlation of two assets from an \code{mvEWMAcor} object
 #' 
-#' @param object an EWMA object created by \code{\link{EWMA}}
+#' @param EWMA an EWMA object created by \code{\link{EWMA}}
 #' @param assets character vector or numeric vector. The assets can be 
 #' specified by name or index.
 #' @examples
@@ -707,16 +707,17 @@
 #' 
 #' Plot method for EWMA objects.
 #' 
-#' @param x an EWMA object created via \code{\link{EWMA}}
-#' @param y not used
-#' @param \dots passthrough parameters to \code{plot.xts}
+#' @param x an EWMA object created via \code{\link{EWMA}}.
+#' @param y not used.
+#' @param \dots passthrough parameters to \code{plot.xts}.
 #' @param assets character vector or numeric vector of assets to extract from 
 #' the covariance or correlation matrix. The assets can be specified by name or 
 #' index. This argument is only usd for multivariate EWMA estimates of 
 #' a covariance or correlation matrix.
 #' @param legendLoc location of legend. If NULL, the legend will be omitted 
-#' from the plot
-#' @param main main title for the plot
+#' from the plot.
+#' @param main main title for the plot.
+#' @param legendCex numerical value giving the amount by which the legend.
 #' @examples
 #' # data and parameters for EWMA estimate
 #' data(crsp_weekly)
@@ -751,7 +752,7 @@
 #' @author Ross Bennett
 #' @method plot EWMA
 #' @S3method plot EWMA
-plot.EWMA <- function(x, y=NULL, ..., assets=c(1,2), legendLoc=NULL, main="EWMA Estimate", cexLegend=0.8){
+plot.EWMA <- function(x, y=NULL, ..., assets=c(1,2), legendLoc=NULL, main="EWMA Estimate", legendCex=0.8){
   type <- x$model$type
   if(inherits(x, "uvEWMAvol") | inherits(x, "uvEWMAcov") | inherits(x, "uvEWMAcor")){
     # all uvEWMA* objects have same format
@@ -770,6 +771,6 @@
   plot.xts(x=estValues, ...=..., type="l", ylab=type, main=main)
   if(!is.null(legendLoc)){
     legend(legendLoc, legend=c("EWMA Estimate"), 
-           lty=1, col="black", bty="n", cex=cexLegend)
+           lty=1, col="black", bty="n", cex=legendCex)
   }
 }

Modified: pkg/GARPFRM/R/backTestVaR.R
===================================================================
--- pkg/GARPFRM/R/backTestVaR.R	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/R/backTestVaR.R	2014-03-27 05:01:48 UTC (rev 139)
@@ -69,6 +69,7 @@
 #' @param p confidence level for the VaR estimate.
 #' @param method method for the VaR calculation. Valid choices are "modified", "guassian", "historical", and "kernel"
 #' @param bootstrap TRUE/FALSE use the bootstrap estimate for the VaR calculation, (default FALSE).
+#' @param replications number of bootstrap replications.
 #' @param bootParallel TRUE/FALSE run the bootstrap in parallel, (default FALSE).
 #' @author Ross Bennett
 #' @seealso \code{\link[PerformanceAnalytics]{VaR}}, \code{\link{bootVaR}}
@@ -151,7 +152,7 @@
   # GARCH model VaR Backtesting
   # http://www.unstarched.net/wp-content/uploads/2013/06/an-example-in-rugarch.pdf
   # extract R from the fit object
-  R <- xts(garchModel$fit at model$modeldata$data, garchModel$fit at model$modeldata$index)
+  R <- xts(garch$fit at model$modeldata$data, garch$fit at model$modeldata$index)
   # call ugarchroll
   modelRoll <- ugarchroll(spec=getSpec(garch), data=R, n.ahead=nAhead, 
                           refit.every=refitEvery, refit.window="moving", 

Modified: pkg/GARPFRM/R/capm.R
===================================================================
--- pkg/GARPFRM/R/capm.R	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/R/capm.R	2014-03-27 05:01:48 UTC (rev 139)
@@ -166,7 +166,9 @@
 #' @param y not used
 #' @param \dots passthrough parameters to \code{\link{plot}}.
 #' @param main a main title for the plot
-#' @export
+#' @author Thomas Fillebeen
+#' @method plot capm_uv
+#' @S3method plot capm_uv
 plot.capm_uv <- function(x, y, ..., main="CAPM"){
   xlab <- colnames(x$x_data)
   ylab <- colnames(x$y_data)
@@ -177,8 +179,8 @@
   a_tstat = coef(summary(x))[1,2]
   beta = coef(summary(x))[2,1]
   b_tstat = coef(summary(x))[2,2]
-  legend("topleft", legend=c(paste("alpha =", round(alpha,dig=2),"(", round(a_tstat,dig=2),")"),
-                             paste("beta =", round(beta,dig=2),"(", round(b_tstat,dig=2),")")), cex=.8, bty="n")
+  legend("topleft", legend=c(paste("alpha =", round(alpha,digits=2),"(", round(a_tstat,digits=2),")"),
+                             paste("beta =", round(beta,digits=2),"(", round(b_tstat,digits=2),")")), cex=.8, bty="n")
   
 }
 
@@ -190,7 +192,9 @@
 #' @param y not used
 #' @param \dots passthrough parameters to \code{\link{plot}}.
 #' @param main a main title for the plot
-#' @export
+#' @author Thomas Fillebeen
+#' @method plot capm_mlm
+#' @S3method plot capm_mlm
 plot.capm_mlm <- function(x, y, ..., main="CAPM"){
   if(ncol(x$y_data) > 4) warning("Only first 4 assets will be graphically displayed")
   par(mfrow=c(2,round(ncol(coef(x))/2)))
@@ -234,6 +238,7 @@
 #' Returns a true (reject) or false (fail to reject).
 #' 
 #' @param object a capm object created by \code{\link{CAPM}}
+#' @param CI confidence level
 #' @export
 hypTest <- function(object,CI){
   UseMethod("hypTest")

Modified: pkg/GARPFRM/R/garch11.R
===================================================================
--- pkg/GARPFRM/R/garch11.R	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/R/garch11.R	2014-03-27 05:01:48 UTC (rev 139)
@@ -12,71 +12,71 @@
 ## I think we should omit this for phase 1 and maybe reconsider in phase 2
 ## or beyond.
 
-#' GARCH Models
-#' 
-#' This function is a basic wrapper of functions in the rugarch and rmgarch
-#' packages to specify and fit GARCH models. The rugarch and rmgarch packages
-#' provide functions to specify and fit a rich set of GARCH models. 
-#' The purpose of this function is to specify and fit a GARCH model while 
-#' abstracting away some complexities.
-#' 
-#' The rugarch package implements univariate garch models and the
-#' rmgarch package implements multivariate garch models. Univariate or 
-#' multivariate data is automatically detected and the appropriate GARCH model
-#' will be specified and fit.
-#' 
-#' For complete functionality of GARCH models, it is recommended to 
-#' directly use functions in the rugarch and rmgarch packages.
-#' 
-#' @param R xts object of asset returns
-#' @param model “sGARCH”, “fGARCH”, “eGARCH”, “gjrGARCH”, “apARCH” and “iGARCH” and “csGARCH”
-#' @param distribution.model. Valid choices are “norm” for the normal distibution, “snorm” for the skew-normal distribution, “std” for the student-t, “sstd” for the skew-student, “ged” for the generalized error distribution, “sged” for the skew-generalized error distribution, “nig” for the normal inverse gaussian distribution, “ghyp” for the Generalized Hyperbolic, and “jsu” for Johnson's SU distribution. 
-#' @export
+# GARCH Models
+# 
+# This function is a basic wrapper of functions in the rugarch and rmgarch
+# packages to specify and fit GARCH models. The rugarch and rmgarch packages
+# provide functions to specify and fit a rich set of GARCH models. 
+# The purpose of this function is to specify and fit a GARCH model while 
+# abstracting away some complexities.
+# 
+# The rugarch package implements univariate garch models and the
+# rmgarch package implements multivariate garch models. Univariate or 
+# multivariate data is automatically detected and the appropriate GARCH model
+# will be specified and fit.
+# 
+# For complete functionality of GARCH models, it is recommended to 
+# directly use functions in the rugarch and rmgarch packages.
+# 
+# @param R xts object of asset returns
+# @param model “sGARCH”, “fGARCH”, “eGARCH”, “gjrGARCH”, “apARCH” and “iGARCH” and “csGARCH”
+# @param distribution.model. Valid choices are “norm” for the normal distibution, “snorm” for the skew-normal distribution, “std” for the student-t, “sstd” for the skew-student, “ged” for the generalized error distribution, “sged” for the skew-generalized error distribution, “nig” for the normal inverse gaussian distribution, “ghyp” for the Generalized Hyperbolic, and “jsu” for Johnson's SU distribution. 
+# @export
 # By default we use UV N~GARCH(1,1) and Bollerslev for each series
-garch11 <- function(R, model = "sGARCH", distribution.model = "norm"){
-  # if univariate data, load the rugarch package
-  # if multivariate data, load the rmgarch package
-  
-  garch11.spec = ugarchspec(mean.model = list(armaOrder = c(0,0)), 
-                            variance.model = list(garchOrder = c(1,1), model = model), 
-                            distribution.model)
-  
-  # DCC specification: GARCH(1,1) for conditional cor
-  nbColumns = ncol(R)
-  dcc.garch11.spec = dccspec(uspec = multispec( replicate(nbColumns, garch11.spec) ), 
-                             dccOrder = c(1,1), distribution = "mvnorm")
-  dcc.garch11.spec
-  
-  dcc.fit = dccfit(dcc.garch11.spec, data = R)
-  class(dcc.fit)
-  slotNames(dcc.fit)
-  names(dcc.fit at mfit)
-  names(dcc.fit at model)
-  return(dcc.fit)
-}
+# garch11 <- function(R, model = "sGARCH", distribution.model = "norm"){
+#   # if univariate data, load the rugarch package
+#   # if multivariate data, load the rmgarch package
+#   
+#   garch11.spec = ugarchspec(mean.model = list(armaOrder = c(0,0)), 
+#                             variance.model = list(garchOrder = c(1,1), model = model), 
+#                             distribution.model)
+#   
+#   # DCC specification: GARCH(1,1) for conditional cor
+#   nbColumns = ncol(R)
+#   dcc.garch11.spec = dccspec(uspec = multispec( replicate(nbColumns, garch11.spec) ), 
+#                              dccOrder = c(1,1), distribution = "mvnorm")
+#   dcc.garch11.spec
+#   
+#   dcc.fit = dccfit(dcc.garch11.spec, data = R)
+#   class(dcc.fit)
+#   slotNames(dcc.fit)
+#   names(dcc.fit at mfit)
+#   names(dcc.fit at model)
+#   return(dcc.fit)
+# }
 
-#' Forecast GARCH(1,1)
-#' 
-#' Description of forecast GARCH(1,1)
-#' 
-#' @param garch11 object created by \code{\link{GARCH(1,1)}}
-#' @param window is the forecast window (default is set to window = 100)
-#' @export
-fcstGarch11 <- function(object, window){
-  UseMethod("fcstGarch11")
-}
+# Forecast GARCH(1,1)
+# 
+# Description of forecast GARCH(1,1)
+# 
+# @param garch11 object created by \code{\link{garch11}}
+# @param window is the forecast window (default is set to window = 100)
+# @export
+# fcstGarch11 <- function(object, window){
+#   UseMethod("fcstGarch11")
+# }
 
-#' @method fcstGarch11 Dccfit
-#' @S3method fcstGarch11 DCCfit
-fcstGarch11.DCCfit <- function(object, window = 100){
-  #if ((window > nrow(object))) {stop("Window is too large to forecast")}
-  result = dccforecast(object, n.ahead=window)
-  class(result)
-  slotNames(result)
-  class(result at mforecast)
-  names(result at mforecast)
-  return(result)
-}
+# @method fcstGarch11 Dccfit
+# @S3method fcstGarch11 DCCfit
+# fcstGarch11.DCCfit <- function(object, window = 100){
+#   #if ((window > nrow(object))) {stop("Window is too large to forecast")}
+#   result = dccforecast(object, n.ahead=window)
+#   class(result)
+#   slotNames(result)
+#   class(result at mforecast)
+#   names(result at mforecast)
+#   return(result)
+# }
 
 
 #' Univariate GARCH Model
@@ -92,19 +92,19 @@
 #' 
 #' @param R xts object of asset returns.
 #' @param model GARCH Model to specify and fit. Valid GARCH models are
-#' “sGARCH”, “fGARCH”, “eGARCH”, “gjrGARCH”, “apARCH”, “iGARCH” and “csGARCH”.
+#' "sGARCH", "fGARCH", "eGARCH", "gjrGARCH", "apARCH", "iGARCH", and "csGARCH".
 #' @param garchOrder the ARCH(q) and GARCH(p) orders.
 #' @param armaOrder the autoregressive and moving average orders.
 #' @param distribution conditional density to use for the innovations. Valid 
-#' distributions are “norm” for the normal distibution, “snorm” for the 
-#' skew-normal distribution, “std” for the student-t, 
-#' “sstd” for the skew-student, “ged” for the generalized error distribution, 
-#' “sged” for the skew-generalized error distribution, 
-#' “nig” for the normal inverse gaussian distribution, 
-#' “ghyp” for the Generalized Hyperbolic, and “jsu” for Johnson's SU distribution.
+#' distributions are "norm" for the normal distibution, "snorm" for the 
+#' skew-normal distribution, "std" for the student-t, 
+#' "sstd for the skew-student, "ged" for the generalized error distribution, 
+#' "sged" for the skew-generalized error distribution, 
+#' "nig" for the normal inverse gaussian distribution, 
+#' "ghyp" for the Generalized Hyperbolic, and "jsu" for Johnson's SU distribution.
 #' @param fixedParams named list of parameters to keep fixed.
 #' @param solver the solver to use to fit the GARCH model. Valid solvers are
-#' “nlminb”, “solnp”, “lbfgs”, “gosolnp”, “nloptr” or “hybrid” 
+#' "nlminb", "solnp", "lbfgs", "gosolnp", "nloptr", or "hybrid". 
 #' @param outSample number of periods of data used to fit the model. 
 #' \code{nrow(R) - outSample} number of periods to keep as out of sample data
 #' points.

Modified: pkg/GARPFRM/R/generic_forecast.R
===================================================================
--- pkg/GARPFRM/R/generic_forecast.R	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/R/generic_forecast.R	2014-03-27 05:01:48 UTC (rev 139)
@@ -46,9 +46,6 @@
 #' @param model EWMA model fit via \code{\link{EWMA}}
 #' @param nAhead number of steps ahead to forecast. (nAhead = 1 only supported)
 #' @param \dots additional passthrough parameters
-#' @param nRoll number of rolling forecasts
-#' @param externalForecasts named list of external regressors in the mean and/or
-#' variance equations
 #' @return one period ahead EWMA volatility forecast
 #' @method forecast uvEWMAvol
 #' @S3method forecast uvEWMAvol

Modified: pkg/GARPFRM/R/monte_carlo.R
===================================================================
--- pkg/GARPFRM/R/monte_carlo.R	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/R/monte_carlo.R	2014-03-27 05:01:48 UTC (rev 139)
@@ -64,7 +64,7 @@
 #' @param mu annualized expected return
 #' @param sigma annualized standard deviation
 #' @param N number of simulations
-#' @param Time length of simulation (in years)
+#' @param time length of simulation (in years)
 #' @param steps number of time steps
 #' @param starting_value asset price starting value
 #' @return matrix of simulated price paths where each column represents a price path
@@ -111,8 +111,11 @@
 #' 
 #' Plot the kernel density estimate and histogram of the ending prices
 #' from a Monte Carlo simulation.
-#' @param mc monte carlo object created with \code{monteCarlo}
-#' @param \dots additional arguments passed to \code{hist}
+#' @param mc monte carlo object created with \code{monteCarlo}.
+#' @param \dots additional arguments passed to \code{hist}.
+#' @param main a main title for the plot.
+#' @param xlab x-axis label, same as in \code{\link{plot}}.
+#' @param ylab y-axis label, same as in \code{\link{plot}}.
 #' @examples
 #' library(GARPFRM)
 #' 

Copied: pkg/GARPFRM/demo/00Index (from rev 134, pkg/GARPFRM/demo/00Index.txt)
===================================================================
--- pkg/GARPFRM/demo/00Index	                        (rev 0)
+++ pkg/GARPFRM/demo/00Index	2014-03-27 05:01:48 UTC (rev 139)
@@ -0,0 +1,7 @@
+bootstrap demonstrates using bootstrap method to estimate various statistics
+demo_CAPM demonstrate Capital Asset Pricing Model functions
+demo_EWMA_GARCH11 demonstrate exponentially weighted moving average and GARCH models
+EWMA demonstrate exponentially weighted moving average model
+monte_carlo demonstrate monte carlo method to simulate asset price paths
+univariate_GARCH demonstrate fitting a GARCH model to a univariate data set
+backtest_VaR demonstrate Value at Risk backtesting

Deleted: pkg/GARPFRM/demo/00Index.txt
===================================================================
--- pkg/GARPFRM/demo/00Index.txt	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/demo/00Index.txt	2014-03-27 05:01:48 UTC (rev 139)
@@ -1,7 +0,0 @@
-bootstrap.R demonstrates using bootstrap method to estimate various statistics
-demo_CAPM.R demonstrate Capital Asset Pricing Model functions
-demo_EWMA_GARCH11.R demonstrate exponentially weighted moving average and GARCH models
-EWMA.R demonstrate exponentially weighted moving average model
-monte_carlo.R demonstrate monte carlo method to simulate asset price paths
-univariate_GARCH.R demonstrate fitting a GARCH model to a univariate data set
-backtest_VaR.R demonstrate Value at Risk backtesting

Modified: pkg/GARPFRM/demo/univariate_GARCH.R
===================================================================
--- pkg/GARPFRM/demo/univariate_GARCH.R	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/demo/univariate_GARCH.R	2014-03-27 05:01:48 UTC (rev 139)
@@ -11,7 +11,7 @@
 
 # The uvGARCH function uses the excellent rugarch package, which has a rich
 # set of functions for analysis of fitted GARCH models. The fitted model can 
-# be extracted with the getFit function. Refer to help("uGARCHfit-class") 
+# be extracted with the getFit function. Refer to help("uGARCHfit-class")
 # for available all methods for the uGARCHfit object that is returned by getFit.
 # Here we can extract the GARCH model specification and fit
 spec <- getSpec(model0)
@@ -34,7 +34,7 @@
 plot(fit)
 plot(fit, which=1)
 
-# Forecast 10 periods ahead using the standard ARMA(0,0)-GARCH(1,1) model 
+# Forecast 10 periods ahead using the standard ARMA(0,0)-GARCH(1,1) model
 forecast1 <- forecast(model0, nAhead=10)
 forecast1
 plot(forecast1)
@@ -52,27 +52,27 @@
 plot(forecast2, which=2)
 
 # Several distributions are available for the innovations. Distributions include:
-# “norm”: normal distibution
-# “snorm”: skew-normal distribution
-# “std”: student-t distribution
-# “sstd”: skew-student distribution
-# “ged”: generalized error distribution
-# “sged”: skew-generalized error distribution
-# “nig”: normal inverse gaussian distribution
-# “ghyp”: Generalized Hyperbolic distribution
-# “jsu”: Johnson's SU distribution.
+# "norm": normal distibution
+# "snorm": skew-normal distribution
+# "std": student-t distribution
+# "sstd": skew-student distribution
+# "ged": generalized error distribution
+# "sged": skew-generalized error distribution
+# "nig": normal inverse gaussian distribution
+# "ghyp": Generalized Hyperbolic distribution
+# "jsu": Johnson's SU distribution.
 
-# Here we specify and fit the MSFT returns to a standard ARMA(0,0)-GARCH(1,1) 
+# Here we specify and fit the MSFT returns to a standard ARMA(0,0)-GARCH(1,1)
 # model with student-t innovations
 model0.std <- uvGARCH(R, armaOrder=c(0,0), distribution="std")
 
 # The default arguments for uvGARCH are to specify and fit a standard 
-# ARMA(1,1)-GARCH(1,1) model
+# ARMA(1,1)-GARCH(1,1)model
 model11 <- uvGARCH(R)
 
 # In addition to specifyin the model with different ar and ma orders, the 
 # ARCH(q) and GARCH(p) orders can also be specified. Here we fit a standard
-# ARMA(1,1)-GARCH(2,10 model
+# ARMA(1,1)-GARCH(2,1) model
 model21 <- uvGARCH(R, garchOrder=c(2,1))
 getSpec(model21)
 getFit(model21)

Modified: pkg/GARPFRM/man/GARP_FRM-package.Rd
===================================================================
--- pkg/GARPFRM/man/GARP_FRM-package.Rd	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/man/GARP_FRM-package.Rd	2014-03-27 05:01:48 UTC (rev 139)
@@ -45,8 +45,7 @@
 xts
 GARP books
 }
-GARP,
-FRM
+
 \keyword{ package }
 \seealso{
 % Optional links to other man pages, e.g.

Modified: pkg/GARPFRM/man/backTestVaR.Rd
===================================================================
--- pkg/GARPFRM/man/backTestVaR.Rd	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/man/backTestVaR.Rd	2014-03-27 05:01:48 UTC (rev 139)
@@ -21,6 +21,8 @@
   \item{bootstrap}{TRUE/FALSE use the bootstrap estimate
   for the VaR calculation, (default FALSE).}
 
+  \item{replications}{number of bootstrap replications.}
+
   \item{bootParallel}{TRUE/FALSE run the bootstrap in
   parallel, (default FALSE).}
 }

Modified: pkg/GARPFRM/man/forecast.uvEWMAvol.Rd
===================================================================
--- pkg/GARPFRM/man/forecast.uvEWMAvol.Rd	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/man/forecast.uvEWMAvol.Rd	2014-03-27 05:01:48 UTC (rev 139)
@@ -11,11 +11,6 @@
   = 1 only supported)}
 
   \item{\dots}{additional passthrough parameters}
-
-  \item{nRoll}{number of rolling forecasts}
-
-  \item{externalForecasts}{named list of external
-  regressors in the mean and/or variance equations}
 }
 \value{
   one period ahead EWMA volatility forecast

Deleted: pkg/GARPFRM/man/garch11.Rd
===================================================================
--- pkg/GARPFRM/man/garch11.Rd	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/man/garch11.Rd	2014-03-27 05:01:48 UTC (rev 139)
@@ -1,41 +0,0 @@
-\name{garch11}
-\alias{garch11}
-\title{GARCH Models}
-\usage{
-  garch11(R, model = "sGARCH", distribution.model = "norm")
-}
-\arguments{
-  \item{R}{xts object of asset returns}
-
-  \item{model}{“sGARCH”, “fGARCH”, “eGARCH”, “gjrGARCH”,
-  “apARCH” and “iGARCH” and “csGARCH”}
-
-  \item{distribution.model.}{Valid choices are “norm” for
-  the normal distibution, “snorm” for the skew-normal
-  distribution, “std” for the student-t, “sstd” for the
-  skew-student, “ged” for the generalized error
-  distribution, “sged” for the skew-generalized error
-  distribution, “nig” for the normal inverse gaussian
-  distribution, “ghyp” for the Generalized Hyperbolic, and
-  “jsu” for Johnson's SU distribution.}
-}
-\description{
-  This function is a basic wrapper of functions in the
-  rugarch and rmgarch packages to specify and fit GARCH
-  models. The rugarch and rmgarch packages provide
-  functions to specify and fit a rich set of GARCH models.
-  The purpose of this function is to specify and fit a
-  GARCH model while abstracting away some complexities.
-}
-\details{
-  The rugarch package implements univariate garch models
-  and the rmgarch package implements multivariate garch
-  models. Univariate or multivariate data is automatically
-  detected and the appropriate GARCH model will be
-  specified and fit.
-
-  For complete functionality of GARCH models, it is
-  recommended to directly use functions in the rugarch and
-  rmgarch packages.
-}
-

Modified: pkg/GARPFRM/man/getCor.Rd
===================================================================
--- pkg/GARPFRM/man/getCor.Rd	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/man/getCor.Rd	2014-03-27 05:01:48 UTC (rev 139)
@@ -5,8 +5,7 @@
   getCor(EWMA, assets)
 }
 \arguments{
-  \item{object}{an EWMA object created by
-  \code{\link{EWMA}}}
+  \item{EWMA}{an EWMA object created by \code{\link{EWMA}}}
 
   \item{assets}{character vector or numeric vector. The
   assets can be specified by name or index.}

Modified: pkg/GARPFRM/man/getCov.Rd
===================================================================
--- pkg/GARPFRM/man/getCov.Rd	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/man/getCov.Rd	2014-03-27 05:01:48 UTC (rev 139)
@@ -5,8 +5,7 @@
   getCov(EWMA, assets)
 }
 \arguments{
-  \item{object}{an EWMA object created by
-  \code{\link{EWMA}}}
+  \item{EWMA}{an EWMA object created by \code{\link{EWMA}}}
 
   \item{assets}{character vector or numeric vector. The
   assets can be specified by name or index.}

Modified: pkg/GARPFRM/man/hypTest.Rd
===================================================================
--- pkg/GARPFRM/man/hypTest.Rd	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/man/hypTest.Rd	2014-03-27 05:01:48 UTC (rev 139)
@@ -7,6 +7,8 @@
 \arguments{
   \item{object}{a capm object created by
   \code{\link{CAPM}}}
+
+  \item{CI}{confidence level}
 }
 \description{
   Description of CAPM beta/alpha hypothesis test TODO: We

Modified: pkg/GARPFRM/man/monteCarlo.Rd
===================================================================
--- pkg/GARPFRM/man/monteCarlo.Rd	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/man/monteCarlo.Rd	2014-03-27 05:01:48 UTC (rev 139)
@@ -12,7 +12,7 @@
 
   \item{N}{number of simulations}
 
-  \item{Time}{length of simulation (in years)}
+  \item{time}{length of simulation (in years)}
 
   \item{steps}{number of time steps}
 

Modified: pkg/GARPFRM/man/plot.EWMA.Rd
===================================================================
--- pkg/GARPFRM/man/plot.EWMA.Rd	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/man/plot.EWMA.Rd	2014-03-27 05:01:48 UTC (rev 139)
@@ -4,14 +4,14 @@
 \usage{
   \method{plot}{EWMA} (x, y = NULL, ..., assets = c(1, 2),
     legendLoc = NULL, main = "EWMA Estimate",
-    cexLegend = 0.8)
+    legendCex = 0.8)
 }
 \arguments{
-  \item{x}{an EWMA object created via \code{\link{EWMA}}}
+  \item{x}{an EWMA object created via \code{\link{EWMA}}.}
 
-  \item{y}{not used}
+  \item{y}{not used.}
 
-  \item{\dots}{passthrough parameters to \code{plot.xts}}
+  \item{\dots}{passthrough parameters to \code{plot.xts}.}
 
   \item{assets}{character vector or numeric vector of
   assets to extract from the covariance or correlation
@@ -20,9 +20,12 @@
   of a covariance or correlation matrix.}
 
   \item{legendLoc}{location of legend. If NULL, the legend
-  will be omitted from the plot}
+  will be omitted from the plot.}
 
-  \item{main}{main title for the plot}
+  \item{main}{main title for the plot.}
+
+  \item{legendCex}{numerical value giving the amount by
+  which the legend.}
 }
 \description{
   Plot method for EWMA objects.

Modified: pkg/GARPFRM/man/plot.capm_mlm.Rd
===================================================================
--- pkg/GARPFRM/man/plot.capm_mlm.Rd	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/man/plot.capm_mlm.Rd	2014-03-27 05:01:48 UTC (rev 139)
@@ -2,7 +2,7 @@
 \alias{plot.capm_mlm}
 \title{Plotting method for CAPM}
 \usage{
-  plot.capm_mlm(x, y, ..., main = "CAPM")
+  \method{plot}{capm_mlm} (x, y, ..., main = "CAPM")
 }
 \arguments{
   \item{x}{a capm object created by \code{\link{CAPM}}.}
@@ -17,4 +17,7 @@
 \description{
   Plot a fitted CAPM object
 }
+\author{
+  Thomas Fillebeen
+}
 

Modified: pkg/GARPFRM/man/plot.capm_uv.Rd
===================================================================
--- pkg/GARPFRM/man/plot.capm_uv.Rd	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/man/plot.capm_uv.Rd	2014-03-27 05:01:48 UTC (rev 139)
@@ -2,7 +2,7 @@
 \alias{plot.capm_uv}
 \title{Plotting method for CAPM}
 \usage{
-  plot.capm_uv(x, y, ..., main = "CAPM")
+  \method{plot}{capm_uv} (x, y, ..., main = "CAPM")
 }
 \arguments{
   \item{x}{a capm object created by \code{\link{CAPM}}.}
@@ -17,4 +17,7 @@
 \description{
   Plot a fitted CAPM object
 }
+\author{
+  Thomas Fillebeen
+}
 

Modified: pkg/GARPFRM/man/plotEndingPrices.Rd
===================================================================
--- pkg/GARPFRM/man/plotEndingPrices.Rd	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/man/plotEndingPrices.Rd	2014-03-27 05:01:48 UTC (rev 139)
@@ -7,9 +7,15 @@
 }
 \arguments{
   \item{mc}{monte carlo object created with
-  \code{monteCarlo}}
+  \code{monteCarlo}.}
 
-  \item{\dots}{additional arguments passed to \code{hist}}
+  \item{\dots}{additional arguments passed to \code{hist}.}
+
+  \item{main}{a main title for the plot.}
+
+  \item{xlab}{x-axis label, same as in \code{\link{plot}}.}
+
+  \item{ylab}{y-axis label, same as in \code{\link{plot}}.}
 }
 \description{
   Plot the kernel density estimate and histogram of the

Modified: pkg/GARPFRM/man/uvGARCH.Rd
===================================================================
--- pkg/GARPFRM/man/uvGARCH.Rd	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/man/uvGARCH.Rd	2014-03-27 05:01:48 UTC (rev 139)
@@ -11,8 +11,8 @@
   \item{R}{xts object of asset returns.}
 
   \item{model}{GARCH Model to specify and fit. Valid GARCH
-  models are “sGARCH”, “fGARCH”, “eGARCH”, “gjrGARCH”,
-  “apARCH”, “iGARCH” and “csGARCH”.}
+  models are "sGARCH", "fGARCH", "eGARCH", "gjrGARCH",
+  "apARCH", "iGARCH", and "csGARCH".}
 
   \item{garchOrder}{the ARCH(q) and GARCH(p) orders.}
 
@@ -20,21 +20,21 @@
   orders.}
 
   \item{distribution}{conditional density to use for the
-  innovations. Valid distributions are “norm” for the
-  normal distibution, “snorm” for the skew-normal
-  distribution, “std” for the student-t, “sstd” for the
-  skew-student, “ged” for the generalized error
-  distribution, “sged” for the skew-generalized error
-  distribution, “nig” for the normal inverse gaussian
-  distribution, “ghyp” for the Generalized Hyperbolic, and
-  “jsu” for Johnson's SU distribution.}
+  innovations. Valid distributions are "norm" for the
+  normal distibution, "snorm" for the skew-normal
+  distribution, "std" for the student-t, "sstd for the
+  skew-student, "ged" for the generalized error
+  distribution, "sged" for the skew-generalized error
+  distribution, "nig" for the normal inverse gaussian
+  distribution, "ghyp" for the Generalized Hyperbolic, and
+  "jsu" for Johnson's SU distribution.}
 
   \item{fixedParams}{named list of parameters to keep
   fixed.}
 
   \item{solver}{the solver to use to fit the GARCH model.
-  Valid solvers are “nlminb”, “solnp”, “lbfgs”, “gosolnp”,
-  “nloptr” or “hybrid”}
+  Valid solvers are "nlminb", "solnp", "lbfgs", "gosolnp",
+  "nloptr", or "hybrid".}
 
   \item{outSample}{number of periods of data used to fit
   the model. \code{nrow(R) - outSample} number of periods

Modified: pkg/GARPFRM/vignettes/DelineatingEfficientPortfolios.Rnw
===================================================================
--- pkg/GARPFRM/vignettes/DelineatingEfficientPortfolios.Rnw	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/vignettes/DelineatingEfficientPortfolios.Rnw	2014-03-27 05:01:48 UTC (rev 139)
@@ -6,6 +6,7 @@
 \begin{document}
 
 <<echo=FALSE>>=
+library(knitr)
 opts_chunk$set(tidy=FALSE, warning=FALSE, fig.width=5, fig.height=5)
 @
 

Modified: pkg/GARPFRM/vignettes/EstimatingVolatilitiesCorrelation.Rnw
===================================================================
--- pkg/GARPFRM/vignettes/EstimatingVolatilitiesCorrelation.Rnw	2014-03-27 04:06:42 UTC (rev 138)
+++ pkg/GARPFRM/vignettes/EstimatingVolatilitiesCorrelation.Rnw	2014-03-27 05:01:48 UTC (rev 139)
@@ -6,6 +6,7 @@
 \begin{document}
 
 <<echo=FALSE>>=
+library(knitr)
 opts_chunk$set(cache=TRUE, tidy=FALSE, warning=FALSE, fig.width=5, fig.height=5)
 @
 

Modified: pkg/GARPFRM/vignettes/QuantifyingVolatilityVaRModels.Rnw
===================================================================
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/uwgarp -r 139


More information about the Uwgarp-commits mailing list