[Blotter-commits] r556 - pkg/blotter/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Feb 11 18:58:25 CET 2011


Author: braverock
Date: 2011-02-11 18:58:25 +0100 (Fri, 11 Feb 2011)
New Revision: 556

Modified:
   pkg/blotter/R/updateEndEq.R
Log:
- apply patch to vectorize updateEndEq contributed by Grigory Bykov, fixes bug reported by Mark Breman on R-Forge bug 836 (not W.W.)

Modified: pkg/blotter/R/updateEndEq.R
===================================================================
--- pkg/blotter/R/updateEndEq.R	2011-02-11 17:48:44 UTC (rev 555)
+++ pkg/blotter/R/updateEndEq.R	2011-02-11 17:58:25 UTC (rev 556)
@@ -27,11 +27,11 @@
     Additions = Account$summary[Dates]$Additions
     Withdrawals = Account$summary[Dates]$Withdrawals
     NetPerformance = rowSums(Account$summary[Dates,c('Int.Income','Net.Trading.PL', 'Advisory.Fees')])
-	# assign NetPerformance into the account slot
+	# assign NetPerformance into the account slot 
     Account$summary$Net.Performance[Dates] <- NetPerformance
 
     # Create a vector of end equity
-    EndCapital = PrevEndEq + cumsum(Additions + Withdrawals + NetPerformance)
+    EndCapital = PrevEndEq + cumsum(Additions + Withdrawals + NetPerformance) 
     Account$summary$End.Eq[Dates] <- EndCapital
 	
     assign(paste("account",aname,sep='.'),Account, envir=.blotter) 



More information about the Blotter-commits mailing list