setBetasByMoney: Set/Get betasByMoney variable

Description Usage Arguments

View source: R/genericModelStrategy.R

Description

This variable is responsible for how spread will be trades. If it is TRUE then coefficients before trade will be update in according to current prices in table data_raw. For example, if coefs is c(0.5, -0.5) and prices c(10, 100) and money is 1000, then position will be opened with assets amount c(50, -5). But if variable is FALSE, then assets amount will be c(9, -9). If betasByMoney is TRUE, then option from setBetasInt will be ignored.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
getBetasByMoney(this)

setBetasByMoney(this, x, price)

## S3 method for class 'modelStrategy'
setBetasByMoney(this, x, price = quote(data_raw[i - 1,
  ]))

## S3 method for class 'modelStrategy'
getBetasByMoney(this)

Arguments

this

modelStrategy

x

logical

price

quote, price of each intrument in moment i


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