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


cloudcell/blotter documentation built on May 13, 2019, 8:01 p.m.