[Blotter-commits] r555 - pkg/blotter/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Feb 11 18:48:44 CET 2011
Author: braverock
Date: 2011-02-11 18:48:44 +0100 (Fri, 11 Feb 2011)
New Revision: 555
Modified:
pkg/blotter/R/updateEndEq.R
Log:
- apply patch to vectorize updateEndEq contributed by Grigory Bykov, fixes bug reported by Wolfgang Wu
Modified: pkg/blotter/R/updateEndEq.R
===================================================================
--- pkg/blotter/R/updateEndEq.R 2011-02-11 14:42:02 UTC (rev 554)
+++ pkg/blotter/R/updateEndEq.R 2011-02-11 17:48:44 UTC (rev 555)
@@ -31,7 +31,7 @@
Account$summary$Net.Performance[Dates] <- NetPerformance
# Create a vector of end equity
- EndCapital = PrevEndEq + 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