chart.Reconcile: Chart trades against market data, position through time, and...

Description Usage Arguments Details Note See Also

View source: R/chart.Reconcile.R


Produces a three or four-panel or 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.


chart.Reconcile(theoPort, actualPort, Symbol, Dates = NULL, ...,
  PLdiff = c("cumulative", "episodic"), data = c(FALSE, "View", "return"))



string identifying the theoretical portfolio to chart


string identifying the actual portfolio to chart


string identifying the symbol to chart


xts ISO 8601 style subsetting


one of 'cumulative' or 'episodic', see Details.


what to do with the calculated data, see Details


any other passthru parameters to chart_Series


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. If parameter PLdiff is 'cumulative', then this panel will display the cumsum of difference between the theoretical and actual portfolios. If parameter PLdiff is 'episodic' it will display the differences in P&L

The data parameter allows the user to either View or return the data calculated inside the chart. Default FALSE (only chart)


Expect changes to this function, since the underlying charts are experimental functions in quantmod.

See Also


cloudcell/blotter documentation built on May 13, 2019, 8:01 p.m.