[Highfrequency-commits] r27 - in pkg/highfrequency: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jul 23 23:26:56 CEST 2012
Author: jonathan
Date: 2012-07-23 23:26:56 +0200 (Mon, 23 Jul 2012)
New Revision: 27
Modified:
pkg/highfrequency/R/realized.R
pkg/highfrequency/man/heavyModel.Rd
Log:
heavymodel update
Modified: pkg/highfrequency/R/realized.R
===================================================================
--- pkg/highfrequency/R/realized.R 2012-07-23 16:17:40 UTC (rev 26)
+++ pkg/highfrequency/R/realized.R 2012-07-23 21:26:56 UTC (rev 27)
@@ -4007,7 +4007,7 @@
xx$estparams = estparams;
return(xx)
-}
+}
transformparams = function( p, q, paramsvector ){
K = dim(p)[1];
Modified: pkg/highfrequency/man/heavyModel.Rd
===================================================================
--- pkg/highfrequency/man/heavyModel.Rd 2012-07-23 16:17:40 UTC (rev 26)
+++ pkg/highfrequency/man/heavyModel.Rd 2012-07-23 21:26:56 UTC (rev 27)
@@ -59,5 +59,19 @@
197-231.
}
+\examples{
+ # Implementation of the heavy model on DJI:
+ data("realized_library");
+ returns = realized_library$Dow.Jones.Industrials.Returns;
+ rk = realized_library$Dow.Jones.Industrials.Realized.Kernel;
+ returns = returns[!is.na(rk)]; rk = rk[!is.na(rk)]; # Remove NA's
+ data = cbind( returns^2, rk ); # Make data matrix with returns and realized measures
+ backcast = matrix( c(var(returns),mean(rk)) ,ncol=1);
+
+ startvalues = c(0.004,0.02,0.44,0.41,0.74,0.56); # Initial values
+# output = heavyModel( data = as.matrix(data,ncol=2), compconst=FALSE,
+# startingvalues = startvalues, backcast=backcast);
+}
+
\author{Jonathan Cornelissen and Kris Boudt}
\keyword{forecasting}
More information about the Highfrequency-commits
mailing list