backtest.IC: backtest.IC

Description Usage Arguments Details Value Author(s) Examples

Description

backtesting the factor with some tables and charts using the 'IC' method.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
seri.IC(TSFR, stat = c("pearson", "spearman"))

seri.IC.decay(TSF, stat = c("pearson", "spearman"), prd_lists = list(w1 =
  lubridate::weeks(1), w2 = lubridate::weeks(2), m1 = months(1), m2 = months(2),
  m3 = months(3), m6 = months(6)))

table.IC(TSFR, stat = c("pearson", "spearman"))

chart.IC(TSFR, Nbin = "day", stat = c("pearson", "spearman"))

chart.IC.decay(TSF, stat = c("pearson", "spearman"), prd_lists = list(w1 =
  lubridate::weeks(1), w2 = lubridate::weeks(2), m1 = months(1), m2 = months(2),
  m3 = months(3), m6 = months(6)))

MF.chart.IC(mTSFR, Nbin = "day", stat = c("pearson", "spearman"),
  facet_by = c("date", "fname"))

MF.chart.IC.decay(mTSF, stat = c("pearson", "spearman"), ncol = NULL,
  prd_lists = list(w1 = lubridate::weeks(1), w2 = lubridate::weeks(2), m1 =
  months(1), m2 = months(2), m3 = months(3), m6 = months(6)))

MC.chart.IC.corr(TSFRs, stat = c("pearson", "spearman"))

MC.table.IC(TSFRs, stat = c("pearson", "spearman"))

MC.chart.IC(TSFRs, Nbin = "day", stat = c("pearson", "spearman"),
  ncol = NULL)

MC.chart.IC.decay(TSFRs, stat = c("pearson", "spearman"),
  prd_lists = list(w1 = lubridate::weeks(1), w2 = lubridate::weeks(2), m1 =
  months(1), m2 = months(2), m3 = months(3), m6 = months(6)), ncol = NULL)

Arguments

TSFR

a TSFR object

stat

a character string,indicating the methods to compute IC,could be "pearson" or "spearman".

TSF

a TSF object

prd_lists

a list

Nbin

the number of the groups the timespan is cut to, when plotting the IC series.It could also be character of interval specification,See cut.Date for detail. The default value is "day",which means no cutting, the value of every date are ploted.

mTSFR

a mTSFR object. See getMultiFactor.

ncol

a integer, specificate the number of cols of the multi-charts.

TSFRs

a list of object TSFR. See Model.TSFR.

Details

When caculating the correlation,two methods "pearson" and "spearman" is used.

Value

seri.IC return a xts object, which containing the IC seri

seri.IC.decay return a xts object of 12 cols, which containing the decayed ICs seri

table.IC return a matirx of the statistical of the IC, containing rows: "IC.mean","IC.std","IC.IR","IC.t","IC.p","IC.hitRatio"

chart.IC return a ggplot object of IC time series(with its 12 months MA)

chart.IC.decay return a ggplot object of decayed ICs bar chart. (You can also use attr(re,"table") to get the result table.)

MC.chart.IC.corr return a correlation chart of ICs of each TSFR.

Author(s)

Ruifei.Yin

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
modelPar <- modelPar.default()
TSFR <- Model.TSFR(modelPar)
re <- seri.IC(TSFR)
re <- seri.IC.decay(TSF)
IC.table <- table.IC(TSFR)
IC.chart <- chart.IC(TSFR,"3 month")
re <- chart.IC.decay(TSF)
attr(re,"table") # the result table
mTSFR <- getMultiFactor(TSR,FactorLists)
MF.chart.IC(mTSFR)
mp = modelPar.default()
factorIDs <- c("F000001","F000002","F000005")
FactorLists <- buildFactorLists_lcfs(factorIDs)
mps <- getMPs_FactorLists(FactorLists,modelPar=mp)
TSR <- Model.TSR(mp)
TSFRs <- Model.TSFs_byTS(MPs=mps,TS=TSR)
MC.chart.IC.corr(TSFRs)
MC.table.IC(TSFRs)
MC.chart.IC(TSFRs)

raphael210/RFactorModel documentation built on May 26, 2019, 11:06 p.m.