Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

extractGroups

Extract the group and/or category weights


Description

This function extracts the weights by group and/or category from an object of class optimize.portfolio. Group constraints or category_labels must be specified for this to return group constraints.

Usage

extractGroups(object, ...)

Arguments

object

object of class optimize.portfolio

...

passthrough parameters. Not currently used

Value

a list with two elements

  • weights: Optimal set of weights from the optimize.portfolio object

  • category_weights: Weights by category if category_labels are supplied in the portfolio object

  • group_weights: Weights by group if group is a constraint type

Author(s)

Ross Bennett


PortfolioAnalytics

Portfolio Analysis, Including Numerical Methods for Optimization of Portfolios

v1.1.0
GPL-2 | GPL-3
Authors
Brian G. Peterson [cre, aut, cph], Peter Carl [aut, cph], Kris Boudt [ctb, cph], Ross Bennett [ctb, cph], Hezky Varon [ctb], Guy Yollin [ctb], R. Douglas Martin [ctb]
Initial release
2018-05-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.