[Returnanalytics-commits] r1911 - pkg/PortfolioAnalytics/sandbox

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 26 19:39:34 CEST 2012


Author: braverock
Date: 2012-04-26 19:39:33 +0200 (Thu, 26 Apr 2012)
New Revision: 1911

Modified:
   pkg/PortfolioAnalytics/sandbox/script.workshop2012.R
Log:
- resolve conflicts, add quarterly index for edhec.

Modified: pkg/PortfolioAnalytics/sandbox/script.workshop2012.R
===================================================================
--- pkg/PortfolioAnalytics/sandbox/script.workshop2012.R	2012-04-26 17:17:53 UTC (rev 1910)
+++ pkg/PortfolioAnalytics/sandbox/script.workshop2012.R	2012-04-26 17:39:33 UTC (rev 1911)
@@ -97,8 +97,10 @@
 
 ## Autocorrelation
 
+#########################################################################
+# Optimization starts here
+########################################################################
 
-
 # Set up objectives as buoys
 ## Equal contribution to
 ### Weight
@@ -155,9 +157,8 @@
 
 # Select a rebalance period
 rebalance_period = 'quarters' # uses endpoints identifiers from xts
-clean = "none" #"boudt" #"none"
-# permutations = 1000
-permutations = 200
+clean = "boudt" #"none"
+permutations = 4000
 
 # A set of box constraints used to initialize ALL the bouy portfolios
 init.constr <- constraint(assets = colnames(edhec.R),
@@ -170,6 +171,7 @@
 # Add measure 1, annualized return
 init.constr <- add.objective(constraints=init.constr,
   type="return", # the kind of objective this is
+  #name="pamean",
   name="pameanLCL",
   enabled=TRUE, # enable or disable the objective
   multiplier=0, # calculate it but don't use it in the objective
@@ -241,11 +243,11 @@
 
 start_time<-Sys.time()
 ### Evaluate BUOY 1: Constrained Mean-StdDev Portfolio
-MeanSD.RND<-optimize.portfolio(R=edhec.R,
-  constraints=MeanSD.constr,
-  optimize_method='random',
-  search_size=1000, trace=TRUE, verbose=TRUE,
-  rp=rp) # use the same random portfolios generated above
+# MeanSD.RND<-optimize.portfolio(R=edhec.R,
+#   constraints=MeanSD.constr,
+#   optimize_method='random',
+#   search_size=1000, trace=TRUE, verbose=TRUE,
+#   rp=rp) # use the same random portfolios generated above
 # plot(MeanSD.RND, risk.col="pasd.pasd", return.col="mean")
 # Evaluate the objectives through time 
 ### requires PortfolioAnalytics build >= 1864



More information about the Returnanalytics-commits mailing list