updatePortf: update Portfilio P&L over a Dates range

Description Usage Arguments Details Value

Description

The updatePortf function goes through each symbol and calculates the PL for each period prices are available.

Usage

1
2
updatePortf(Portfolio, Symbols = NULL, Dates = NULL, Prices = NULL,
  Interval = Interval, ...)

Arguments

Portfolio

string identifying a portfolio

Symbols

character vector identifying symbols to update the portfolio for, 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

Interval

optional character string, containing one of "millisecond" (or "ms"), "microsecond" (or "us"), "second", "minute", "hour", "day", "week", "month", "quarter", or "year". This can optionally be preceded by a positive integer, or followed by "s".

...

any other passthrough parameters

Details

Note that the portfolio will be marked on every time stamp where prices are available. As such, your Dates range must reflect timestamps which appear in the price stream. Also note that you probably don't want to mark the portfolio on every tick,

Value

assigns position information and PL into the environment


blotter documentation built on April 15, 2017, 9:41 a.m.

Search within the blotter package
Search all R packages, documentation and source code