REITs for Everybody Now REITs for Nobody Part 2

[This article was first published on Timely Portfolio, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

As a quick follow-up to my first REITs for Everybody Might Now Mean REITs for Nobody, I want to look at REITs and High Yield bonds, which also might simultaneously attract conservative yield buyers and speculative beta chasers.

HYG (iShares High Yield) and IYR (iShares REIT)

With R we can statistically analyze the similarity of REITs and High Yield.

From TimelyPortfolio
From TimelyPortfolio
From TimelyPortfolio

R code (click to download):

#analyze REITs and High Yield   require(quantmod)
require(PerformanceAnalytics)   #get ML/BAC High Yield Index
MLHY <- getSymbols("BAMLHYH0A0HYM2TRIV",src="FRED",auto.assign=FALSE)
#get Wilshire REIT Index
getSymbols("WILLREITIND",src="FRED")   prices <- na.omit(merge(WILLREITIND,MLHY))
colnames(prices) <- c("Wilshire.REIT","MLBAC.HighYield")
returns <- ROC(prices,n=1,type="discrete")   charts.PerformanceSummary(returns,ylog=TRUE,
	main="Wilshire REIT Total Return and ML/BAC High Yield",
	colorset=c("cadetblue","darkolivegreen3"))   chart.TimeSeries(runCor(returns[,1],returns[,2],n=250),
	main="Wilshire REIT Total Return and ML/BAC High Yield
	Rolling 1 Year Correlation",colorset="cadetblue")   chart.Correlation(returns)

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

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)