Description Usage Arguments Author(s) Examples
split a TSF or a TSFR into TSFs or TSFRs by factor,such as size,vol...
1 2 3 | TSF2TSFs_byfactor(TSF, ftype = c("size", "self", "vol", "amt", "sector",
"indexcomp", "date", "findate"), N = 5, freq = "year",
includeTSF = TRUE, sectorAttr = defaultSectorAttr())
|
ftype |
support size,trading volume,trading amount,industry,important index's component(000300.SH,000905.SH,000852.SH) and date. |
N |
split into N group,default value is 5. |
includeTSF |
whether add raw |
Andrew Dow
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #####split by size into 3 group####
TSFs <- TSF2TSFs_byfactor(tsf,N=3)
#####split by itself into 3 group####
TSFs <- TSF2TSFs_byfactor(tsf,ftype='self',N=3)
#####split by trading volumn of last 20 days ####
TSFRs <- TSF2TSFs_byfactor(tsfr,ftype='vol')
#####split by sector ####
TSFRs <- TSF2TSFs_byfactor(tsfr,ftype='sector')
TSFRs <- TSF2TSFs_byfactor(tsfr,ftype='sector',sectorAttr=defaultSectorAttr('fct')) #self defined sector
#####split by date ####
TSFRs <- TSF2TSFs_byfactor(tsfr,ftype='date',freq='2 years')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.