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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jun 30 17:51:36 CEST 2011


Author: gsee
Date: 2011-06-30 17:51:35 +0200 (Thu, 30 Jun 2011)
New Revision: 657

Modified:
   pkg/blotter/R/addTxn.R
Log:
-addDiv now prints a positive value to screen when a long position receives a dividend.

Modified: pkg/blotter/R/addTxn.R
===================================================================
--- pkg/blotter/R/addTxn.R	2011-06-29 22:00:56 UTC (rev 656)
+++ pkg/blotter/R/addTxn.R	2011-06-30 15:51:35 UTC (rev 657)
@@ -238,7 +238,7 @@
     Portfolio$symbols[[Symbol]]$txn<-rbind(Portfolio$symbols[[Symbol]]$txn, NewTxn)
 
     if(verbose)
-        print(paste(TxnDate, Symbol, "Dividend", DivPerShare, "on", PrevPosQty, "shares:", TxnValue, sep=" "))
+        print(paste(TxnDate, Symbol, "Dividend", DivPerShare, "on", PrevPosQty, "shares:", -TxnValue, sep=" "))
         #print(Portfolio$symbols[[Symbol]]$txn)
 
     assign(paste("portfolio",pname,sep='.'),Portfolio,envir=.blotter)



More information about the Blotter-commits mailing list