selectPortfolioCommunity: Select stocks based the community detection info,inside...

Description Usage Arguments Value

View source: R/selectPortfoiloCommunity.r

Description

Select stocks based the community detection info,inside community

Usage

1
2
3
4
5
6
7
8
9
selectPortfolioCommunity(
  GRAPH,
  mem = NULL,
  mem_algo = "cluster_infomap_new",
  stock_id = NULL,
  portfolioSize = 4,
  type = c("inside", "inter"),
  central_rule = c("sum", "mean")
)

Arguments

GRAPH

the correlation-based graph

mem

the community membership of the GRAPH, default NULL

mem_algo

the algorithm to perform the community detection

stock_id

the names of the stocks, if the graph is unamed, will be used to name the nodes

portfolioSize

the size of the portfolio, ie., the stocks you want to pick from the graph

type

"inside" means the stocks are all picked from one community with very strong connection, "inter" means the stocks are all picked from different communities

central_rule

the rule use to compare different community by the hybird centrality measure when choose one stocks over another

Value

a vector with stock names or id


zlfccnu/econophysics documentation built on Feb. 23, 2022, 10:22 p.m.