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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jan 24 21:45:42 CET 2011


Author: braverock
Date: 2011-01-24 21:45:42 +0100 (Mon, 24 Jan 2011)
New Revision: 541

Modified:
   pkg/blotter/R/tradeStats.R
Log:
- fix formatting of return object in dailyStats

Modified: pkg/blotter/R/tradeStats.R
===================================================================
--- pkg/blotter/R/tradeStats.R	2011-01-24 20:41:56 UTC (rev 540)
+++ pkg/blotter/R/tradeStats.R	2011-01-24 20:45:42 UTC (rev 541)
@@ -287,7 +287,7 @@
         
         #NumberOfDays <- nrow(txn)
         WinDays <-length(PL.gt0)
-        LossDays<-length(PL.ne0)
+        LossDays<-length(PL.lt0)
         PercentPositive <- (length(PL.gt0)/length(PL.ne0))*100
         PercentNegative <- (length(PL.lt0)/length(PL.ne0))*100
         
@@ -353,6 +353,7 @@
         rownames(ret)[row]<-names(tmpret)[row]
     }
     #rownames(ret)<-colnames(dailyPL)
+    ret<-round(ret,2)
     return(ret)
 }
 



More information about the Blotter-commits mailing list