rptTS.getFin: rptTS.getFin

Description Usage Arguments Value Note Author(s) See Also Examples

Description

get financtial indicators via rptTS through WindR, or TinySoft.

Usage

1
2
3
4
5
rptTS.getFin_windR(rptTS, field, varname, ...)

rptTS.getFin_ts(rptTS, funchar, varname, ...)

rptTS.getFinSeri_ts(rptTS, N, freq, funchar, varname, ...)

Arguments

rptTS

a rptTS object. a dataframe with cols:"rptDate","stockID"

field

character strting or a vector of character string, giving the windfields. eg. "OPEN,CLOSE,HIGH" or c("OPEN","CLOSE","HIGH")

varname

vector of charactor string

...

other arguments except rptDate in w.wss

funchar

expression to get variables from tinysoft,a character string, usually copyed from tinysoft "stock-data-expert" and then replace the specified reportdate in the stock-data-expert expression by 'Rdate'. e.g. convert Last12MData(20091231,46002) to Last12MData(Rdate,46002).

...

other arguments in ts.wss.

Value

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

Note

the funchar param could also be a 'multi_funchar', to get multi-factors. See details in the examples.

Author(s)

Ruifei.Yin

See Also

w.wss

ts.wss

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
rptTS <- getrptTS(begT=as.Date("2011-02-06"),endT=as.Date("2011-10-23"),stocks=c("EQ000001","EQ000002"))
# rptTS.getFin_windR
re <- rptTS.getFin_windR(rptTS,"np_belongto_parcomsh",options ="rptType=1")
# rptTS.getFin_ts
re2 <- rptTS.getFin_ts(rptTS,'"np_belongto_parcomsh",report(46078,RDate)')
multi_funchar <- '"eps",reportofall(9900000,RDate),
   "zyywlrzzl",reportofall(9900601,RDate),
   "yszk",report(44009,RDate)'
re3 <- rptTS.getFin_ts(rptTS,multi_funchar)
# rptTS.getFinSeri_ts
FinSeri <- rptTS.getFinSeri_ts(rptTS,12,"q",'"np_belongto_parcomsh",report(46078,RDate)')
Finseri2 <- rptTS.getFinSeri_ts(rptTS,3,"y",multi_funchar)

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