AI-Driven Real-Time Stock Forecasting Framework with Kafka and Cassandra
Abstract
Financial markets nowadays are an arena with high-frequency trading (HFT) and real-time decision-making, where milliseconds matter between making or losing money. Traditional batch-processing architectures can't keep up with the velocity, volume and volatility of modern financial data. In order to overcome this, we propose a scalable real-time forecasting system incorporating Apache Kafka for distributed ingestion, Apache Cassandra for scalable persistence, and hybrid AI models for predictive analytics. The framework takes in multiple data streams, such as tick-level trades, financial news, social media sentiment and macroeconomic indicators, and processes them through a Spark-based streaming pipeline. Forecasts are made with a hybrid ensemble of long short-term memory (LSTMs) and Random Forests based on a mixture of sequential learning and strong classification. Experimental validation on S&P 500 tick data (2015-2024) shows that the framework is able to achieve sub- 50 ms latency, maintain over 2.5 million events per second throughput, and provide forecasting accuracy gains over 50 % compared to traditional baselines. Case studies of the market crash during the pandemic (2020) and the Federal Reserve interest rate hike (2022) prove the robustness of the system during periods of extreme volatility. These results make the framework a production-ready solution for next generation stock market forecasting, with wide applicability to other areas such as healthcare, cybersecurity, smart transportation and energy systems, where reliable decision making in real time is equally as important.
Fields of Study & Subjects
Stock Market Forecasting Methods
Financial Markets and Investment Strategies
Data Stream Mining Techniques
Publication details
- Journal / source
- International Conference on Advances in Electrical, Computing, Communication and Sustainable Technologies (ICAECT)
- Pages
- 1–6
- Publication date
- 8 January 2026
- Language
- EN