addPM: Creator for position manager.

Description Usage Arguments

View source: R/positionManagers.R

Description

Creator for position manager.

Usage

1
2
3
4
5
6
7
8
addPM(this, ...)

## S3 method for class 'modelStrategy'
addPM(this, as, increase = list(cond = quote(FALSE),
  expr = quote({ })), decrease = list(cond = quote(FALSE), expr = quote({ })),
  rebalance = list(cond = quote(FALSE), expr = quote({ })),
  change = list(cond = quote(FALSE), expr = quote({ })), close = list(cond =
  quote(FALSE)), oco, args = list(), rule_name = NULL, ...)

Arguments

this

modelStrategy

...

params

as

character, name

increase

list, the first argument is resposible for condition when this rule will work, the second argument is expression that must calculate size of position(mult_delta)(how many spreads it needs to be bought). In another words the last row must contain 'mult_delta <- ...'. Or you could define 'money' variable. It should be equal to current amount of money in position after execution of the rule.

decrease

list, see increase, in expr quote beta_new must be defined

rebalance

list, see increase, in expr quote beta_new must be defined

change

list, see increase, in expr quote mult_delta must be defined

close

list, see increase

oco

charcter, name of namespace

args

list, arguments of that manager

rule_name

character, if it is determined, then this manager will be addicted to rule by this name and params of this rule will be applied.


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