[Blotter-commits] r829 - pkg/blotter/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Oct 25 23:26:37 CEST 2011
Author: braverock
Date: 2011-10-25 23:26:34 +0200 (Tue, 25 Oct 2011)
New Revision: 829
Modified:
pkg/blotter/R/calcPosAvgCost.R
Log:
- fix typo, thanks to Garrett
Modified: pkg/blotter/R/calcPosAvgCost.R
===================================================================
--- pkg/blotter/R/calcPosAvgCost.R 2011-10-25 21:04:47 UTC (rev 828)
+++ pkg/blotter/R/calcPosAvgCost.R 2011-10-25 21:26:34 UTC (rev 829)
@@ -12,7 +12,7 @@
if(PosQty == 0)
PosAvgCost = 0
else {
- if(PrevePosAvgCost<0) TxnValue= -1*TxnValue #fix bug with negative average cost
+ if(PrevPosAvgCost<0) TxnValue= -1*TxnValue #fix bug with negative average cost
# PosAvgCost = abs((PrevPosQty * PrevPosAvgCost * ConMult + TxnValue)/(PosQty*ConMult))
PosAvgCost = (PrevPosQty * PrevPosAvgCost * ConMult + TxnValue)/(PosQty*ConMult)
}
More information about the Blotter-commits
mailing list