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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Sep 1 13:25:16 CEST 2011


Author: braverock
Date: 2011-09-01 13:25:16 +0200 (Thu, 01 Sep 2011)
New Revision: 748

Modified:
   pkg/blotter/R/tradeStats.R
Log:
- fix number of trades, we weren't backing out the initialization row, thanks to bug report from Wonjae Lee

Modified: pkg/blotter/R/tradeStats.R
===================================================================
--- pkg/blotter/R/tradeStats.R	2011-08-29 12:27:44 UTC (rev 747)
+++ pkg/blotter/R/tradeStats.R	2011-09-01 11:25:16 UTC (rev 748)
@@ -91,7 +91,7 @@
             MedTradePL <- median(PL.ne0)
             StdTradePL <- as.numeric(sd(PL.ne0))   
             
-            NumberOfTrades <- nrow(txn)
+            NumberOfTrades <- nrow(txn)-1
             
             PercentPositive <- (nrow(PL.gt0)/nrow(PL.ne0))*100
             PercentNegative <- (nrow(PL.lt0)/nrow(PL.ne0))*100



More information about the Blotter-commits mailing list