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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Mar 17 19:53:22 CET 2011


Author: braverock
Date: 2011-03-17 19:53:22 +0100 (Thu, 17 Mar 2011)
New Revision: 585

Modified:
   pkg/blotter/R/updatePosPL.R
Log:
- apply patch from Eduardo Susini <eduardo <dot> susini <at> gmail <dot> com> to not double-count fees

Modified: pkg/blotter/R/updatePosPL.R
===================================================================
--- pkg/blotter/R/updatePosPL.R	2011-03-17 18:28:56 UTC (rev 584)
+++ pkg/blotter/R/updatePosPL.R	2011-03-17 18:53:22 UTC (rev 585)
@@ -121,7 +121,7 @@
 	tmpPL$Gross.Txn.Realized.PL <- ifelse(is.na(tmpPL$Gross.Txn.Realized.PL),0,tmpPL$Gross.Txn.Realized.PL)
 	
 	#tmpPL$Gross.Trading.PL <- tmpPL$Pos.Value - (tmpPL$Pos.Qty*tmpPL$Pos.Avg.Cost) +  tmpPL$Gross.Txn.Realized.PL
-	tmpPL$Period.Realized.PL <- tmpPL$Net.Txn.Realized.PL
+	tmpPL$Period.Realized.PL <- tmpPL$Gross.Txn.Realized.PL
 	tmpPL$Period.Unrealized.PL <- round(tmpPL$Gross.Trading.PL - tmpPL$Period.Realized.PL,2)
 	
 	# matrix calc Net.Trading.PL as Gross.Trading.PL + Txn.Fees



More information about the Blotter-commits mailing list