[R-SIG-Finance] PortfolioAnalytics / optimize.portfolio.parallel()

Brian G. Peterson brian at braverock.com
Tue Apr 10 22:28:43 CEST 2012


I don't see what Operating System you are on.

registerDoMC only works on linux, so I'll assume that.

Can you run the demos in the doMC vignette?

On Tue, 2012-04-10 at 22:22 +0200, Horst R. Wolf wrote:
> I tried to test optimize.portfolio.parallel(). Here is the result.What are "nodes"?
> 
> > registerDoMC()> > getDoParWorkers()[1] 4> getDoParName()[1] "doMC"> getDoParVersion()[1] "1.2.4"> data(indexes)> > ObjSpec <- constraint(assets=colnames(indexes[,1:4]), min=rep(0,4),max=rep(1,4),+                       min_sum=1,max_sum=1)assuming equal weighted seed portfolio> ObjSpec <- add.objective(constraints=ObjSpec,+                          type="risk_budget_objective", name="CVaR",+                          arguments=list(p=.95,clean="boudt"),+                          min_concentration=TRUE, enabled=TRUE)> set.seed(1234)> out <- optimize.portfolio.parallel(R=indexes[,1:4],constraints=ObjSpec,+             optimize_method=c("DEoptim"),search_size=5000,trace=FALSE,nodes=4)Fehler in eval(expr, envir, enclos) : Objekt 'nodes.' nicht gefunden> sessionInfo()R version 2.14.1 (2011-12-22)Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
> locale:[1] C/en_US.UTF-8/C/C/C/C
> attached base packages:[1] stats     graphics  grDevices utils     datasets  methods   base     
> other attached packages: [1] doMC_1.2.4                   multicore_0.1-7              foreach_1.3.5                [4] codetools_0.2-8              iterators_1.0.5              DEoptim_2.2-0                [7] quantmod_0.3-17              TTR_0.21-1                   Defaults_1.1-1              [10] PortfolioAnalytics_0.6.1     PerformanceAnalytics_1.0.4.4 xts_0.8-6                   [13] zoo_1.7-7                   
> loaded via a namespace (and not attached):[1] blotter_0.8.4    grid_2.14.1      lattice_0.20-6   parallel_2.14.1  quantstrat_0.6.1[6] tools_2.14.1    
>   Horst R. Wolf
> e mail     horstrwolf at msn.com
> 
> 
> 
>  		 	   		  
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.

-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock



More information about the R-SIG-Finance mailing list