[Returnanalytics-commits] r3409 - pkg/PerformanceAnalytics/sandbox
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Jun 7 17:14:49 CEST 2014
Author: peter_carl
Date: 2014-06-07 17:14:48 +0200 (Sat, 07 Jun 2014)
New Revision: 3409
Modified:
pkg/PerformanceAnalytics/sandbox/refactored.Portfolio.rebalancing.R
Log:
- added to examples
Modified: pkg/PerformanceAnalytics/sandbox/refactored.Portfolio.rebalancing.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/refactored.Portfolio.rebalancing.R 2014-06-07 02:07:47 UTC (rev 3408)
+++ pkg/PerformanceAnalytics/sandbox/refactored.Portfolio.rebalancing.R 2014-06-07 15:14:48 UTC (rev 3409)
@@ -421,6 +421,13 @@
#' data(edhec)
#' Return.rebalancing(edhec["1997",1:5], rebalance="quarterly") # returns time series
#' Return.rebalancing(edhec["1997",1:5], rebalance="quarterly", verbose=TRUE) # returns list
+#' # with a weights object
+#' data(weights) # rebalance at the beginning of the year to various weights through time
+#' chart.StackedBar(weights)
+#' x <- Return.rebalancing(edhec["2000::",1:11], weights=weights,verbose=TRUE)
+#' chart.CumReturns(x$returns)
+#' chart.StackedBar(x$BOP.Weight)
+#' chart.StackedBar(x$BOP.Value)
#' @export
Return.rebalancing3 <- function(R,
weights=NULL,
More information about the Returnanalytics-commits
mailing list