[Blotter-commits] r296 - pkg/RTAQ/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Mar 18 21:24:58 CET 2010


Author: jonathan
Date: 2010-03-18 21:24:58 +0100 (Thu, 18 Mar 2010)
New Revision: 296

Modified:
   pkg/RTAQ/R/volatility.R
Log:
rbpcov correction

Modified: pkg/RTAQ/R/volatility.R
===================================================================
--- pkg/RTAQ/R/volatility.R	2010-03-17 22:03:21 UTC (rev 295)
+++ pkg/RTAQ/R/volatility.R	2010-03-18 20:24:58 UTC (rev 296)
@@ -159,8 +159,8 @@
   n = length(ts1);
   a = abs(ts1+ts2);
   b = abs(ts1-ts2);  
-  first = a[1:(n-1)]*a[2:n];
-  last = b[1:(n-1)]*b[2:n];
+  first = as.numeric(a[1:(n-1)])*as.numeric(a[2:n]);
+  last = as.numeric(b[1:(n-1)])*as.numeric(b[2:n]);
   result =  (pi/8)*sum(first-last);
   return(result);
 }



More information about the Blotter-commits mailing list