/Clustering-Stocks-Based-on-VaR

codes to cluster stocks into groups based on value at risk using K-Means, Agglomerative, and GMM.

Primary LanguageJupyter Notebook

Clustering-Stocks-Based-on-VaR

Stock Clustering based on VaR (Value at Risk)

Team Members

  • Abdullah Nasih Jasir
  • Al-Ferro Yudisthira Putra
  • Mohammad Ahnaf Fauzan

Overview

Welcome to our stock clustering project! In this repository, we present a powerful tool for clustering stocks based on VaR (Value at Risk) using the historical method. Our approach utilizes three distinct algorithms: KMeans, Agglomerative, and GMM (Gaussian Mixture Model).


Algorithms

  • KMeans: KMeans is a clustering algorithm that partitions data into K clusters. It works by assigning each data point to the cluster whose mean has the least squared Euclidean distance.

  • Agglomerative: Agglomerative clustering is a hierarchical clustering method that starts with each data point as a separate cluster and iteratively merges the closest pairs of clusters until only one cluster remains.

  • GMM (Gaussian Mixture Model): GMM is a probabilistic model that represents a mixture of Gaussian distributions. It is particularly useful for modeling data that may have been generated from a mixture of several subpopulations.


Output

Our project provides valuable insights and outputs for stock analysis:

  1. Cluster Characteristics:

    • Understand the characteristics of each cluster formed after applying the clustering algorithms. Each cluster represents a group of stocks with similar risk profiles.
  2. Stock Cluster Identification:

    • Identify the cluster to which a specific stock belongs and visualize the daily price diagram for stocks within that cluster.
  3. Recommended Stocks:

    • Receive recommendations for stocks that share a similar level of risk based on your preferences. This feature assists in making informed decisions aligned with your risk tolerance.

Version

Last Update: 18 April 2024