Skip to content

Filtering the stockmarket into clusters with financial ratios built on quarterly snapshots over 5 years of data. The goal was to see the evolution paths of companies over time and find clusters that develop future winners. Methods used, PCA, UMAP, HDBSCAN, KMeans.

License

Notifications You must be signed in to change notification settings

Jasone818/clustering-the-stock-market

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

clustering-the-stock-market

Goal: Use 5 years of quarterly stock data across the Dow Jones to establish visual filters and informative clusters.

  • Doing so can highlight companies that are in growth phases, decline phases, or just kinda stagnant.
  • Using financial ratios combined with clustering, we can assess patterns between stocks in a convenient way.

Note that the model does not implement time series techniques as I wanted to achieve a generic overview of company characteristics. Here are some plots of the clusters.

A visualization of UMAP clustered by DBScan

This is a still of an animation that will follow stocks of interest over time through the UMAP shape.

Animation still - UMAP

Finally, here is a snippet of how the clusters are classified by feature in relation to one another. They are not alway strict boundaries, but there are some discernable themes.

What is the cluster made of?

Feel free to fork and play with the parameters, it is fun to watch the stocks move through the market over time in a more artistic way.

About

Filtering the stockmarket into clusters with financial ratios built on quarterly snapshots over 5 years of data. The goal was to see the evolution paths of companies over time and find clusters that develop future winners. Methods used, PCA, UMAP, HDBSCAN, KMeans.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published