REITs for Everybody Now REITs for Nobody Part 3

June 22, 2011
By

(This article was first published on Timely Portfolio, and kindly contributed to R-bloggers)

THIS IS NOT INVESTMENT ADVICE.  LISTENING TO ME COULD LOSE LOTS OF MONEY.

For some additional insight to my short REITs beliefs presented in REITs for Everybody Now REITs for Nobody Part 2 and REITs for Everybody Might Now Mean REITs for Nobody, I thought we should look at the underlying commercial real estate prices with the Moody’s/REAL CPPI indexes updated today June 22.  They generously provide the data but unfortunately in zip compressed format.  I am not sure how to automate the unzip step in R, but we can easily analyze the unzipped csv data in R. 

From TimelyPortfolio

On a standalone basis, the index is very ugly with a new recent downturn into new lows.

From TimelyPortfolio

Now let’s see how closely REITs match underlying commercial property prices.  I don’t know about you, but something doesn’t seem quite right about these next charts.

From TimelyPortfolio
From TimelyPortfolio

R code(click to download):

require(quantmod)
require(PerformanceAnalytics)   moodyscppi <- read.csv("monthly_property_national.csv")
moodyscppi[,1] <- paste(moodyscppi[,1],
ifelse(moodyscppi[,2]<10,paste("0",moodyscppi[,2],sep=""),moodyscppi[,2]),
"01",sep="-")   moodyscppi <- as.xts(moodyscppi[,3:4],order.by=as.Date(moodyscppi[,1]))   #jpeg(filename="moodys-cppi-performance.jpg",quality=100,width=6.25, height = 5,
# units="in",res=96)
charts.PerformanceSummary(moodyscppi[,2],
main="Moody's/REAL Commercial Property Price Index")
#dev.off()   getSymbols("WILLREITIND",src="FRED") #get Wilshire REIT Total Return
getSymbols("WILLREITPR",src="FRED") #get Wilshire REIT Price
WILLREITIND <- to.monthly(WILLREITIND)[,4]
WILLREITPR <- to.monthly(WILLREITPR)[,4]
index(WILLREITIND) <- as.Date(index(WILLREITIND))
index(WILLREITPR) <- as.Date(index(WILLREITPR))
#merge returns from cppi and reit indexes
cppi_reit <- na.omit(merge(moodyscppi[,2],
ROC(WILLREITIND,n=1,type="discrete"),
ROC(WILLREITPR,n=1,type="discrete")))
colnames(cppi_reit) <- c("Moodys/REAL CPPI",
"Wilshire REIT Total Return","Wilshire REIT Price")
#jpeg(filename="moodys-cppi-reit.jpg",quality=100,width=6.25, height = 5,
# units="in",res=96)
charts.PerformanceSummary(cppi_reit,cex.legend=1.2,
main="Moodys/REAL CPPI and Wilshire REIT Indexes",
colorset=c("cadetblue","darkolivegreen3","purple"))
#dev.off()
#jpeg(filename="cppi-reit-rolling.jpg",quality=100,width=6.25, height = 6.25,
# units="in",res=96)
charts.RollingPerformance(cppi_reit,width=12,legend.loc="topleft",cex.legend=1.2,
main="Moodys/REAL CPPI and Wilshire REIT Indexes
Rolling 12 Month Return"
,
colorset=c("cadetblue","darkolivegreen3","purple"))
#dev.off()

Created by Pretty R at inside-R.org

To leave a comment for the author, please follow the link and comment on his blog: Timely Portfolio.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: , ,

Comments are closed.