TS.getTech_ts: TS.getTech_ts

Description Usage Arguments Value Note Author(s) Examples

Description

get technical factors throug a tinysoft expression, which could be a simple expresion, e.g 'close()','StockZf2(20)','BBIBOLL_v(11,6)',..,or more complicated expression, e.g. 'close()/open()', 'StockZf2(10)-StockZf2(20)'...

Usage

1
TS.getTech_ts(TS, funchar, varname = funchar, Rate = 1, RateDay = 0)

Arguments

TS

a TS object

funchar

a vector of character,the tinysoft function with the arguments. e.g "BBIBOLL_v(11,6)"

varname

character string, giving the name of the returned variables

Value

A TSF object

Note

Note that the tinysoft function must contain ONLY two(no more!) system parameters: pn_stock() and pn_date() ,which is specifyed by the two fields in the TS respectively.

Author(s)

Ruifei.Yin

Examples

1
2
3
4
5
6
7
8
TS <- getTS(getRebDates(as.Date('2011-03-17'),as.Date('2012-04-17')),'EI000300')
 p1 <- 11
 p2 <- 6
 funchar <- paste('BBIBOLL_v(',p1,',',p2,')',sep='')
 TSF <- TS.getTech_ts(TS,funchar)
 TSF <- TS.getTech_ts(TS, funchar="StockAveHsl2(20)/StockAveHsl2(60)", varname="avgTurnover_1M3M")
 funchar <- c('BBIBOLL_v(11,6)','StockAveHsl2(20)/StockAveHsl2(60)')
 TSF2 <- TS.getTech_ts(TS, funchar)

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