[Returnanalytics-commits] r3595 - in pkg/FactorAnalytics: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Feb 4 01:26:42 CET 2015


Author: chenyian
Date: 2015-02-04 01:26:42 +0100 (Wed, 04 Feb 2015)
New Revision: 3595

Modified:
   pkg/FactorAnalytics/R/fitTsfm.R
   pkg/FactorAnalytics/R/fitTsfmLagBeta.r
   pkg/FactorAnalytics/R/fitTsfmMT.r
   pkg/FactorAnalytics/man/fitTsfmLagBeta.Rd
   pkg/FactorAnalytics/man/fitTsfmMT.Rd
Log:
Typos check. 

Modified: pkg/FactorAnalytics/R/fitTsfm.R
===================================================================
--- pkg/FactorAnalytics/R/fitTsfm.R	2015-02-03 17:38:59 UTC (rev 3594)
+++ pkg/FactorAnalytics/R/fitTsfm.R	2015-02-04 00:26:42 UTC (rev 3595)
@@ -196,7 +196,7 @@
   if (missing(factor.names) && !is.null(mkt.name)) {
     factor.names <- NULL
   }
-  
+
 #   if (xor(is.null(mkt.name), is.null(mkt.timing))) {
 #     stop("Missing argument: Both mkt.name and mkt.timing are necessary to add 
 #          market timing factors")
@@ -244,7 +244,7 @@
   
   # opt add mkt-timing factors: down.market=max(0,Rf-Rm), market.sqd=(Rm-Rf)^2
   if("HM" %in% mkt.timing) {
-    down.market <- data.xts[,mkt.name]
+    down.market <- dat.xts[,mkt.name]
     down.market[down.market < 0 ] <- 0
     dat.xts <- merge.xts(dat.xts,down.market)
     colnames(dat.xts)[dim(dat.xts)[2]] <- "down.market"

Modified: pkg/FactorAnalytics/R/fitTsfmLagBeta.r
===================================================================
--- pkg/FactorAnalytics/R/fitTsfmLagBeta.r	2015-02-03 17:38:59 UTC (rev 3594)
+++ pkg/FactorAnalytics/R/fitTsfmLagBeta.r	2015-02-04 00:26:42 UTC (rev 3595)
@@ -142,7 +142,7 @@
 #' # load data from the database
 #' data(managers)
 #' 
-#' # example: Market-timing factors with robust fit
+#' # example: Market-timing factors with OLS fit
 #' fit <- fitTsfmLagBeta(asset.names=colnames(managers[,(1:6)]),LagBeta=2,
 #'                       factor.names="SP500.TR",mkt.name="SP500.TR",
 #'                       rf.name="US.3m.TR",data=managers)
@@ -161,7 +161,7 @@
                           variable.selection=c("none","stepwise","subsets","lars"), control=fitTsfm.control(...),...) {
   
   if (is.null(mkt.name))  {
-    stop("Missing argument: mkt.name has to be specified for lag Beta model.")
+    stop("Missing argument: mkt.name has to be specified for lagged Betas model.")
   }
  
   

Modified: pkg/FactorAnalytics/R/fitTsfmMT.r
===================================================================
--- pkg/FactorAnalytics/R/fitTsfmMT.r	2015-02-03 17:38:59 UTC (rev 3594)
+++ pkg/FactorAnalytics/R/fitTsfmMT.r	2015-02-04 00:26:42 UTC (rev 3595)
@@ -140,8 +140,8 @@
 #' # load data from the database
 #' data(managers)
 #' 
-#' # example: Market-timing factors with robust fit
-#' fit <- fitTsfmMT(asset.names=colnames(managers[,(1:6)]), factor.names=NULL, 
+#' # example: Market-timing factors with OLS fit
+#' fit <- fitTsfmMT(asset.names=colnames(managers[,(1:6)]),  
 #'                mkt.name="SP500.TR",rf.name="US.3m.TR",data=managers)
 #' summary(fit)
 #' fitted(fit)

Modified: pkg/FactorAnalytics/man/fitTsfmLagBeta.Rd
===================================================================
--- pkg/FactorAnalytics/man/fitTsfmLagBeta.Rd	2015-02-03 17:38:59 UTC (rev 3594)
+++ pkg/FactorAnalytics/man/fitTsfmLagBeta.Rd	2015-02-04 00:26:42 UTC (rev 3595)
@@ -132,7 +132,7 @@
 # load data from the database
 data(managers)
 
-# example: Market-timing factors with robust fit
+# example: Market-timing factors with OLS fit
 fit <- fitTsfmLagBeta(asset.names=colnames(managers[,(1:6)]),LagBeta=2,
                       factor.names="SP500.TR",mkt.name="SP500.TR",
                       rf.name="US.3m.TR",data=managers)

Modified: pkg/FactorAnalytics/man/fitTsfmMT.Rd
===================================================================
--- pkg/FactorAnalytics/man/fitTsfmMT.Rd	2015-02-03 17:38:59 UTC (rev 3594)
+++ pkg/FactorAnalytics/man/fitTsfmMT.Rd	2015-02-04 00:26:42 UTC (rev 3595)
@@ -129,8 +129,8 @@
 # load data from the database
 data(managers)
 
-# example: Market-timing factors with robust fit
-fit <- fitTsfmMT(asset.names=colnames(managers[,(1:6)]), factor.names=NULL,
+# example: Market-timing factors with OLS fit
+fit <- fitTsfmMT(asset.names=colnames(managers[,(1:6)]),
                mkt.name="SP500.TR",rf.name="US.3m.TR",data=managers)
 summary(fit)
 fitted(fit)



More information about the Returnanalytics-commits mailing list