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.
updateStrategy(strategy, portfolio = "default", account = portfolio, Symbols = NULL, parameters = NULL, Dates = NULL, Prices = NULL, update.Portf = TRUE, update.Acct = TRUE, update.EndEq = TRUE, showEq = TRUE, chart = TRUE, ...)
strategy
to
initialize data/containers forportfolio
by defaultupdatePortf
updateAcct
updateEndEq
chart.Posn
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:
updatePortf
to mark the book in the
portfolio. updateAcct
to mark the blotter
account for this test. updateEndEq
to update the
account equity after all other accounting has been
completed. updatePortf
, updateAcct
,
updateEndEq
, chart.Posn