[Returnanalytics-commits] r3189 - in pkg/PortfolioAnalytics/sandbox/symposium2013: . docs
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Sep 26 17:21:47 CEST 2013
Author: peter_carl
Date: 2013-09-26 17:21:47 +0200 (Thu, 26 Sep 2013)
New Revision: 3189
Modified:
pkg/PortfolioAnalytics/sandbox/symposium2013/analyze.HFindexes.R
pkg/PortfolioAnalytics/sandbox/symposium2013/docs/symposium-slides-2013.Rmd
Log:
- added ETL sensitivity graphic
Modified: pkg/PortfolioAnalytics/sandbox/symposium2013/analyze.HFindexes.R
===================================================================
--- pkg/PortfolioAnalytics/sandbox/symposium2013/analyze.HFindexes.R 2013-09-26 13:03:08 UTC (rev 3188)
+++ pkg/PortfolioAnalytics/sandbox/symposium2013/analyze.HFindexes.R 2013-09-26 15:21:47 UTC (rev 3189)
@@ -57,8 +57,8 @@
# 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")]
+R.names = colnames(R)
-
########################################################################
# Returns-based performance analysis
########################################################################
@@ -137,8 +137,6 @@
library(gplots)
# Generate some color choices for the scale
skewedWB20 = c(colorpanel(16, "#008566","#E1E56D"), colorpanel(5, "#E1E56D", "#742414")[-1])
-skewedGnYeRd10 = c(colorpanel(8, "darkgreen", "yellow"),colorpanel(3, "yellow", "darkred")[-1])
-skewedGnYeRd20 = c(colorpanel(16, "darkgreen", "yellow"),colorpanel(5, "yellow", "darkred")[-1])
M <- cor(R)
colnames(M) = rownames(M)
@@ -158,8 +156,12 @@
corrRect.hclust(M36.hc2, k=3, method="complete", col="blue")
dev.off()
-# @TODO: Add 12M rolling correlation to S&P500
+# --------------------------------------------------------------------
+# Table of Return correlations
+# --------------------------------------------------------------------
+write.csv(M, file=paste(resultsdir, dataname, "-inception-cor.csv", sep=""))
+
# --------------------------------------------------------------------
# Rolling Correlation to S&P500 TR
# --------------------------------------------------------------------
@@ -189,4 +191,17 @@
# --------------------------------------------------------------------
# ETL parameterization charts
# --------------------------------------------------------------------
-
+ # @TODO: make these y-axes match?
+# source('~/devel/R/returnanalytics/pkg/PerformanceAnalytics/R/chart.VaRSensitivity.R')
+png(filename=paste(resultsdir, dataname, "-ETL-sensitivity.png", sep=""), units="in", height=5.5, width=9, res=96)
+op <- par(no.readonly = TRUE)
+layout(matrix(c(1:8), nrow=2))
+par(mar = c(4, 4, 5, 2)+0.1) #c(bottom, left, top, right)
+for(i in 1:NCOL(R)){
+ chart.VaRSensitivity(R[,i], methods=c("ModifiedES","HistoricalES", "GaussianES"), legend.loc=NULL, clean=clean, colorset=c("orange", "black", "darkgray"), lty=c(3,1,2), lwd=3, main=R.names[i], ylim=c(-0.09,0), ylab="Expected Tail Loss")
+ abline(v = 1-1/12, col = "red", lty = 2, lwd=1)
+}
+ plot.new()
+ legend("center", legend=c("Modified \nETL","Historical \nETL", "Gaussian \nETL"), lty=c(3,1,2), lwd=3, col=c("orange", "black", "darkgray"), cex=1.2, y.intersp=2)
+par(op)
+dev.off()
\ No newline at end of file
Modified: pkg/PortfolioAnalytics/sandbox/symposium2013/docs/symposium-slides-2013.Rmd
===================================================================
--- pkg/PortfolioAnalytics/sandbox/symposium2013/docs/symposium-slides-2013.Rmd 2013-09-26 13:03:08 UTC (rev 3188)
+++ pkg/PortfolioAnalytics/sandbox/symposium2013/docs/symposium-slides-2013.Rmd 2013-09-26 15:21:47 UTC (rev 3189)
@@ -6,7 +6,6 @@
# TODO
- Add a slide comparing traditional risk budgeting to equalized risk portfolios with limits
- Move as much text off slides and into comments, add more graphics
- - Add autocorrelation charts?
-->
<!---
# HOWTO
@@ -148,6 +147,22 @@
# Return distributions
* Split chart into two for readability
+# Return autocorrelation
+\includegraphics[width=1.0\textwidth]{../results/EDHEC-ACStats.png}
+
+<!-- Comments:
+* Keep this super short
+* Discuss GLM view of autocorrelation
+* cast doubt on that interpretation by pointing out EMN
+* note that it isn't a truism - not all strategies seem to show AC
+* alternative interpretation?
+* say that we're ignoring AC for the purposes of this presentation
+* but it could be tackled in estimation with HAC correlation or Okunev-White transformations
+-->
+
+# Return autocorrelation
+\includegraphics[width=1.0\textwidth]{../results/EDHEC-ACStackedBars.png}
+
# Measuring risk, not volatility
Measure risk with Conditional Value-at-Risk (CVaR)
@@ -163,11 +178,13 @@
Split graphic into two pages so it's readable
# ETL sensitivity
+\includegraphics[width=1.0\textwidth]{../results/EDHEC-ETL-sensitivity.png}
+
+<!-- Comments:
Modified ETL demonstrates a better fit for historical CVaR at lower confidence levels, and can break down at higher confidence levels
-*Insert chart or charts*
+*** discuss cleaning method here
+-->
-<!-- discuss cleaning method here -->
-
# _Ex ante_, not _ex post_
_Ex post_ analysis of risk contribution has been around for a while
@@ -189,7 +206,7 @@
* A high positive %CmETL indicates the position has a large loss when the portfolio also has a large loss
<!-- Comments:
-SD, VaR and ETL are linearly homogenous functions of portfolio weights w, so Euler’s theorem gives additive decomposition. Zivot (2011)
+SD, VaR and ETL are linearly homogenous functions of portfolio weights w, so applying Euler’s theorem gives additive decomposition. Zivot (2011)
Should point out that this also maps into factor tail risk contributions, which has an intuitive interpretation as stress loss scenarios.
-->
More information about the Returnanalytics-commits
mailing list