Description Usage Arguments Details Value Examples
View source: R/draw_cluster_analysis.R
draw k-mean cluster analysis result in histogram table
1 | draw_cluster_analysis(df_stocks, num_center, num_start)
|
df_stocks |
bunch of stocks stacked which user want to analyze |
num_center |
number of centers of clusters user might choose. There are no statisticaly proven best number. But You can use elbow-method to choose best param |
num_start |
number of random initialized starting point as a initial poitn of model training |
This compute the k-means algorithm with user designed parameter. Then it will draw the histogram result. This can be used to analyze the market trend, similiarity, risk parity, and regime of the market movement for each stocks inputted
plot of cluster result from k-means
1 | draw_cluster_analysis(df_stocks, num_center, num_start)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.