[Returnanalytics-commits] r3271 - pkg/PortfolioAnalytics/sandbox

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Dec 10 00:26:24 CET 2013


Author: peter_carl
Date: 2013-12-10 00:26:24 +0100 (Tue, 10 Dec 2013)
New Revision: 3271

Modified:
   pkg/PortfolioAnalytics/sandbox/script.buildFactors.R
Log:
- added NAREIT index as real estate proxy


Modified: pkg/PortfolioAnalytics/sandbox/script.buildFactors.R
===================================================================
--- pkg/PortfolioAnalytics/sandbox/script.buildFactors.R	2013-12-09 23:22:55 UTC (rev 3270)
+++ pkg/PortfolioAnalytics/sandbox/script.buildFactors.R	2013-12-09 23:26:24 UTC (rev 3271)
@@ -85,6 +85,10 @@
 
 ### Real estate
 # Use the NAREIT index
+  x = read.xls("http://returns.reit.com/returns/MonthlyHistoricalReturns.xls", pattern="Date", sheet="Index Data", stringsAsFactors=FALSE)
+  x.dates = as.Date(as.yearmon(x[,1], format="%b-%y"), frac=1)
+  REALESTATE.R = xts(x[,2]/100, order.by = x.dates)
+  colnames(REALESTATE.R) = "NAREIT Returns"
 
 ### Commodities
 ## Use the DJUBS Commodities index



More information about the Returnanalytics-commits mailing list