[Returnanalytics-commits] r3095 - pkg/FactorAnalytics/vignettes
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Sep 13 19:23:09 CEST 2013
Author: chenyian
Date: 2013-09-13 19:23:08 +0200 (Fri, 13 Sep 2013)
New Revision: 3095
Modified:
pkg/FactorAnalytics/vignettes/fundamentalFM.Rnw
Log:
modifying vignette.
Modified: pkg/FactorAnalytics/vignettes/fundamentalFM.Rnw
===================================================================
--- pkg/FactorAnalytics/vignettes/fundamentalFM.Rnw 2013-09-13 17:10:17 UTC (rev 3094)
+++ pkg/FactorAnalytics/vignettes/fundamentalFM.Rnw 2013-09-13 17:23:08 UTC (rev 3095)
@@ -40,7 +40,7 @@
\subsubsection{Loading Data}
Let's look at the arguments of \verb at fitFundamentalFactorModel()@ which will deal with fundamental factor model in \verb at factorAnalytics@.
<<args>>=
-require(factorAnalytics)
+library(factorAnalytics)
args(fitFundamentalFactorModel)
@
\verb at data@ is in class of \verb at data.frame@ and is required to have \emph{assetvar},\emph{returnvar} and \emph{datevar}. One can image \emph{data} is like panel data setup and need firm variable and time variable. Data has dimension (N x T) and at least 3 consumes to specify information needed.
@@ -56,7 +56,7 @@
@
We need asset returns to run our model. We can utilize \verb at Delt()@ to calculate price percentage change which is exactly asset returns in \verb at quantmod@ package.
<<get.returns>>=
-require(quantmod) # for Delt. See Delt for detail
+library(quantmod) # for Delt. See Delt for detail
equity <- cbind(equity,do.call(rbind,lapply(split(equity,equity$tic),
function(x) Delt(x$PRCCQ))))
names(equity)[22] <- "RET"
More information about the Returnanalytics-commits
mailing list