[Blotter-commits] r1589 - in pkg/blotter: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Mar 8 17:25:04 CET 2014
Author: braverock
Date: 2014-03-08 17:25:03 +0100 (Sat, 08 Mar 2014)
New Revision: 1589
Modified:
pkg/blotter/R/tradeStats.R
pkg/blotter/man/AcctReturns.Rd
pkg/blotter/man/PortfReturns.Rd
pkg/blotter/man/addAcctTxn.Rd
pkg/blotter/man/addDiv.Rd
pkg/blotter/man/addPortfInstr.Rd
pkg/blotter/man/addTxn.Rd
pkg/blotter/man/calcPortfWgt.Rd
pkg/blotter/man/calcPosAvgCost.Rd
pkg/blotter/man/calcTxnAvgCost.Rd
pkg/blotter/man/calcTxnValue.Rd
pkg/blotter/man/chart.ME.Rd
pkg/blotter/man/chart.Posn.Rd
pkg/blotter/man/chart.Reconcile.Rd
pkg/blotter/man/chart.Spread.Rd
pkg/blotter/man/dailyTxnPL.Rd
pkg/blotter/man/extractTxns.Rd
pkg/blotter/man/getAccount.Rd
pkg/blotter/man/getByPortf.Rd
pkg/blotter/man/getBySymbol.Rd
pkg/blotter/man/getEndEq.Rd
pkg/blotter/man/getPortfAcct.Rd
pkg/blotter/man/getPortfolio.Rd
pkg/blotter/man/getPos.Rd
pkg/blotter/man/getPosAvgCost.Rd
pkg/blotter/man/getPosQty.Rd
pkg/blotter/man/getTxns.Rd
pkg/blotter/man/initAcct.Rd
pkg/blotter/man/initPortf.Rd
pkg/blotter/man/initPosPL.Rd
pkg/blotter/man/initSummary.Rd
pkg/blotter/man/initTxn.Rd
pkg/blotter/man/is.account.Rd
pkg/blotter/man/is.portfolio.Rd
pkg/blotter/man/pennyPerShare.Rd
pkg/blotter/man/perTradeStats.Rd
pkg/blotter/man/put.account.Rd
pkg/blotter/man/put.portfolio.Rd
pkg/blotter/man/tradeQuantiles.Rd
pkg/blotter/man/tradeStats.Rd
pkg/blotter/man/updateAcct.Rd
pkg/blotter/man/updateEndEq.Rd
pkg/blotter/man/updatePortf.Rd
pkg/blotter/man/updatePosPL.Rd
Log:
- fix typos in tradeStats docs
- upgrade to latest roxygen2
Modified: pkg/blotter/R/tradeStats.R
===================================================================
--- pkg/blotter/R/tradeStats.R 2014-03-05 14:29:09 UTC (rev 1588)
+++ pkg/blotter/R/tradeStats.R 2014-03-08 16:25:03 UTC (rev 1589)
@@ -57,7 +57,7 @@
#' \item{Std.Dev.Trade.PL}{ standard deviation of trade P&L }
#' \item{Percent.Positive}{ percent of trades that end positive }
#' \item{Percent.Negative}{ percent of trades that end negative }
-#' \item{Profit.Factor}{ absolute value ration of gross profits over gross losses }
+#' \item{Profit.Factor}{ absolute value ratio of gross profits over gross losses }
#' \item{Avg.Win.Trade}{ mean P&L of profitabloe trades }
#' \item{Med.Win.Trade}{ median P&L of profitable trades }
#' \item{Avg.Losing.Trade}{ mean P&L of losing trades }
@@ -67,7 +67,7 @@
#' \item{Std.Dev.Daily.PL}{ standard deviation of daily P&L }
#' \item{Max.Drawdown}{ max drawdown }
#' \item{Avg.WinLoss.Ratio}{ ratio of mean winning over mean losing trade }
-#' \item{Med.WinLoss.Ratio}{ ratio of median winning trade over mean losing trade }
+#' \item{Med.WinLoss.Ratio}{ ratio of median winning trade over median losing trade }
#' \item{Max.Equity}{ maximum account equity }
#' \item{Min.Equity}{ minimum account equity }
#' }
Modified: pkg/blotter/man/AcctReturns.Rd
===================================================================
--- pkg/blotter/man/AcctReturns.Rd 2014-03-05 14:29:09 UTC (rev 1588)
+++ pkg/blotter/man/AcctReturns.Rd 2014-03-08 16:25:03 UTC (rev 1589)
@@ -1,88 +1,87 @@
-\name{AcctReturns}
-\alias{AcctReturns}
-\title{Calculate account returns}
-\usage{
- AcctReturns(Account, Dates = NULL, Portfolios = NULL,
- method = c("timeweighted", "dietz"), ...)
-}
-\arguments{
- \item{Account}{string name of the account to generate
- returns for}
-
- \item{\dots}{any other passthru parameters (like
- \code{native} for \code{.getBySymbol}}
-
- \item{Dates}{xts style ISO 8601 date subset to retrieve,
- default NULL (all dates)}
-
- \item{Portfolios}{concatenated string vector for
- portfolio names to retrieve returns on, default NULL (all
- portfolios)}
-
- \item{method}{Used to select between time-weighted and
- linked modified Dietz returns. May be any of:
- \itemize{\item timeweighted \item dietz} By default
- time-weighted is selected}
-}
-\value{
- returns xts with account returns
-}
-\description{
- Similar to the \code{PortfReturns} function, but gives
- returns for the entire account and takes into account
- external cashflows. External cashflows are defined as
- contributions to or withdrawals from the account. Allows
- selecting between time-weighted returns and linked
- modified Dietz approach. If time-weighted method is
- selected, returns at time \eqn{t} are computed using:
- \deqn{r_{t}=\frac{V_{t}}{V_{t-1}+C_{t}}-1} where
- \eqn{V_{t}} - account value at time \eqn{t}, \eqn{C_{t}}
- - cashflow at time \eqn{t}. The implicit assumption made
- here is that the cash flow is available for the portfolio
- manager to invest from the beginning of the day. These
- returns then can be chain linked with geometric
- compounding (for instance using \code{Return.cumulative}
- function from the \code{PerformanceAnalytics} package) to
- yield cumulative multi-period returns:
- \deqn{1+r=\prod_{t=1}^{T}(1+r_{t})=\prod_{t=1}^{T}\frac{V_{t}}{V_{t-1}+C_{t}}}
- In the case if there were no cashflows, the result
- reduces to simple one-period returns. Time-weighted
- returns has also an interpretation in terms of unit value
- pricing. If Modified Dietz method is selected, monthly
- returns are computed taking into account cashflows within
- each month: \deqn{r =
- \frac{V_{t}-V_{t-1}-C}{V_{t-1}+\sum_{t}C_{t}\times
- W_{t}}} where \eqn{C} - total external cash flows within
- a month, \eqn{C_{t}} - external cashflow at time \eqn{t},
- \deqn{W_{t}=\frac{TD-D_{t}}{TD}} - weighting ratio to be
- applied to external cashflow on day \eqn{t}, \eqn{TD} -
- total number of days within the month, \eqn{D_{t}} -
- number of days since the beginning of the month including
- weekends and public holidays. Finally monthly Modified
- Dietz returns can also be linked geometrically.
-}
-\note{
- TODO handle portfolio and account in different currencies
- (not hard, just not done)
-
- TODO explicitly handle portfolio weights
-
- TODO support additions and withdrawals to available
- capital
-}
-\author{
- Brian Peterson, Andrii Babii
-}
-\references{
- Christopherson, Jon A., Carino, David R., Ferson, Wayne
- E. \emph{Portfolio Performance Measurement and
- Benchmarking}. McGraw-Hill. 2009. Chapter 5 \cr Bacon, C.
- \emph{Practical Portfolio Performance Measurement and
- Attribution}. Wiley. 2004. Chapter 2 \cr
-}
-\seealso{
- PortfReturns
-}
-\keyword{portfolio}
-\keyword{returns}
-
+\name{AcctReturns}
+\alias{AcctReturns}
+\title{Calculate account returns}
+\usage{
+AcctReturns(Account, Dates = NULL, Portfolios = NULL,
+ method = c("timeweighted", "dietz"), ...)
+}
+\arguments{
+ \item{Account}{string name of the account to generate
+ returns for}
+
+ \item{\dots}{any other passthru parameters (like
+ \code{native} for \code{.getBySymbol}}
+
+ \item{Dates}{xts style ISO 8601 date subset to retrieve,
+ default NULL (all dates)}
+
+ \item{Portfolios}{concatenated string vector for
+ portfolio names to retrieve returns on, default NULL (all
+ portfolios)}
+
+ \item{method}{Used to select between time-weighted and
+ linked modified Dietz returns. May be any of:
+ \itemize{\item timeweighted \item dietz} By default
+ time-weighted is selected}
+}
+\value{
+returns xts with account returns
+}
+\description{
+Similar to the \code{PortfReturns} function, but gives
+returns for the entire account and takes into account
+external cashflows. External cashflows are defined as
+contributions to or withdrawals from the account. Allows
+selecting between time-weighted returns and linked modified
+Dietz approach. If time-weighted method is selected,
+returns at time \eqn{t} are computed using:
+\deqn{r_{t}=\frac{V_{t}}{V_{t-1}+C_{t}}-1} where
+\eqn{V_{t}} - account value at time \eqn{t}, \eqn{C_{t}} -
+cashflow at time \eqn{t}. The implicit assumption made here
+is that the cash flow is available for the portfolio
+manager to invest from the beginning of the day. These
+returns then can be chain linked with geometric compounding
+(for instance using \code{Return.cumulative} function from
+the \code{PerformanceAnalytics} package) to yield
+cumulative multi-period returns:
+\deqn{1+r=\prod_{t=1}^{T}(1+r_{t})=\prod_{t=1}^{T}\frac{V_{t}}{V_{t-1}+C_{t}}}
+In the case if there were no cashflows, the result reduces
+to simple one-period returns. Time-weighted returns has
+also an interpretation in terms of unit value pricing. If
+Modified Dietz method is selected, monthly returns are
+computed taking into account cashflows within each month:
+\deqn{r =
+\frac{V_{t}-V_{t-1}-C}{V_{t-1}+\sum_{t}C_{t}\times W_{t}}}
+where \eqn{C} - total external cash flows within a month,
+\eqn{C_{t}} - external cashflow at time \eqn{t},
+\deqn{W_{t}=\frac{TD-D_{t}}{TD}} - weighting ratio to be
+applied to external cashflow on day \eqn{t}, \eqn{TD} -
+total number of days within the month, \eqn{D_{t}} - number
+of days since the beginning of the month including weekends
+and public holidays. Finally monthly Modified Dietz returns
+can also be linked geometrically.
+}
+\note{
+TODO handle portfolio and account in different currencies
+(not hard, just not done)
+
+TODO explicitly handle portfolio weights
+
+TODO support additions and withdrawals to available capital
+}
+\author{
+Brian Peterson, Andrii Babii
+}
+\references{
+Christopherson, Jon A., Carino, David R., Ferson, Wayne E.
+\emph{Portfolio Performance Measurement and Benchmarking}.
+McGraw-Hill. 2009. Chapter 5 \cr Bacon, C. \emph{Practical
+Portfolio Performance Measurement and Attribution}. Wiley.
+2004. Chapter 2 \cr
+}
+\seealso{
+PortfReturns
+}
+\keyword{portfolio}
+\keyword{returns}
+
Modified: pkg/blotter/man/PortfReturns.Rd
===================================================================
--- pkg/blotter/man/PortfReturns.Rd 2014-03-05 14:29:09 UTC (rev 1588)
+++ pkg/blotter/man/PortfReturns.Rd 2014-03-08 16:25:03 UTC (rev 1589)
@@ -2,9 +2,8 @@
\alias{PortfReturns}
\title{Calculate portfolio instrument returns}
\usage{
- PortfReturns(Account, method = c("contribution"), ...,
- Dates = NULL, Portfolios = NULL,
- period = c("daily", "none"))
+PortfReturns(Account, method = c("contribution"), ..., Dates = NULL,
+ Portfolios = NULL, period = c("daily", "none"))
}
\arguments{
\item{Account}{string name of the account to generate
@@ -25,25 +24,24 @@
\item{period}{one of daily}
}
\description{
- This function (for now) calculates return on initial
- equity for each instrument in the portfolio or portfolios
- that make up an account. These columns will be additive
- to return on capital of each portfolio, or of the entire
- account.
+This function (for now) calculates return on initial equity
+for each instrument in the portfolio or portfolios that
+make up an account. These columns will be additive to
+return on capital of each portfolio, or of the entire
+account.
}
\details{
- This function exists because of R/Finance community
- requests by Mark Breman and Thomas Bolton
+This function exists because of R/Finance community
+requests by Mark Breman and Thomas Bolton
}
\note{
- TODO handle portfolio and account in different currencies
- (not hard, just not done)
+TODO handle portfolio and account in different currencies
+(not hard, just not done)
- TODO explicitly handle portfolio weights
+TODO explicitly handle portfolio weights
- TODO provide additional methods of calculating returns
+TODO provide additional methods of calculating returns
- TODO support additions and withdrawals to available
- capital
+TODO support additions and withdrawals to available capital
}
Modified: pkg/blotter/man/addAcctTxn.Rd
===================================================================
--- pkg/blotter/man/addAcctTxn.Rd 2014-03-05 14:29:09 UTC (rev 1588)
+++ pkg/blotter/man/addAcctTxn.Rd 2014-03-08 16:25:03 UTC (rev 1589)
@@ -2,9 +2,8 @@
\alias{addAcctTxn}
\title{Add capital account transactions, such as capital additions and withdrawals or interest income (expense)}
\usage{
- addAcctTxn(Account, TxnDate,
- TxnType = c("Additions", "Withdrawals", "Interest"),
- Amount, ..., verbose = TRUE)
+addAcctTxn(Account, TxnDate, TxnType = c("Additions", "Withdrawals",
+ "Interest"), Amount, ..., verbose = TRUE)
}
\arguments{
\item{name}{Account name, as string}
@@ -28,34 +27,34 @@
FALSE.}
}
\description{
- For the specified Account, take in the date, amount, and
- type of transaction and append it to the correct list in
- the account object
+For the specified Account, take in the date, amount, and
+type of transaction and append it to the correct list in
+the account object
}
\details{
- Adds capital transactions to a rudimentary transactions
- table in the Account object. This may be useful when
- tracking the denominator of returns when there are
- changes to the account's capital or significant interest
- income. In the Account$summary table, there are several
- placeholder columns that mimic the CFTC's 13-column
- report. Columns of interest here are "Additions",
- "Withdrawals", and "Interest". Transactions added with
- this function will be added into the appropriate one of
- three slots in the Account object (Account$additions,
- Account$withdrawals, or Account$Interest), which contains
- an xts object of individual transactions with a date and
- amount. The \code{\link{updateAcct}} function will read
- the transactions from each list in turn, aggregate them
- by the specified date scope, and slot them into the
- \code{Account$summary} table as it's built.
- \code{\link{UpdateEndEq}} should then just work.
+Adds capital transactions to a rudimentary transactions
+table in the Account object. This may be useful when
+tracking the denominator of returns when there are changes
+to the account's capital or significant interest income. In
+the Account$summary table, there are several placeholder
+columns that mimic the CFTC's 13-column report. Columns of
+interest here are "Additions", "Withdrawals", and
+"Interest". Transactions added with this function will be
+added into the appropriate one of three slots in the
+Account object (Account$additions, Account$withdrawals, or
+Account$Interest), which contains an xts object of
+individual transactions with a date and amount. The
+\code{\link{updateAcct}} function will read the
+transactions from each list in turn, aggregate them by the
+specified date scope, and slot them into the
+\code{Account$summary} table as it's built.
+\code{\link{UpdateEndEq}} should then just work.
}
\author{
- Peter Carl
+Peter Carl
}
\seealso{
- \code{\link{initAcct}}, \code{\link{updateAcct}},
- \code{\link{updateEndEq}}
+\code{\link{initAcct}}, \code{\link{updateAcct}},
+\code{\link{updateEndEq}}
}
Modified: pkg/blotter/man/addDiv.Rd
===================================================================
--- pkg/blotter/man/addDiv.Rd 2014-03-05 14:29:09 UTC (rev 1588)
+++ pkg/blotter/man/addDiv.Rd 2014-03-08 16:25:03 UTC (rev 1589)
@@ -2,8 +2,8 @@
\alias{addDiv}
\title{Add cash dividend transactions to a portfolio.}
\usage{
- addDiv(Portfolio, Symbol, TxnDate, DivPerShare, ...,
- TxnFees = 0, ConMult = NULL, verbose = TRUE)
+addDiv(Portfolio, Symbol, TxnDate, DivPerShare, ..., TxnFees = 0,
+ ConMult = NULL, verbose = TRUE)
}
\arguments{
\item{Portfolio}{A portfolio name that points to a
@@ -33,12 +33,12 @@
specification.}
}
\description{
- Adding a cash dividend does not affect position quantity,
- like a split would.
+Adding a cash dividend does not affect position quantity,
+like a split would.
}
\note{
- # TODO add TxnTypes to $txn table
+# TODO add TxnTypes to $txn table
- # TODO add AsOfDate
+# TODO add AsOfDate
}
Modified: pkg/blotter/man/addPortfInstr.Rd
===================================================================
--- pkg/blotter/man/addPortfInstr.Rd 2014-03-05 14:29:09 UTC (rev 1588)
+++ pkg/blotter/man/addPortfInstr.Rd 2014-03-08 16:25:03 UTC (rev 1589)
@@ -2,7 +2,7 @@
\alias{addPortfInstr}
\title{add an instrument to a portfolio}
\usage{
- addPortfInstr(Portfolio, symbols, ...)
+addPortfInstr(Portfolio, symbols, ...)
}
\arguments{
\item{Portfolio}{portfolio identifier string}
@@ -13,7 +13,6 @@
\item{\dots}{any other passthru parameters}
}
\description{
- thanks to WolfGang Wu for making this function more
- usable
+thanks to WolfGang Wu for making this function more usable
}
Modified: pkg/blotter/man/addTxn.Rd
===================================================================
--- pkg/blotter/man/addTxn.Rd 2014-03-05 14:29:09 UTC (rev 1588)
+++ pkg/blotter/man/addTxn.Rd 2014-03-08 16:25:03 UTC (rev 1589)
@@ -3,12 +3,11 @@
\alias{addTxns}
\title{Add transactions to a portfolio.}
\usage{
- addTxn(Portfolio, Symbol, TxnDate, TxnQty, TxnPrice, ...,
- TxnFees = 0, ConMult = NULL, verbose = TRUE,
- eps = 1e-06)
+addTxn(Portfolio, Symbol, TxnDate, TxnQty, TxnPrice, ..., TxnFees = 0,
+ ConMult = NULL, verbose = TRUE, eps = 0.000001)
- addTxns(Portfolio, Symbol, TxnData, verbose = FALSE, ...,
- ConMult = NULL)
+addTxns(Portfolio, Symbol, TxnData, verbose = FALSE, ..., ConMult = NULL,
+ eps = 0.000001)
}
\arguments{
\item{Portfolio}{A portfolio name that points to a
@@ -45,53 +44,53 @@
fields (for addTxns)}
}
\description{
- When a trade or adjustment is made to the Portfolio, the
- addTxn function calculates the value and average cost of
- the transaction, the change in position, the resulting
- positions average cost, and any realized profit or loss
- (net of fees) from the transaction. Then it stores the
- transaction and calculations in the Portfolio object.
+When a trade or adjustment is made to the Portfolio, the
+addTxn function calculates the value and average cost of
+the transaction, the change in position, the resulting
+positions average cost, and any realized profit or loss
+(net of fees) from the transaction. Then it stores the
+transaction and calculations in the Portfolio object.
}
\details{
- Fees are indicated as negative values and will be
- subtracted from the transaction value. TxnFees can either
- be a fixed numeric amount, or a function (or charavcter
- name of a function) in which case the function is
- evaluated to determine the fee amount.
+Fees are indicated as negative values and will be
+subtracted from the transaction value. TxnFees can either
+be a fixed numeric amount, or a function (or charavcter
+name of a function) in which case the function is evaluated
+to determine the fee amount.
- The \code{\link{pennyPerShare}} function provides a
- simple example of a transaction cost function.
+The \code{\link{pennyPerShare}} function provides a simple
+example of a transaction cost function.
- Transactions which would cross the position through zero
- will be split into two transactions, one to flatten the
- position, and another to initiate a new position on the
- opposite side of the market. The new (split) transaction
- will have its timestamp incremented by \code{eps} to
- preserve ordering.
+Transactions which would cross the position through zero
+will be split into two transactions, one to flatten the
+position, and another to initiate a new position on the
+opposite side of the market. The new (split) transaction
+will have its timestamp incremented by \code{eps} to
+preserve ordering.
- This transaction splitting vastly simplifies realized P&L
- calculations elsewhere in the code. Such splitting also
- mirrors many execution platforms and brokerage
- requirements in particular asset classes where the side
- of a trade needs to be specified with the order.
+This transaction splitting vastly simplifies realized P&L
+calculations elsewhere in the code. Such splitting also
+mirrors many execution platforms and brokerage requirements
+in particular asset classes where the side of a trade needs
+to be specified with the order.
- The \code{addTxns} function allows you to add multiple
- transactions to the portfolio, which is much faster than
- adding them one at a time. The \code{TxnData} object must
- have "TxnQty" and "TxnPrice" columns, while the "TxnFees"
- column is optional.
+The \code{addTxns} function allows you to add multiple
+transactions to the portfolio, which is much faster than
+adding them one at a time. The \code{TxnData} object must
+have "TxnQty" and "TxnPrice" columns, while the "TxnFees"
+column is optional.
}
\note{
- The addTxn function will eventually also handle other
- transaction types, such as adjustments for corporate
- actions or expire/assign for options. See
- \code{\link{addDiv}}
+The addTxn function will eventually also handle other
+transaction types, such as adjustments for corporate
+actions or expire/assign for options. See
+\code{\link{addDiv}}
}
\author{
- Peter Carl, Brian G. Peterson
+Peter Carl, Brian G. Peterson
}
\seealso{
- \code{\link{addTxns}}, \code{\link{pennyPerShare}},
- \code{\link{initPortf}}
+\code{\link{addTxns}}, \code{\link{pennyPerShare}},
+\code{\link{initPortf}}
}
Modified: pkg/blotter/man/calcPortfWgt.Rd
===================================================================
--- pkg/blotter/man/calcPortfWgt.Rd 2014-03-05 14:29:09 UTC (rev 1588)
+++ pkg/blotter/man/calcPortfWgt.Rd 2014-03-08 16:25:03 UTC (rev 1589)
@@ -2,9 +2,9 @@
\alias{calcPortfWgt}
\title{Calculates the portfolio weights for positions within a given portfolio.}
\usage{
- calcPortfWgt(Portfolio, Symbols = NULL, Dates = NULL,
- denominator = c("Gross.Value", "Net.Value", "Long.Value", "Short.Value"),
- Account)
+calcPortfWgt(Portfolio, Symbols = NULL, Dates = NULL,
+ denominator = c("Gross.Value", "Net.Value", "Long.Value", "Short.Value"),
+ Account)
}
\arguments{
\item{Portfolio}{a portfolio object structured with
@@ -23,15 +23,15 @@
summaries}
}
\value{
- xts timeseries object with weights by date in rows and
- symbolname in columns
+xts timeseries object with weights by date in rows and
+symbolname in columns
}
\description{
- Portfolio weights may be calculated differently depending
- on their use. By default, this function uses denominator
- of 'Gross.Value', the second most common option will
- likely be 'Net.Value'. For separating long and short
- weights, 'Long.Value' and 'Short.Value' may be needed as
- denominators.
+Portfolio weights may be calculated differently depending
+on their use. By default, this function uses denominator of
+'Gross.Value', the second most common option will likely be
+'Net.Value'. For separating long and short weights,
+'Long.Value' and 'Short.Value' may be needed as
+denominators.
}
Modified: pkg/blotter/man/calcPosAvgCost.Rd
===================================================================
--- pkg/blotter/man/calcPosAvgCost.Rd 2014-03-05 14:29:09 UTC (rev 1588)
+++ pkg/blotter/man/calcPosAvgCost.Rd 2014-03-08 16:25:03 UTC (rev 1589)
@@ -2,8 +2,7 @@
\alias{.calcPosAvgCost}
\title{Calculates the average cost of a resulting position from a transaction}
\usage{
- .calcPosAvgCost(PrevPosQty, PrevPosAvgCost, TxnValue,
- PosQty, ConMult = 1)
+.calcPosAvgCost(PrevPosQty, PrevPosAvgCost, TxnValue, PosQty, ConMult = 1)
}
\arguments{
\item{PrevPosQty}{quantity of the previous position}
@@ -20,10 +19,10 @@
\item{ConMult}{multiplier from instrument data}
}
\value{
- PosAvgCost: average cost of the resulting position
+PosAvgCost: average cost of the resulting position
}
\description{
- Calculates the average cost of a resulting position from
- a transaction
+Calculates the average cost of a resulting position from a
+transaction
}
Modified: pkg/blotter/man/calcTxnAvgCost.Rd
===================================================================
--- pkg/blotter/man/calcTxnAvgCost.Rd 2014-03-05 14:29:09 UTC (rev 1588)
+++ pkg/blotter/man/calcTxnAvgCost.Rd 2014-03-08 16:25:03 UTC (rev 1589)
@@ -2,7 +2,7 @@
\alias{.calcTxnAvgCost}
\title{Calculates a per share or per contract cost of the transaction to match the units the price is quoted in}
\usage{
- .calcTxnAvgCost(TxnValue, TxnQty, ConMult = 1)
+.calcTxnAvgCost(TxnValue, TxnQty, ConMult = 1)
}
\arguments{
\item{TxnValue}{total value of the transaction, including
@@ -13,11 +13,11 @@
\item{ConMult}{multiplier from instrument data}
}
\value{
- TxnAvgCost: unit normalized (per share) cost implied by
- the transaction
+TxnAvgCost: unit normalized (per share) cost implied by the
+transaction
}
\description{
- Calculates a per share or per contract cost of the
- transaction to match the units the price is quoted in
+Calculates a per share or per contract cost of the
+transaction to match the units the price is quoted in
}
Modified: pkg/blotter/man/calcTxnValue.Rd
===================================================================
--- pkg/blotter/man/calcTxnValue.Rd 2014-03-05 14:29:09 UTC (rev 1588)
+++ pkg/blotter/man/calcTxnValue.Rd 2014-03-08 16:25:03 UTC (rev 1589)
@@ -2,7 +2,7 @@
\alias{.calcTxnValue}
\title{Calculates the total value of a transaction or trade}
\usage{
- .calcTxnValue(TxnQty, TxnPrice, TxnFees, ConMult = 1)
+.calcTxnValue(TxnQty, TxnPrice, TxnFees, ConMult = 1)
}
\arguments{
\item{TxnQty}{total units (shares) of the transaction}
@@ -15,10 +15,10 @@
\item{ConMult}{multiplier from instrument data}
}
\value{
- TxnValue: total dollar value of the transaction,
- including fees
+TxnValue: total dollar value of the transaction, including
+fees
}
\description{
- Calculates the total value of a transaction or trade
+Calculates the total value of a transaction or trade
}
Modified: pkg/blotter/man/chart.ME.Rd
===================================================================
--- pkg/blotter/man/chart.ME.Rd 2014-03-05 14:29:09 UTC (rev 1588)
+++ pkg/blotter/man/chart.ME.Rd 2014-03-08 16:25:03 UTC (rev 1589)
@@ -2,8 +2,8 @@
\alias{chart.ME}
\title{Chart Maximum Adverse/Favorable Excursion}
\usage{
- chart.ME(Portfolio, Symbol, type = c("MAE", "MFE"),
- scale = c("cash", "percent", "tick"), ...)
+chart.ME(Portfolio, Symbol, type = c("MAE", "MFE"), scale = c("cash",
+ "percent", "tick"), ...)
}
\arguments{
\item{Portfolio}{string identifying the portfolio to
@@ -23,22 +23,22 @@
particular includeOpenTrades (see perTradeStats())}
}
\description{
- Produces a scatterplot with one point per trade, with
- x-axis: absolute value of Drawdown (Adverse), or Run Up
- (Favourable), and y-axis: absolute value of Net Profit or
- Loss
+Produces a scatterplot with one point per trade, with
+x-axis: absolute value of Drawdown (Adverse), or Run Up
+(Favourable), and y-axis: absolute value of Net Profit or
+Loss
}
\author{
- Jan Humme
+Jan Humme
}
\references{
- Tomasini, E. and Jaekle, U. \emph{Trading Systems - A new
- approach to system development and portfolio
- optimisation} (ISBN 978-1-905641-79-6), section 3.5
+Tomasini, E. and Jaekle, U. \emph{Trading Systems - A new
+approach to system development and portfolio optimisation}
+(ISBN 978-1-905641-79-6), section 3.5
}
\seealso{
- \code{\link{perTradeStats}} for the calculations used by
- this chart, and \code{\link{tradeStats}} for a summary
- view of the performance
+\code{\link{perTradeStats}} for the calculations used by
+this chart, and \code{\link{tradeStats}} for a summary view
+of the performance
}
Modified: pkg/blotter/man/chart.Posn.Rd
===================================================================
--- pkg/blotter/man/chart.Posn.Rd 2014-03-05 14:29:09 UTC (rev 1588)
+++ pkg/blotter/man/chart.Posn.Rd 2014-03-08 16:25:03 UTC (rev 1589)
@@ -2,8 +2,7 @@
\alias{chart.Posn}
\title{Chart trades against market data, position through time, and cumulative P\&L}
\usage{
- chart.Posn(Portfolio, Symbol, Dates = NULL, ...,
- TA = NULL)
+chart.Posn(Portfolio, Symbol, Dates = NULL, ..., TA = NULL)
}
\arguments{
\item{Portfolio}{string identifying the portfolio to
@@ -23,13 +22,13 @@
\code{\link{eval}}}
}
\description{
- 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 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.
}
\note{
- Expect changes to this function, since the underlying
- charts are experimental functions in quantmod.
+Expect changes to this function, since the underlying
+charts are experimental functions in quantmod.
}
Modified: pkg/blotter/man/chart.Reconcile.Rd
===================================================================
--- pkg/blotter/man/chart.Reconcile.Rd 2014-03-05 14:29:09 UTC (rev 1588)
+++ pkg/blotter/man/chart.Reconcile.Rd 2014-03-08 16:25:03 UTC (rev 1589)
@@ -2,10 +2,8 @@
\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"))
+chart.Reconcile(theoPort, actualPort, Symbol, Dates = NULL, ...,
+ PLdiff = c("cumulative", "episodic"), data = c(FALSE, "View", "return"))
}
\arguments{
\item{theoPort}{string identifying the theoretical
@@ -28,38 +26,38 @@
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.
+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 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 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)
+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.
+Expect changes to this function, since the underlying
+charts are experimental functions in quantmod.
}
\seealso{
- \code{\link{chart.Posn}}
+\code{\link{chart.Posn}}
}
Modified: pkg/blotter/man/chart.Spread.Rd
===================================================================
--- pkg/blotter/man/chart.Spread.Rd 2014-03-05 14:29:09 UTC (rev 1588)
+++ pkg/blotter/man/chart.Spread.Rd 2014-03-08 16:25:03 UTC (rev 1589)
@@ -2,8 +2,8 @@
\alias{chart.Spread}
\title{Charts the transaction series, positions, and P&L of a spread against prices}
\usage{
- chart.Spread(Account, Portfolio, Spread = NULL,
- Symbols = NULL, Dates = NULL, ...)
+chart.Spread(Account, Portfolio, Spread = NULL, Symbols = NULL,
+ Dates = NULL, ...)
}
\arguments{
\item{Account}{string identifying the account}
@@ -22,7 +22,7 @@
parameters to \code{chart_Series})}
}
\description{
- Charts the transaction series, positions, and P&L of a
- spread against prices
+Charts the transaction series, positions, and P&L of a
+spread against prices
}
Modified: pkg/blotter/man/dailyTxnPL.Rd
===================================================================
--- pkg/blotter/man/dailyTxnPL.Rd 2014-03-05 14:29:09 UTC (rev 1588)
+++ pkg/blotter/man/dailyTxnPL.Rd 2014-03-08 16:25:03 UTC (rev 1589)
@@ -3,9 +3,9 @@
\alias{dailyTxnPL}
\title{generate daily Transaction Realized or Equity Curve P&L by instrument}
\usage{
- dailyTxnPL(Portfolios, Symbols, drop.time = TRUE)
+dailyTxnPL(Portfolios, Symbols, drop.time = TRUE)
- dailyEqPL(Portfolios, Symbols, drop.time = TRUE)
+dailyEqPL(Portfolios, Symbols, drop.time = TRUE)
}
\arguments{
\item{Portfolios}{portfolio string}
@@ -16,25 +16,25 @@
(if any), default TRUE}
}
\value{
- a multi-column \code{xts} time series, one column per
- symbol, one row per day
+a multi-column \code{xts} time series, one column per
+symbol, one row per day
}
\description{
- designed to collate information for high frequency
- portfolios
+designed to collate information for high frequency
+portfolios
}
\details{
- If you do not pass \code{Symbols}, then all symbols in
- the provided \code{Portfolios} will be used.
+If you do not pass \code{Symbols}, then all symbols in the
+provided \code{Portfolios} will be used.
- The daily P&L is calculated from
- \code{Net.Txn.Realized.PL} if by \code{dailyTxnPL} and
- from \code{Net.Trading.PL} by \code{dailyEqPL}
+The daily P&L is calculated from \code{Net.Txn.Realized.PL}
+if by \code{dailyTxnPL} and from \code{Net.Trading.PL} by
+\code{dailyEqPL}
}
\author{
- Brian G. Peterson
+Brian G. Peterson
}
\seealso{
- tradeStats
+tradeStats
}
Modified: pkg/blotter/man/extractTxns.Rd
===================================================================
--- pkg/blotter/man/extractTxns.Rd 2014-03-05 14:29:09 UTC (rev 1588)
+++ pkg/blotter/man/extractTxns.Rd 2014-03-08 16:25:03 UTC (rev 1589)
@@ -2,35 +2,35 @@
\alias{extractTxns}
\title{Extract transactions from a portfolio}
\usage{
- extractTxns(Portfolio)
+extractTxns(Portfolio)
}
\arguments{
\item{Portfolio}{string identifying the portfolio to
extract from}
}
\value{
- String vector of \code{\link{addTxn}} calls that would
- replicate the given portfolio.
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/blotter -r 1589
More information about the Blotter-commits
mailing list