[Highfrequency-commits] r133 - in pkg/highfrequency: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jun 3 00:39:37 CEST 2015


Author: payseur
Date: 2015-06-03 00:39:37 +0200 (Wed, 03 Jun 2015)
New Revision: 133

Modified:
   pkg/highfrequency/DESCRIPTION
   pkg/highfrequency/R/realized.R
Log:
Further DESCRIPTION changes and decided to convert xts to zoo for one plot.

Modified: pkg/highfrequency/DESCRIPTION
===================================================================
--- pkg/highfrequency/DESCRIPTION	2015-06-01 13:16:10 UTC (rev 132)
+++ pkg/highfrequency/DESCRIPTION	2015-06-02 22:39:37 UTC (rev 133)
@@ -1,5 +1,5 @@
 Package: highfrequency
-Version: 0.41
+Version: 0.4-1
 Date: 2015-05-31
 Title: Tools for Highfrequency Data Analysis 
 Authors at R: c(person("Kris", "Boudt", role = c("aut", "cre"),
@@ -8,7 +8,7 @@
         person("Scott", "Payseur", role = "aut", email = "scott at statblocks.com"),
         person("Giang", "Nguyen", role = "ctb"),
         person("Maarten", "Schermer", role = "ctb"))
-Author: Kris Boudt [aut, cre], Jonathan Cornelissen [aut], Scott Payseur [aut], Giang Nguyen [ctb], Maarten Schermer [ctb] 
+Author: Kris Boudt [aut, cre], Jonathan Cornelissen [aut], Scott Payseur [aut], Giang Nguyen [ctb], Maarten Schermer [ctb]
 Maintainer: Kris Boudt <Kris.Boudt at econ.kuleuven.be>
 Description: Provide functionality to manage, clean and match highfrequency trades and quotes data, calculate various liquidity measures, estimate and forecast volatility, and investigate microstructure noise and intraday periodicity. 
 License: GPL (>= 2)

Modified: pkg/highfrequency/R/realized.R
===================================================================
--- pkg/highfrequency/R/realized.R	2015-06-01 13:16:10 UTC (rev 132)
+++ pkg/highfrequency/R/realized.R	2015-06-02 22:39:37 UTC (rev 133)
@@ -2008,6 +2008,7 @@
 label.pos = c(4, 2), cex.caption = 1){ 
     observed = x$model$y;
     fitted   = x$fitted.values;
+    names(fitted) = NULL;
     dates    = x$dates;
     dates    = as.POSIXct(dates);
     observed = xts(observed, order.by=dates);
@@ -2021,12 +2022,14 @@
     #plot.xts(observed,col="red",lwd=2,main=title, ylim=g_range,xlab="Time",ylab="Realized Volatility"); 
     
     # There is an error in plot.xts that prevents colors from being passed.
-    plot.xts(observed,main=title, ylim=g_range,xlab="Time",ylab="Realized Volatility"); 
     #  axis(1,time(b)[ind], format(time(b)[ind],), las=2, cex.axis=0.8); not used anymore
     #  axis(2);
-    lines(observed,col="red",lwd=2);
-    lines(fitted,col="blue",lwd=2);
-   # legend("topleft", c("Observed RV","Forecasted RV"),  col=c("red","blue"),lty=1, lwd=2, bty="n"); 
+      observed <- as.zoo(observed)
+      fitted <- as.zoo(fitted)
+      plot.zoo(observed,main=title, ylim=g_range,xlab="Time",ylab="Realized Volatility", col='red',lwd=2); 
+      lines(fitted,col="blue",lwd=2);
+      legend("topleft", c("Observed RV","Forecasted RV"),  col=c("red","blue"),lty=1, lwd=2, bty="n"); 
+    
 }
 
 ##################################################################################################



More information about the Highfrequency-commits mailing list