get a portfolio object

Share:

Description

Get a portfolio object conssting of either a nested list (getPortfolio) or a pointer to the portfolio in the .blotter environment (.getPortfolio)

Usage

1
2
3
getPortfolio(Portfolio, Dates = NULL, envir = .blotter)

.getPortfolio(Portfolio, envir = .blotter)

Arguments

Portfolio

string identifying portfolio

Dates

dates subset, not yet supported

envir

the environment to retrieve the portfolio from, defaults to .blotter

Details

Portfolios in blotter are stored as a set of nested, hashed, environments.

The getPortfolio function returns a nested list. If you are unsure, use this function.

The .getPortfolio function returns a pointer to the actual environment. Environments in R are passed by reference, and are not copied by the <- assignment operator. Any changes made to the environment returned by .getPortfolio are global. You have been warned.

See Also

initPortf, updatePortf

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.