1 / 3

Portfolio Correlation Analysis Tool

Portfolio Correlation Analysis Tool. Snippet of Code. #Chart for Quartly Correlation toptitle = paste("Time Series Correlation"," ",hname," ",gname) plot(corplot, xaxt="n", pch=22, ylim=c(-1,1), type="o", lty=1, main=toptitle, col="green")

bazyli
Download Presentation

Portfolio Correlation Analysis Tool

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Portfolio Correlation Analysis Tool

  2. Snippet of Code #Chart for Quartly Correlation toptitle = paste("Time Series Correlation"," ",hname," ",gname) plot(corplot, xaxt="n", pch=22, ylim=c(-1,1), type="o", lty=1, main=toptitle, col="green") lines(corplot2,type="o", lty=2, pch=25,col="red") axis(1, at=1:4, lab=c("Q1","Q2","Q3","Q4")) legend(1, 1, c("2009","2008"), cex=0.8, pch=c(22,25), col=c("green","red"), lty=1:2) mtext("Correlations by Quarter") #Chart for YTD 2008 plot(hcor,gcor,main=stocktitle, xlab=hname, ylab=gname) mtext("2008") mtext("Created by Andrew Ilardi", side=1, line=3, adj=4.1) mtext("www.andrewilardi.com", side=1, line=4, adj=3.4) #Chart for YTD 2009 plot(hcor2,gcor2,main=stocktitle2, xlab=hname, ylab=gname) mtext("2009") dev.off() printcor = paste(hname,gname," ", stocktitle) #print(printcor) #excel layout CSV sink("C:/Stock/testoutput.csv", append=TRUE) excelprint = paste(hname,",",gname,",", titlecor$estimate, "," , titlecor$p.value, "," , titlecor2$estimate, "," , titlecor2$p.value) print(excelprint) Sys.sleep(2) sink() } } print("I am done. Andrew rocks")

More Related