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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jan 27 09:44:18 CET 2011


Author: jonathan
Date: 2011-01-27 09:44:18 +0100 (Thu, 27 Jan 2011)
New Revision: 543

Modified:
   pkg/RTAQ/R/periodicityTAQ.R
Log:
spotvol bugfix

Modified: pkg/RTAQ/R/periodicityTAQ.R
===================================================================
--- pkg/RTAQ/R/periodicityTAQ.R	2011-01-27 04:35:57 UTC (rev 542)
+++ pkg/RTAQ/R/periodicityTAQ.R	2011-01-27 08:44:18 UTC (rev 543)
@@ -32,7 +32,7 @@
        print("Periodicity estimation requires at least 50 observations. Periodic component set to unity")
        estimperiodicvol = rep(1,M)
     }else{
-       mstdR = mR/estimdailyvol; 
+       mstdR = mR / sqrt( estimdailyvol*(1/M) ); 
        estimperiodicvol = diurnal( stddata = mstdR , method = periodicvol , dummies = dummies , P1 = P1 , P2 = P2 )[[1]]
        mfilteredR = mR/matrix( rep(estimperiodicvol,cDays) , byrow = T , nrow = cDays )
        estimdailyvol = switch( dailyvol , "bipower" = apply(mfilteredR,1,'RBPCov') , 



More information about the Blotter-commits mailing list