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

update_constraint_v1tov2

Helper function to update v1_constraint objects to v2 specification in the portfolio object


Description

The function takes the constraints and objectives specified in the v1_constraint object and updates the portfolio object with those constraints and objectives. This function is used inside optimize.portfolio to maintain backwards compatibility if the user passes in a v1_constraint object for the constraint arg in optimize.portfolio.

Usage

update_constraint_v1tov2(portfolio, v1_constraint)

Arguments

portfolio

portfolio object passed into optimize.portfolio

v1_constraint

object of type v1_constraint passed into optimize.portfolio

Value

portfolio object containing constraints and objectives from v1_constraint

Author(s)

Ross Bennett

See Also


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.