[Blotter-commits] r1242 - pkg/quantstrat/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Nov 8 17:44:01 CET 2012


Author: braverock
Date: 2012-11-08 17:44:01 +0100 (Thu, 08 Nov 2012)
New Revision: 1242

Modified:
   pkg/quantstrat/R/applyStrategy.rebalancing.R
Log:
- pass portfolio to rebalance fn via ruleProc

Modified: pkg/quantstrat/R/applyStrategy.rebalancing.R
===================================================================
--- pkg/quantstrat/R/applyStrategy.rebalancing.R	2012-11-08 15:47:44 UTC (rev 1241)
+++ pkg/quantstrat/R/applyStrategy.rebalancing.R	2012-11-08 16:44:01 UTC (rev 1242)
@@ -25,7 +25,9 @@
                                       initStrat=FALSE, 
                                       updateStrat=FALSE ) 
 {
-   
+    # TODO request add suite of strategies capability to rebalancing tests, 
+    #      might be here or in a new applyStrategySuite fn (req from Chinmay)
+    
     ret<-list()
     
     if (!is.strategy(strategy)) {
@@ -151,7 +153,14 @@
                     #this index is a rebalancing index for period
                     #call the rebalance rules for this period
                     #still need to separate the rules by rebalancing period, this will call them all
-                    ruleProc(s$rules$rebalance,timestamp=pindex[i], path.dep=TRUE, 'rebalance', ..., mktdata=md_subset, parameters=parameters)
+                    ruleProc(s$rules$rebalance,
+                             timestamp=pindex[i], 
+                             path.dep=TRUE, 
+                             ruletype='rebalance', 
+                             ..., 
+                             mktdata=md_subset, 
+                             parameters=parameters,
+                             portfolio=portfolio)
                 }
             }
         }



More information about the Blotter-commits mailing list