layer_return: Calculate layer returns from raw stock daily data data frame

Description Usage Arguments Value

View source: R/layer_return.R

Description

Calculate layer returns from raw stock daily data data frame

Usage

1
2
layer_return(Test_Data, factor, neutrals = NULL, stock_pool = "NONEST",
  n_layer = 10L, frequency = 20L, start_point = 1L, lang = "CHN")

Arguments

Test_Data

Stock daily data data frame of certain form.

factor

The factor variable.

neutrals

A character vector specifying style factors (including industry) to neutralize upon. Possible components are "CITICS_IND_CODE", "LOG_S_DQ_MV", and "LOG_B2M". For example, neutrals = c("CITICS_IND_CODE", "LOG_S_DQ_MV").

stock_pool

Stock pool in which stocks are selected. "NONEST", "ZZALL", "HS300", or "ZZ500". Default to "NONEST".

n_layer

Number of layers. Default 10.

frequency

An integer. Adjust position in every how many days?

start_point

An integer. Which day from the sample beginning to firstly set up position. Usually from 1 to frequency. Default 1.

lang

Value

An xts object of returns of each layer.


ylwpaopao/cnquant documentation built on Dec. 2, 2019, 10:39 p.m.