f_rtn_cov_delta: factor return,covariance and delta

Description Usage Arguments Value Examples

Description

calculate factor return, factor covariance and residual variance.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
f_rtn_cov_delta(dure = months(1), rolling = FALSE, rtntype = c("mean",
  "forcast"), covtype = c("shrink", "simple"), nwin = 24, reg_results)

getfRtn(dure = months(1), rolling = FALSE, rtntype = c("mean", "forcast"),
  nwin = 24, reg_results)

getfCov(dure = months(1), rolling = FALSE, covtype = c("shrink",
  "simple"), nwin = 24, reg_results)

getDelta(dure = months(1), rolling = FALSE, nwin = 24, reg_results)

Arguments

dure

a period object from package lubridate. (ie. months(1),weeks(2). See example in trday.offset.) If null, then get periodrtn between date and the next date, else get periodrtn of 'dure' starting from date.

rolling

default value is FALSE, if value is TRUE means the data period is nwin forward.

rtntype

is method to caculate factor return,mean means average of historical data,forcast means forcast factor return based on historical data,it may take a while,the forcast method come from package ets.

covtype

means type of caculating covariance,shrink can see example in nlshrink_cov,simple see cov.

nwin

is rolling windows forward.

reg_results

see examples in reg.TSFR

RebDates

is date set, can be missing.

Value

a data frame of factors' return .

Examples

1
2
3
4
fRtn <- getfRtn(reg_results=reg_results)
fCov <- getfCov(reg_results=reg_results)
Delta <- getDelta(dure=months(1),rolling=FALSE,nwin=24,reg_results)
rtn_cov_delta <- f_rtn_cov_delta(reg_results=reg_results)

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