build_sort_portfolios: Build sort portfoilos basing on group list of stocks

Description Usage Arguments Value

View source: R/factor-test.R

Description

use stocks list and factor value list to build sort portfoilos by sorting factor value and cutting in n groups.

Usage

1
2
3
4
5
6
build_sort_portfolios(
  stocks_list,
  factor_value_list,
  stocks_weight_list = NULL,
  ngroup = 5
)

Arguments

stocks_list

A list of stkcds of stocks.

factor_value_list

A list of factor value of corresponding stocks.

stocks_weight_list

A list of stocks weight or NULL for equal weight of 1, by default NULL.

ngroup

Numbers of groups to cut stocks, by default 5.

Value

1
2
            A tibble dataset of portfolio_group, stkcd, weight,
                    factor_value.

chriszheng2016/zstmodelr documentation built on June 13, 2021, 8:59 p.m.