lcfs.add: lcfs.add

Description Usage Arguments Value Author(s) See Also Examples

View source: R/pub03_DatabaseOperationFuncs.R

Description

add/update one factorscore column in local sqlite table "QT_FactorScore". On the same time, correspondingly, add/update a record into table "CT_FactorLists" and table "CT_TechVars".

Usage

1
2
3
lcfs.add(factorFun, factorPar = "", factorDir, factorID,
  factorName = default.factorName(factorFun, factorPar, factorDir),
  factorType = "", factorDesc = "", splitNbin = "month")

Arguments

factorFun

a character string naming the function to get the factor scores

factorPar

a character string, containing the parameters of the factorFun. Note that unlike in getTSF, here the factorPar could not be a list, because it need to be written into database.

factorDir

a integer,should be 1 or -1 (1 for the positive factor,-1 for the negative one). Note that the factorDir here is only used to write a record into table "CT_FactorLists", not used when getting TSF. So that the factorscore in table "QT_FactorScore" is kept "raw", without adding the dirrection infomation.

factorID

a character string

factorName

a character string. IF missing, then take a default name by function default.factorName.

factorType

a character string

factorDesc

a character string

splitNbin

a character of interval specification(see cut.Date for detail). Specify the time interval when looping of getting the TSF object.

Value

Write data into the local sqlite database, returning NULL.

Author(s)

Ruifei.Yin

See Also

getTSF,modelPar.factor, lcdb.update.QT_FactorScore

Examples

1
system.time(lcfs.add(factorFun="gf.F_rank_chg",factorPar="lag=60,con_type=\"1,2\"", factorDir=1, factorID="F000999"))

QuantAndrew/QDataGet documentation built on May 14, 2019, 7:35 a.m.