Open Access Open Access  Restricted Access Subscription or Fee Access

Implementation of K-Means clustering algorithm with technical indicators to identify Profitable stocks

Dhwaj Sharma, Bhupesh Gour


In the ever-changing world of stock market trading, accurately predicting price movements is key to maximizing profits. Technical analysis, which looks at past price data to predict future trends, provides valuable insights for investors. This paper delves into using machine learning methods, particularly the K-Means clustering algorithm, along with moving average data, to categorize daily trading patterns. By breaking down the market into clusters and examining the main patterns within the largest cluster, this study aims to identify positive or negative trends. We worked with a dataset spanning ten years of historical data from five companies listed on the National Stock Exchange of India (NSE), including HDFC Bank Ltd., Hindustan Unilever Ltd., Asian Paints Limited, Maruti Suzuki India Limited, and NTPC Limited. The approach involves collecting data, preprocessing it, and conducting clustering analysis using K-Means. Following this, we evaluate and analyze profitability, including backtesting against historical data to verify algorithmic results. This research adds to the evolving field of stock market analysis by merging technical indicators with machine learning algorithms to aid in making well-informed investment decisions.


Stock Market Analysis, K-Means Clustering, Machine Learning, Profitable Stocks Identification, Trend Analysis

Full Text:



  • There are currently no refbacks.

Copyright (c) 2024 Current Trends in Signal Processing