calcPortfWgt | R Documentation |
Portfolio weights may be calculated differently depending on their use. By default, this function uses denominator of 'Gross.Value', the second most common option will likely be 'Net.Value'. For separating long and short weights, 'Long.Value' and 'Short.Value' may be needed as denominators.
calcPortfWgt(
Portfolio,
Symbols = NULL,
Dates = NULL,
denominator = c("Gross.Value", "Net.Value", "Long.Value", "Short.Value"),
Account
)
Portfolio |
a portfolio object structured with initPortf() |
Symbols |
an instrument identifier for a symbol included in the portfolio |
Dates |
dates to return the calculation over formatted as xts range |
denominator |
string describing the deniminator, see Description |
Account |
an Account object containing Portfolio summaries |
xts timeseries object with weights by date in rows and symbolname in columns
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.