[Returnanalytics-commits] r2616 - in pkg/FactorAnalytics: R data

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jul 22 02:32:00 CEST 2013


Author: chenyian
Date: 2013-07-22 02:31:59 +0200 (Mon, 22 Jul 2013)
New Revision: 2616

Added:
   pkg/FactorAnalytics/data/CommomFactors.RData
Modified:
   pkg/FactorAnalytics/R/fitFundamentalFactorModel.R
   pkg/FactorAnalytics/R/plot.FundamentalFactorModel.r
Log:
Add new commom factor data

Modified: pkg/FactorAnalytics/R/fitFundamentalFactorModel.R
===================================================================
--- pkg/FactorAnalytics/R/fitFundamentalFactorModel.R	2013-07-21 23:22:05 UTC (rev 2615)
+++ pkg/FactorAnalytics/R/fitFundamentalFactorModel.R	2013-07-22 00:31:59 UTC (rev 2616)
@@ -404,6 +404,7 @@
     else {
       Cov.resids <- NULL
     }
+
     output <- list(returns.cov = Cov.returns, 
                    factor.cov = Cov.factors, 
                    resids.cov = Cov.resids, 
@@ -414,7 +415,10 @@
                    call = this.call,
                    data = data,
                    asset.names = assets,
-                   beta = B.final)
+                   beta = B.final,
+                   datevar = datevar,
+                   returnsvar = returnsvar,
+                   assetvar = assetvar)
     class(output) <- "FundamentalFactorModel"
     return(output)
 }
\ No newline at end of file

Modified: pkg/FactorAnalytics/R/plot.FundamentalFactorModel.r
===================================================================
--- pkg/FactorAnalytics/R/plot.FundamentalFactorModel.r	2013-07-21 23:22:05 UTC (rev 2615)
+++ pkg/FactorAnalytics/R/plot.FundamentalFactorModel.r	2013-07-22 00:31:59 UTC (rev 2616)
@@ -115,6 +115,13 @@
 #            names = fit.fund$asset.names
 #            for (i in names) {
 #              # check for missing values in fund data
+#             asset.n = which( colnames(fit.fund$data) ==  as.name(fit.fund$assetvar))
+#             as.symbol(fit.fund$assetvar)
+#             subset(fit.fund$data,fit.fund$assetvar == "STI")
+#              
+#              subset(fit.fund$data,TICKER == "STI")[[fit.fund$returnsvar]]
+#              
+#              [,fit.fund$returnsvar]
 #              idx = which(!is.na(fit.fund$data[,i]))
 #              tmpData = cbind(fit.stat$asset.ret[idx,i], fit.stat$factors,
 #                              fit.stat$residuals[,i]/sqrt(fit.stat$resid.variance[i]))

Added: pkg/FactorAnalytics/data/CommomFactors.RData
===================================================================
(Binary files differ)


Property changes on: pkg/FactorAnalytics/data/CommomFactors.RData
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream



More information about the Returnanalytics-commits mailing list