get_frtn_res_series: THE REGRESSION FUNCTION

Description Usage Arguments Value Examples

View source: R/risk01_BARRA_Model.R

Description

Barra regression function. Common usage is showed in examples.

Usage

1
get_frtn_res_series(ts_union, barra_fls, barra_param, ts)

Arguments

ts_union

TS object. Recommanded use.

barra_fls

The factorLists object to get regression X variables.

barra_param

A list, containing all the parameters in barra risk model. subset_reg flag is contained in the parameter list, default NULL. The subset_reg could be a character vector containing many sectorIDs. Regression is done within this subset.

ts

TS object. Carefully use. When ts is passed into the function, actually only the rebalance date series would be retrieved. A complete and longer period TS object would be generated inside the function to execute regression.

Value

A list, including four values, frtn_seri, res_seri, omega_seri, data_bank(mtsfr in fact). omega_seri is the pure factor port, each column is the weight vector of one single pure factor.

Examples

1
2
3
fls <- barra_fls_default()
ts_union <- getIndexComp("EI000985", endT = as.Date("2018-01-31"), drop = FALSE)
get_frtn_res_series(ts_union = ts_union, barra_fls = fls, barra_param = barra_param_default())

raphael210/QDataGet documentation built on May 26, 2019, 11:02 p.m.