Description Usage Arguments Details Author(s) See Also
updateStrategy
will run a series of common
wrapup functions at the beginning of an
applyStrategy
call. This function allows the
user to add arbitrary wrapup functions to the sequence.
1 2 3 4 |
strategy |
object of type |
portfolio |
string identifying a portfolio |
account |
string identifying an account. Same as
|
Symbols |
character vector of names of symbols whose portfolios will be updated |
parameters |
named list of parameters to be applied during evaluation of the strategy, default NULL |
Dates |
optional xts-style ISO-8601 time range to run updatePortf over, default NULL (will use times from Prices) |
Prices |
optional xts object containing prices and timestamps to mark the book on, default NULL |
update.Portf |
TRUE/FALSE if TRUE (default) a call
will be made to |
update.Acct |
TRUE/FALSE if TRUE (default) a call
will be made to |
update.EndEq |
TRUE/FALSE if TRUE (default) a call
will be made to |
showEq |
TRUE/FALSE if TRUE (default) ending equity will be printed to the screen |
chart |
TRUE/FALSE if TRUE (default) a call will be
made to |
... |
any other passthrough parameters |
These arbitrary functions will be added to the
update
slot of the strategy object and when
applyStrategy
is evaluated, the arbitrary wrapup
functions will be evaluated before the standardized
functions.
For example, if you are working with high frequency data,
it would be common to mark the book on a lower
frequency, perhaps minutes, hours, or even days, rather
than tick. A custom wrapup function could take your high
frequency data and transform it to lower frequency data
before the call to updatePortf
.
The 'standard wrapup functions included are:
if TRUE, will call
updatePortf
to mark the book in the
portfolio.
if TRUE, will call
updateAcct
to mark the blotter
account for this test.
if TRUE,
will call updateEndEq
to update the
account equity after all other accounting has been
completed.
Garrett See, Brian Peterson
updatePortf
, updateAcct
,
updateEndEq
, chart.Posn
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.