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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jan 28 00:54:23 CET 2011


Author: jonathan
Date: 2011-01-28 00:54:23 +0100 (Fri, 28 Jan 2011)
New Revision: 544

Modified:
   pkg/RTAQ/R/periodicityTAQ.R
Log:
spotvol bugfix II (output)

Modified: pkg/RTAQ/R/periodicityTAQ.R
===================================================================
--- pkg/RTAQ/R/periodicityTAQ.R	2011-01-27 08:44:18 UTC (rev 543)
+++ pkg/RTAQ/R/periodicityTAQ.R	2011-01-27 23:54:23 UTC (rev 544)
@@ -40,8 +40,8 @@
                                           "rv"      = apply(mfilteredR,1,'RV') )        
     }
     out  = cbind( rdata ,
-                  rep( estimdailyvol,each=M)*rep(estimperiodicvol,cDays) ,
-                  rep( estimdailyvol,each=M) ,
+                  rep( sqrt( estimdailyvol*(1/M) ),each=M )*rep(estimperiodicvol,cDays) ,
+                  rep( sqrt( estimdailyvol*(1/M) ),each=M ) ,
                   rep(estimperiodicvol,cDays) )
     out = xts( out , order.by = time(rdata) )
     names(out) = c("returns","vol","dailyvol","periodicvol")
@@ -50,8 +50,6 @@
 
 
 # internal non documented functions: 
-
-
 HRweight = function( d,k){
 # Hard rejection weight function
    w = 1*(d<=k); return(w)



More information about the Blotter-commits mailing list