[Blotter-commits] r533 - in pkg/blotter: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jan 17 16:23:56 CET 2011


Author: braverock
Date: 2011-01-17 16:23:56 +0100 (Mon, 17 Jan 2011)
New Revision: 533

Modified:
   pkg/blotter/R/chart.Posn.R
   pkg/blotter/R/chart.Reconcile.R
   pkg/blotter/man/chart.Reconcile.Rd
Log:
- update chart.Reocncile documentation

Modified: pkg/blotter/R/chart.Posn.R
===================================================================
--- pkg/blotter/R/chart.Posn.R	2011-01-17 15:11:32 UTC (rev 532)
+++ pkg/blotter/R/chart.Posn.R	2011-01-17 15:23:56 UTC (rev 533)
@@ -6,8 +6,7 @@
 #' @param Portfolio string identifying the portfolio to chart
 #' @param Symbol string identifying the symbol to chart
 #' @param Dates currently not used
-#' @param ... any other passthru parameters to \code{\link[quantmod:chart_Series]chart_Series}}
-#' @seealso
+#' @param \dots any other passthru parameters to \code{\link[quantmod]{chart_Series}}
 #' @export
 chart.Posn <- function(Portfolio, Symbol, Dates = NULL, ...)
 { # @author Peter Carl

Modified: pkg/blotter/R/chart.Reconcile.R
===================================================================
--- pkg/blotter/R/chart.Reconcile.R	2011-01-17 15:11:32 UTC (rev 532)
+++ pkg/blotter/R/chart.Reconcile.R	2011-01-17 15:23:56 UTC (rev 533)
@@ -1,7 +1,12 @@
 #' Chart trades against market data, position through time, and cumulative P\&L
 #'
-#' Produces a three-panel chart of time series charts that contains prices and transactions in the top panel, the resulting position in the second, and a cumulative profit-loss line chart in the third.
+#' Produces a four-panel chart of time series charts that contains prices and transactions in the top panel, the resulting position in the second, a cumulative profit-loss line chart in the third.  
+#' The theoretical trades, positions, and P&L are plotted first, in the 'light' versions of the colors, and then the actual values are overplotted in the main color.  
+#' If they agree completely, the theoretical values will not be visible.  Differences will make themselves visible by misalignment of the symbols or lines. 
+#' The fourth panel is the difference in P&L between the theoretical and actual values, and could be considered 'slippage', which could be positive or negative.  
+#' It is calculated by subtracting the theoretical P&L from the actual P&L.   
 #'
+#' 
 #' @param theoPort string identifying the theoretical portfolio to chart
 #' @param actualPort string identifying the actual portfolio to chart
 #' @param Symbol string identifying the symbol to chart
@@ -91,7 +96,7 @@
     if(!is.null(CumPL)) {
         (add_TA(CumPL, col='darkgreen', lwd=2))
         if(!is.null(PLdifference)){
-            (add_TA(PLdifference, col='darkgreen', lwd=2))
+            (add_TA(PLdifference, col='lightred', lwd=2))
         }    
     } 
     plot(current.chob())

Modified: pkg/blotter/man/chart.Reconcile.Rd
===================================================================
--- pkg/blotter/man/chart.Reconcile.Rd	2011-01-17 15:11:32 UTC (rev 532)
+++ pkg/blotter/man/chart.Reconcile.Rd	2011-01-17 15:23:56 UTC (rev 533)
@@ -3,7 +3,11 @@
 \title{Chart trades against market data, position through time, and cumulative P\&L...}
 \usage{chart.Reconcile(theoPort, actualPort, Symbol, Dates, ...)}
 \description{Chart trades against market data, position through time, and cumulative P\&L}
-\details{Produces a three-panel chart of time series charts that contains prices and transactions in the top panel, the resulting position in the second, and a cumulative profit-loss line chart in the third.}
+\details{Produces a four-panel chart of time series charts that contains prices and transactions in the top panel, the resulting position in the second, a cumulative profit-loss line chart in the third.  
+The theoretical trades, positions, and P&L are plotted first, in the 'light' versions of the colors, and then the actual values are overplotted in the main color.  
+If they agree completely, the theoretical values will not be visible.  Differences will make themselves visible by misalignment of the symbols or lines. 
+The fourth panel is the difference in P&L between the theoretical and actual values, and could be considered 'slippage', which could be positive or negative.  
+It is calculated by subtracting the theoretical P&L from the actual P&L.}
 \seealso{\code{\link{chart.Posn}}}
 \note{Expect changes to this function, since the underlying charts are experimental functions in quantmod.}
 \arguments{\item{theoPort}{string identifying the theoretical portfolio to chart}



More information about the Blotter-commits mailing list