[Returnanalytics-commits] r3355 - in pkg/PortfolioAnalytics/sandbox/RFinance2014: . optimization_figures optimization_results

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Apr 8 21:22:05 CEST 2014


Author: rossbennett34
Date: 2014-04-08 21:22:04 +0200 (Tue, 08 Apr 2014)
New Revision: 3355

Added:
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/risk_minES.png
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/risk_minESEqRB.png
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/risk_minESRB.png
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_results/rp.rda
   pkg/PortfolioAnalytics/sandbox/RFinance2014/slidy_presentation.html
Modified:
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/crra_RR.png
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/eqrb_minES.png
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/opt_dn.png
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/opt_minES.png
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/rb_minES.png
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/ret_crra.png
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/ret_minES.png
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_results/bt.opt.crra.rda
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_results/bt.opt.minES.rda
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_results/opt.crra.rda
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_results/opt.dn.rda
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_results/opt.minES.rda
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_results/opt.minVarLW.rda
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_results/opt.minVarSample.rda
   pkg/PortfolioAnalytics/sandbox/RFinance2014/optimize.R
   pkg/PortfolioAnalytics/sandbox/RFinance2014/presentation.Rmd
   pkg/PortfolioAnalytics/sandbox/RFinance2014/presentation.html
   pkg/PortfolioAnalytics/sandbox/RFinance2014/presentation.md
Log:
Updates to RFinance 2014 presentation including the html slides

Modified: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/crra_RR.png
===================================================================
(Binary files differ)

Modified: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/eqrb_minES.png
===================================================================
(Binary files differ)

Modified: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/opt_dn.png
===================================================================
(Binary files differ)

Modified: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/opt_minES.png
===================================================================
(Binary files differ)

Modified: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/rb_minES.png
===================================================================
(Binary files differ)

Modified: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/ret_crra.png
===================================================================
(Binary files differ)

Modified: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/ret_minES.png
===================================================================
(Binary files differ)

Added: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/risk_minES.png
===================================================================
(Binary files differ)


Property changes on: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/risk_minES.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/risk_minESEqRB.png
===================================================================
(Binary files differ)


Property changes on: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/risk_minESEqRB.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/risk_minESRB.png
===================================================================
(Binary files differ)


Property changes on: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_figures/risk_minESRB.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_results/bt.opt.crra.rda
===================================================================
(Binary files differ)

Modified: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_results/bt.opt.minES.rda
===================================================================
(Binary files differ)

Modified: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_results/opt.crra.rda
===================================================================
(Binary files differ)

Modified: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_results/opt.dn.rda
===================================================================
(Binary files differ)

Modified: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_results/opt.minES.rda
===================================================================
(Binary files differ)

Modified: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_results/opt.minVarLW.rda
===================================================================
(Binary files differ)

Modified: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_results/opt.minVarSample.rda
===================================================================
(Binary files differ)

Added: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_results/rp.rda
===================================================================
(Binary files differ)


Property changes on: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimization_results/rp.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: pkg/PortfolioAnalytics/sandbox/RFinance2014/optimize.R
===================================================================
--- pkg/PortfolioAnalytics/sandbox/RFinance2014/optimize.R	2014-04-08 17:43:21 UTC (rev 3354)
+++ pkg/PortfolioAnalytics/sandbox/RFinance2014/optimize.R	2014-04-08 19:22:04 UTC (rev 3355)
@@ -236,6 +236,11 @@
 # portf.minES.RB$constraints[[2]]$max <- rep(1,ncol(R))
 # print.default(portf.minES.EqRB$constraints[[2]])
 
+# Add risk budget objective to minES portfolio with multiplier=0 so that it
+# is calculated, but does not affect optimization
+portf.minES <- add.objective(portf.minES, type="risk_budget", 
+                             name="ES", multiplier=0)
+
 # Combine the portfolios so we can make a single call to 
 # optimize.portfolio
 portf <- combine.portfolios(list(minES=portf.minES, 
@@ -256,11 +261,6 @@
 
 # Now we want to evaluate the optimization through time
 
-# Add risk budget objective to minES portfolio with multiplier=0 so that it
-# is calculated, but does not affect optimization
-portf.minES <- add.objective(portf.minES, type="risk_budget", 
-                             name="ES", multiplier=0)
-
 # Rebalancing parameters
 # Set rebalancing frequency
 rebal.freq <- "quarters"

Modified: pkg/PortfolioAnalytics/sandbox/RFinance2014/presentation.Rmd
===================================================================
--- pkg/PortfolioAnalytics/sandbox/RFinance2014/presentation.Rmd	2014-04-08 17:43:21 UTC (rev 3354)
+++ pkg/PortfolioAnalytics/sandbox/RFinance2014/presentation.Rmd	2014-04-08 19:22:04 UTC (rev 3355)
@@ -1,10 +1,12 @@
----
+% R/Finance 2014: Complex Portfolio Optimization with PortfolioAnalytics
+% Ross Bennett
+% May 16, 2014
+
+<!---
 title: "R/Finance 2014:Complex Portfolio Optimization with PortfolioAnalytics"
 author: Ross Bennett
 date: May 16, 2014
-output: beamer_presentation
-toc: true
----
+-->
 
 ```{r, echo=FALSE}
 library(knitr)
@@ -15,7 +17,7 @@
 # Portfolio Optimization
 
 ## General
-TODO: Add some general comments here about goals and pitfalls of optimizatio in the context of constructing a portfolio.
+TODO: Add some general comments here about goals and pitfalls of optimization in the context of constructing a portfolio.
 
 ## Modern Portfolio Theory
 "Modern" Portfolio Theory (MPT) was introduced by Harry Markowitz in 1952.
@@ -370,10 +372,16 @@
                                                traceDE=0)
 ```
 
-## Risk Contributions Through Time
-TODO: Add figure of risk budget
+## Min ES Risk Contributions Through Time
+![alt text](optimization_figures/risk_minES.png)
 
+## Min ES Risk Budget Limit Risk Contributions Through Time
+![alt text](optimization_figures/risk_minESRB.png)
 
+## Min ES Equal Component Contribution Risk Contributions Through Time
+![alt text](optimization_figures/risk_minESEqRB.png)
+
+
 ## Compute Returns and Chart Performance
 ```{r, eval=FALSE, tidy=FALSE}
 ret.bt.opt <- do.call(cbind, lapply(bt.opt.minES, 

Modified: pkg/PortfolioAnalytics/sandbox/RFinance2014/presentation.html
===================================================================
--- pkg/PortfolioAnalytics/sandbox/RFinance2014/presentation.html	2014-04-08 17:43:21 UTC (rev 3354)
+++ pkg/PortfolioAnalytics/sandbox/RFinance2014/presentation.html	2014-04-08 19:22:04 UTC (rev 3355)
@@ -183,11 +183,17 @@
 </head>
 
 <body>
+<!---
+title: "R/Finance 2014:Complex Portfolio Optimization with PortfolioAnalytics"
+author: Ross Bennett
+date: May 16, 2014
+-->
+
 <h1>Portfolio Optimization</h1>
 
 <h2>General</h2>
 
-<p>TODO: Add some general comments here about goals and pitfalls of optimizatio in the context of constructing a portfolio.</p>
+<p>TODO: Add some general comments here about goals and pitfalls of optimization in the context of constructing a portfolio.</p>
 
 <h2>Modern Portfolio Theory</h2>
 
@@ -469,7 +475,7 @@
 <pre><code class="r">plot(opt.dn, main="Dollar Neutral Portfolio", risk.col="StdDev", neighbors=10)
 </code></pre>
 
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/returnanalytics -r 3355


More information about the Returnanalytics-commits mailing list