Authors - Prasanna Tupe, Parikshit N. Mahalle Abstract - This study presents a machine learning-based method for using the K-Nearest Neighbors (KNN) algorithm to optimize swing trading strategies. The algorithm forecasts stock price fluctuations over the next seven days using historical stock market data and offers various levels of nuanced trading signals. By empowering traders to make more accurate and knowledgeable judgments, this method outperforms conventional binary buy-and-sell recommendations. The KNN technique was selected due to its instance-based learning, non-parametric nature, and simplicity, which make it interpretable and computationally efficient. The model's accuracy rate demonstrated how well it could forecast changes in stock prices. This study provides a workable approach for swing traders looking to optimize their profits while highlighting the important role that machine learning plays in tackling the difficulties associated with stock market prediction. This study lays the groundwork for using machine learning to enhance trading tactics and financial market decision-making.