Another Way to Look at Vanguard and Pimco
[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.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
I like the results of the analysis shown in my post Applying Tradeblotter’s Nice Work Across Manager Rather than Time, but I was not satisfied that the plot allowed a quick summary comparison of the two massive fund complexes. I am much more pleased with this Ecdf plot from the HMisc package.
![]() |
From TimelyPortfolio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#build on fine work at http://tradeblotter.wordpress.com/ | |
#I take blame for all the ugly/bad code | |
require(latticeExtra) | |
#data from pimco and vanguard websites imported into Excel and translated into csv | |
#if local uncomment next line | |
#pimco_vanguard <- read.csv("vanguard_pimco.csv") | |
#get data from published google doc spreadsheet | |
pimco_vanguard <- read.csv("https://docs.google.com/spreadsheet/pub?key=0AieeEIaS0AOsdDFET0ZmbTBKWDNoMnZrZ0oySWRia1E&single=true&gid=0&output=csv") | |
#do 1 year or past 12 months | |
#exclude 0 assuming that data does not exist for this fund | |
asTheEconomist( | |
Ecdf(~X1Y,group=FundComplex,data=pimco_vanguard[which(!(pimco_vanguard[,"X1Y"]==0)),], | |
label.curves=TRUE, | |
main="PIMCO and Vanguard Mutual Funds \nCumulative Density of 1 Year Performance") | |
) + | |
layer(panel.abline(v=0, col="grey70")) |
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.