Learn R Programming

PortfolioAnalytics (version 1.1.0)

add.sub.portfolio: Add sub-portfolio

Description

Add a sub-portfolio to a multiple layer portfolio specification object

Usage

add.sub.portfolio(mult.portfolio, portfolio, optimize_method = c("DEoptim",
  "random", "ROI", "pso", "GenSA"), search_size = 20000, rp = NULL,
  rebalance_on = NULL, training_period = NULL, trailing_periods = NULL,
  ..., indexnum = NULL)

Arguments

mult.portfolio

a mult.portfolio.spec object

portfolio

a portfolio object to add as a sub portfolio.

optimize_method

optimization method for the sub portfolio

search_size

integer, how many portfolios to test, default 20,000

rp

matrix of random portfolio weights, default NULL, mostly for automated use by rebalancing optimization or repeated tests on same portfolios

rebalance_on

haracter string of period to rebalance on. See endpoints for valid names.

training_period

an integer of the number of periods to use as a training data in the front of the returns data

trailing_periods

an integer with the number of periods to roll over (i.e. width of the moving or rolling window), the default is NULL will run using the returns data from inception

...

additonal passthrough parameters to optimize.portfolio.rebalancing

indexnum

the index number of the sub portfolio. If indexnum=NULL (the default), then the sub portfolio object is appended to the list of sub portfolios in the mult.portfolio object. If indexnum is specified, the portfolio in that index number is overwritten.

Author

Ross Bennett

See Also

mult.portfolio.spec portfolio.spec optimize.portfolio optimize.portfolio.rebalancing