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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jan 14 14:55:19 CET 2010


Author: braverock
Date: 2010-01-14 14:55:19 +0100 (Thu, 14 Jan 2010)
New Revision: 150

Modified:
   pkg/blotter/R/initTxn.R
Log:
-add contract multiplier

Modified: pkg/blotter/R/initTxn.R
===================================================================
--- pkg/blotter/R/initTxn.R	2010-01-14 13:54:19 UTC (rev 149)
+++ pkg/blotter/R/initTxn.R	2010-01-14 13:55:19 UTC (rev 150)
@@ -16,8 +16,8 @@
     # FUNCTION
     ## TODO: Add 'Txn.Type' column
     ## TODO: DIVIDEND Txn.Type creates a realized gain
-    txn <- xts( as.matrix(t(c(0,0,0,0,0,initPosQty,0,0))), order.by=as.POSIXct(initDate) )
-    colnames(txn) <- c('Txn.Qty', 'Txn.Price', 'Txn.Fees', 'Txn.Value', 'Txn.Avg.Cost', 'Pos.Qty', 'Pos.Avg.Cost', 'Realized.PL')
+    txn <- xts( as.matrix(t(c(0,0,0,0,0,initPosQty,0,0,0))), order.by=as.POSIXct(initDate) )
+    colnames(txn) <- c('Txn.Qty', 'Txn.Price', 'Txn.Fees', 'Txn.Value', 'Txn.Avg.Cost', 'Pos.Qty', 'Pos.Avg.Cost', 'Realized.PL','Con.Mult')
     class(txn)<-c("transactions",class(txn))
     return(txn)
 }



More information about the Blotter-commits mailing list