TS.getFin_by_rptTS: TS.getFin_by_rptTS

Description Usage Arguments Value Author(s) See Also Examples

Description

get financial factorscore via rptTS

Usage

1

Arguments

fun

a function or a non-empty character string naming the function to be called, which get the financtial indicators from rptTS. Note that the function must contain a param of 'rptTS' .

...

optional arguments except rptTS of fun.

Value

a dataframe with the same length with TS, but added by some other financial indicator fields.

Author(s)

Ruifei.Yin

See Also

rptTS.getFin_windR, rptTS.getFin_ts

Examples

1
2
3
4
5
6
7
8
9
TS <- Model.TS(modelPar.univ(indexID="ES09440000"))
re <- TS.getFin_by_rptTS(TS,fun="rptTS.getFin_windR",field="np_belongto_parcomsh","rptType=1")
re2 <- TS.getFin_by_rptTS(TS,fun="rptTS.getFin_ts",funchar='"np_belongto_parcomsh",report(46078,RDate)')
# -- Following is a speed comparison of three different methods to get financial factorscores:

TS <- Model.TS(setmodelPar.time(modelPar.default(),begT=as.Date("2007-12-01"),endT=as.Date("2014-05-01")))
system.time(re.wind <- TS.getFin_by_rptTS(TS,fun="rptTS.getFin_windR",field="np_belongto_parcomsh","rptType=1")) # 73.69
system.time(re.ts_dir <- TS.getFin_ts(TS,funchar='report(46078,RDate)',varname="np_belongto_parcomsh")) # 12.49
system.time(re.ts_rpt <- TS.getFin_by_rptTS(TS,fun="rptTS.getFin_ts",funchar='"np_belongto_parcomsh",report(46078,RDate)')) # 6.29

raphael210/QDataGet documentation built on May 26, 2019, 11:02 p.m.