[Returnanalytics-commits] r2838 - pkg/PortfolioAnalytics/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Aug 20 19:10:09 CEST 2013


Author: rossbennett34
Date: 2013-08-20 19:10:09 +0200 (Tue, 20 Aug 2013)
New Revision: 2838

Modified:
   pkg/PortfolioAnalytics/R/optimize.portfolio.R
Log:
returning the returns object, R, in optimize.portfolio if trace=TRUE.

Modified: pkg/PortfolioAnalytics/R/optimize.portfolio.R
===================================================================
--- pkg/PortfolioAnalytics/R/optimize.portfolio.R	2013-08-20 17:05:15 UTC (rev 2837)
+++ pkg/PortfolioAnalytics/R/optimize.portfolio.R	2013-08-20 17:10:09 UTC (rev 2838)
@@ -831,7 +831,7 @@
   # print(c("elapsed time:",round(end_t-start_t,2),":diff:",round(diff,2), ":stats: ", round(out$stats,4), ":targets:",out$targets))
   if(message) message(c("elapsed time:", end_t-start_t))
   out$portfolio <- portfolio
-  out$R <- R
+  if(trace) out$R <- R
   out$data_summary <- list(first=first(R), last=last(R))
   out$elapsed_time <- end_t - start_t
   out$end_t <- as.character(Sys.time())



More information about the Returnanalytics-commits mailing list