PortfReturns: Calculate portfolio instrument returns

Description Usage Arguments Details Note

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.

Usage

1
2
PortfReturns(Account, method = c("contribution"), ..., Dates = NULL,
  Portfolios = NULL, period = c("daily", "none"))

Arguments

Account

string name of the account to generate returns for

method

for now, only 'contribution' is supported

Dates

xts style ISO 8601 date subset to retrieve, default NULL (all dates)

Portfolios

concatenated string vector for portfolio names to retrieve returns on, default NULL (all portfolios)

period

one of daily

...

any other passthru parameters (like native for .getBySymbol

Details

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 explicitly handle portfolio weights

TODO provide additional methods of calculating returns

TODO support additions and withdrawals to available capital



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

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.