-
Notifications
You must be signed in to change notification settings - Fork 48
/
chart.Reconcile.Rd
45 lines (37 loc) · 2.12 KB
/
chart.Reconcile.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chart.Reconcile.R
\name{chart.Reconcile}
\alias{chart.Reconcile}
\title{Chart trades against market data, position through time, and cumulative P\&L}
\usage{
chart.Reconcile(theoPort, actualPort, Symbol, Dates = NULL, ...,
PLdiff = c("cumulative", "episodic"), data = c(FALSE, "View", "return"))
}
\arguments{
\item{theoPort}{string identifying the theoretical portfolio to chart}
\item{actualPort}{string identifying the actual portfolio to chart}
\item{Symbol}{string identifying the symbol to chart}
\item{Dates}{xts ISO 8601 style subsetting}
\item{\dots}{any other passthru parameters to \code{\link[quantmod]{chart_Series}}}
\item{PLdiff}{one of 'cumulative' or 'episodic', see Details.}
\item{data}{what to do with the calculated data, see Details}
}
\description{
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.
}
\details{
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 \code{PLdiff} is 'cumulative', then this panel will display the cumsum of difference between the theoretical and actual portfolios.
If parameter \code{PLdiff} is 'episodic' it will display the differences in P&L
The \code{data} parameter allows the user to either \code{\link{View}} or \code{\link{return}} the data calculated inside the chart. Default FALSE (only chart)
}
\note{
Expect changes to this function, since the underlying charts are experimental functions in quantmod.
}
\seealso{
\code{\link{chart.Posn}}
}