[Returnanalytics-commits] r3167 - pkg/PortfolioAnalytics/sandbox/symposium2013

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Sep 23 01:51:44 CEST 2013


Author: peter_carl
Date: 2013-09-23 01:51:44 +0200 (Mon, 23 Sep 2013)
New Revision: 3167

Modified:
   pkg/PortfolioAnalytics/sandbox/symposium2013/analyze.HFindexes.R
Log:
- added rolling correlation slide


Modified: pkg/PortfolioAnalytics/sandbox/symposium2013/analyze.HFindexes.R
===================================================================
--- pkg/PortfolioAnalytics/sandbox/symposium2013/analyze.HFindexes.R	2013-09-22 23:50:37 UTC (rev 3166)
+++ pkg/PortfolioAnalytics/sandbox/symposium2013/analyze.HFindexes.R	2013-09-22 23:51:44 UTC (rev 3167)
@@ -48,11 +48,12 @@
 ########################################################################
 # Load data
 ########################################################################
-## Just load the data from packages
-### See parse.EDHEC.R
+# Load the data objects from downloaded and parsed files
+## See 'parse.EDHEC.R' and 'download.SP500TR.R'
 
 # Load data from cache
-load("./cache/edhec.Rdata")
+load("./cache/edhec.RData")
+load("./cache/SP500TR.RData")
 
 # Drop some indexes and reorder
 R = edhec[,c("Convertible Arbitrage", "Equity Market Neutral","Fixed Income Arbitrage", "Event Driven", "CTA Global", "Global Macro", "Long/Short Equity")]
@@ -159,11 +160,17 @@
 
 # @TODO: Add 12M rolling correlation to S&P500
 
+# --------------------------------------------------------------------
+# Rolling Correlation to S&P500 TR
+# --------------------------------------------------------------------
 
+png(filename=paste(resultsdir, dataname, "-RollCorr.png", sep=""), units="in", height=5.5, width=9, res=96) 
+chart.RollingCorrelation(R,SP500.TR, width=24, legend.loc="bottomleft", colorset=rainbow8equal, main="Rolling 24-Month Correlations")
+dev.off()
+       
 # --------------------------------------------------------------------
 ## Autocorrelation
 # --------------------------------------------------------------------
-# @TODO: This is frosting, do it last
 
 # require(Hmisc)
 AC.stats = t(table.Autocorrelation(R=R))



More information about the Returnanalytics-commits mailing list