regression_result: regression_result

Description Usage Arguments Value Author(s) Examples

Description

Regression to the TSFR data, calculate factor return, residuals, and R squrare, etc.

Usage

1
2
3
4
5
6
reg.TSFR(TSFR, regType = c("glm", "lm"), glm_wgt = c("sqrtFV", "res"),
  sectorAttr = defaultSectorAttr(), secRtnOut = FALSE)

reg.TS(TS, FactorLists, dure = months(1), regType = c("glm", "lm"),
  glm_wgt = c("sqrtFV", "res"), sectorAttr = defaultSectorAttr(),
  secRtnOut = FALSE)

Arguments

TSFR

a TSFR object.

regType

the regress type,the default type is "glm".

glm_wgt

glm's weight data, default value is sqrt of floating market value.

sectorAttr

sector attribute.

secRtnOut

whether output sector's return,default value is FALSE.

TS

a TS object.

dure

see example in getTSR.

Value

return a list, contains dataframes of TSFR,frtn, residual and Rsquare.

Author(s)

Ruifei.yin

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
RebDates <- getRebDates(as.Date('2014-01-31'),as.Date('2016-09-30'))
TS <- getTS(RebDates,indexID = 'EI000985')
FactorLists <- buildFactorLists(
  buildFactorList(factorFun="gf.SIZE"),
  buildFactorList(factorFun="gf.GROWTH"),
  buildFactorList(factorFun="gf.TRADING"),
  buildFactorList(factorFun="gf.EARNINGYIELD"),
  buildFactorList(factorFun="gf.VALUE"),
  buildFactorList(factorFun="gf.OTHER"))
reg_results <- reg.TS(TS)
reg_results <- reg.TS(TS,FactorLists)
----------------------------------------------------------
TSF <- getMultiFactor(TS,FactorLists)
TSFR <- getTSR(TSF)
reg_results <- reg.TSFR(TSFR)

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