[Uwgarp-commits] r87 - in pkg/GARPFRM: R demo sandbox

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Feb 16 16:42:40 CET 2014


Author: tfillebeen
Date: 2014-02-16 16:42:39 +0100 (Sun, 16 Feb 2014)
New Revision: 87

Modified:
   pkg/GARPFRM/R/garch11.R
   pkg/GARPFRM/demo/demo_EWMA_GARCH11.R
   pkg/GARPFRM/sandbox/test_EWMA_GARCH.R
Log:
fcstGarch11 handled

Modified: pkg/GARPFRM/R/garch11.R
===================================================================
--- pkg/GARPFRM/R/garch11.R	2014-02-16 15:16:05 UTC (rev 86)
+++ pkg/GARPFRM/R/garch11.R	2014-02-16 15:42:39 UTC (rev 87)
@@ -41,7 +41,7 @@
 #' @S3method fcstGarch11 DCCfit
 fcstGarch11.DCCfit <- function(object, window = 100){
   #if ((window > nrow(object))) {stop("Window is too large to forecast")}
-  result = dccforecast(garch11, n.ahead=window)
+  result = dccforecast(object, n.ahead=window)
   class(result)
   slotNames(result)
   class(result at mforecast)

Modified: pkg/GARPFRM/demo/demo_EWMA_GARCH11.R
===================================================================
--- pkg/GARPFRM/demo/demo_EWMA_GARCH11.R	2014-02-16 15:16:05 UTC (rev 86)
+++ pkg/GARPFRM/demo/demo_EWMA_GARCH11.R	2014-02-16 15:42:39 UTC (rev 87)
@@ -84,19 +84,19 @@
 # extracting correlation series
 ts.plot(rcor(garch11)[1,2,])
 
-# # Forecasting conditional vol and cor, default wd = 100
-# fcstGarch11 = fcstGarch11(garch11,100)
+# Forecasting conditional vol and cor, default wd = 100
+fcstGarch11 = fcstGarch11(garch11,100)
 
-# class(fcstGarch11)
-# slotNames(fcstGarch11)
-# class(fcstGarch11 at mforecast)
-# names(fcstGarch11 at mforecast)
-# 
-# # many method functions - see help on DCCforecast class
-# # rshape, rskew, fitted, sigma, plot, rcor, rcov, show
-# 
-# # Show forecasts
-# fcstGarch11
-# 
-# # plot(garch11, which=3)
-# plot(fcstGarch11, which=3)
\ No newline at end of file
+class(fcstGarch11)
+slotNames(fcstGarch11)
+class(fcstGarch11 at mforecast)
+names(fcstGarch11 at mforecast)
+
+# many method functions - see help on DCCforecast class
+# rshape, rskew, fitted, sigma, plot, rcor, rcov, show
+
+# Show forecasts
+fcstGarch11
+
+# Plot Conditional Covar Forecast 
+plot(fcstGarch11, which=3)
\ No newline at end of file

Modified: pkg/GARPFRM/sandbox/test_EWMA_GARCH.R
===================================================================
--- pkg/GARPFRM/sandbox/test_EWMA_GARCH.R	2014-02-16 15:16:05 UTC (rev 86)
+++ pkg/GARPFRM/sandbox/test_EWMA_GARCH.R	2014-02-16 15:42:39 UTC (rev 87)
@@ -14,7 +14,7 @@
 # Create combined data series
 temp = merge(temp_1,temp_2)
 
-# scatterplot of returns
+# Scatterplot of returns
 plot(coredata(temp_1), coredata(temp_2), xlab=colnames(temp_1), ylab=colnames(temp_2), 
      main ="Scatterplot of Returns")
 abline(h=0,v=0,lty=3)
@@ -84,19 +84,19 @@
 # extracting correlation series
 ts.plot(rcor(garch11)[1,2,])
 
-# # Forecasting conditional vol and cor, default wd = 100
-# fcstGarch11 = fcstGarch11(garch11,100)
+# Forecasting conditional vol and cor, default wd = 100
+fcstGarch11 = fcstGarch11(garch11,100)
 
-# class(fcstGarch11)
-# slotNames(fcstGarch11)
-# class(fcstGarch11 at mforecast)
-# names(fcstGarch11 at mforecast)
-# 
-# # many method functions - see help on DCCforecast class
-# # rshape, rskew, fitted, sigma, plot, rcor, rcov, show
-# 
-# # Show forecasts
-# fcstGarch11
-# 
-# # plot(garch11, which=3)
-# plot(fcstGarch11, which=3)
\ No newline at end of file
+class(fcstGarch11)
+slotNames(fcstGarch11)
+class(fcstGarch11 at mforecast)
+names(fcstGarch11 at mforecast)
+
+# Many method functions - see help on DCCforecast class
+# rshape, rskew, fitted, sigma, plot, rcor, rcov, show
+
+# Show forecasts
+fcstGarch11
+
+# Plot Conditional Covar Forecast 
+plot(fcstGarch11, which=3)
\ No newline at end of file



More information about the Uwgarp-commits mailing list