setWeight: Set new weight for modelPortfolio object

Description Usage Arguments

View source: R/modelPortfolio.R

Description

Set new weight for modelPortfolio object

Usage

1
2
3
4
setWeight(this, ...)

## S3 method for class 'modelPortfolio'
setWeight(this, w = NULL, money_function = NULL)

Arguments

this

modelPortfolio type

w

numeric type, coefficients strategy in portfolio, example: w = c(1,2)

money_function

function type or const, three options are possible

1) money_function = A = const, all strategies will get A money

2) money_function = scalar function, all strategies will get money_function(start_money_in_strategy) money, example: min

3) money_function = vector function, strategies[i] will get money_function(start_money_in_strategy)[i] money, example: function { 200 + start_money_in_strategy}


Vitalic57/stratbuilder2pub documentation built on Dec. 18, 2019, 2:56 a.m.