Description Usage Arguments Value Author(s) Examples
This is a bank stocks rotation strategy.Its idea comes from https://www.jisilu.cn/question/50176.
1 2 3 4 5 6 | bank.rotation(begT, endT = Sys.Date() - 1, chgBar = 0.2, fee = 0.003,
pbfun = c("gf.PB_lyr", "gf.PB_mrq"), roefun = c("gf.ROE_ttm", "gf.ROE",
"gf.F_ROE"))
bank.rotationV2(begT, endT, FactorLists, chgBar, fee = 0.003,
sectorID = "ES33480000", prefer = FALSE)
|
begT |
is strategy's begin date |
endT |
is strategy's end date |
chgBar |
is rotation's bar |
fee |
is trading cost |
a list of bank factorscore and strategy's historical return.
Andrew Dow
1 2 3 4 5 6 7 8 | begT <- as.Date('2014-01-03')
endT <- Sys.Date()-1
chgBar <- 0.2
bankport <- bank.rotation(begT,endT,chgBar)
FactorLists <- list(
buildFactorList(factorFun='gf.PB_mrq'),
buildFactorList(factorFun='gf.ROE_ttm'))
re <- bank.rotationV2(begT,endT,FactorLists=FactorLists)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.