AI-Powered Investment and Stock
Prediction Platform
Muhammad Eihaab 2021-CS-98
Rana Ali Ahmar 2021-CS-100
Shehroz Rafaqat 2021-CS-107
Syed Qaim Raza 2021-CS-109
Supervisor: Nazeef Ul Haq
Introduction
Financial markets play a crucial role in the economy.
Predicting stock market trends can help investors make informed decisions.
There is a lack of reliable prediction tools specific to the Pakistan Stock Exchange (PSX).
Outdated Tools: Many existing prediction models are based on older algorithms that do not
leverage recent advancements in machine learning and data analytics.
Lack of Customization: Current tools often do not consider the specific economic, political,
and social factors that influence the PSX.
Inaccuracy: Investors face challenges due to the lack of precise and timely predictions,
leading to suboptimal investment decisions.
Accessibility: There is a need for a user-friendly platform that provides easy access to reliable
stock predictions.
This project is highly relevant to computer science as it integrates key concepts and
technologies such as machine learning, natural language processing (NLP), and web
[Link] inclusion of Generative AI for stock investment advice further reflects
the growing importance of AI-driven solutions in the financial domain.
AI-Powered Investment and Stock
Prediction Platform
Problem Statement
In today’s fast-paced financial markets, investors face significant challenges in processing vast
amounts of stock data and keeping up with real-time sentiment from news and social media
platforms. The absence of tools that can integrate historical stock data with real-time
sentiment analysis limits investors’ ability to navigate these complexities and capitalize on
market opportunities efficiently.
Significance:
Accurate stock predictions are crucial for informed investment decisions. Incorporating both
historical trends and real-time sentiment can improve prediction accuracy, helping investors
navigate volatile markets.
Existing Solutions & Limitations:
Traditional Models: Rely on past data, ignoring sentiment.
Sentiment Tools: Evaluate mood but don’t predict prices.
Algorithmic Trading Systems: Effective but inaccessible to most investors.
Our project addresses these gaps by combining machine learning and sentiment analysis to
provide accurate, actionable stock predictions.
AI-Powered Investment and Stock
Prediction Platform
Objectives
Develop a comprehensive investment platform that uses stock prediction through
historical data and sentiment analysis, provides generative AI-powered investment
advice, delivers board meeting notifications, and allows users to track and receive alerts
on their wishlist stocks.
Specific Objectives:
Chart Analysis: Utilize machine learning models like SVM, LSTM, and ANN to
predict stock prices based on historical data.[6], [7]
Sentiment Analysis: Analyze tweets and news to capture real-time market sentiment
and enhance stock predictions.
Generative AI for Investment Advice: Offer personalized, AI-driven investment
recommendations based on market trends and user preferences.
Board Meeting Notifications: Notify users of upcoming corporate board meetings
relevant to their tracked stocks.
Wishlist and Alerts: Enable users to create a wishlist of potential investments and
receive notifications on price changes.
AI-Powered Investment and Stock
Prediction Platform
Literature Review
Automated Stock Price Prediction Using Machine Learning
Goal: Create an automated trading system that integrates machine learning and news
sentiment analysis to improve stock prediction accuracy and enable profitable trades.
Achievement: Achieved high prediction accuracy (82.91%) using SVM for Apple Inc.
(AAPL), demonstrating the value of combining early-day trading data and news sentiment for
end-of-day price predictions.(1)
A stock price prediction method based on deep learning technology
Goal: Develop a stock price prediction model that integrates traditional financial data with
social media sentiment using deep learning techniques.
Achievement: Successfully demonstrated that incorporating social media text features with
financial indicators improves prediction accuracy, outperforming benchmark models.(2)
Our Contribution:
We will combine social media and news sentiment analysis to further increase the accuracy of
stock prediction models. Additionally, we incorporate generative AI-powered investment
recommendations, offering users personalized insights and actionable trading advice, going
beyond simple price predictions to provide more comprehensive investment guidance.
AI-Powered Investment and Stock
Prediction Platform
Data Sources
News Data:
Source: Finviz (financial news).
Content: Headlines and timestamps
Details:
[Link] for multiple stocks.
[Link] using BeautifulSoup.
[Link] timestamps (Today, Yesterday, or exact dates).
Stock Data:
Source: Yahoo Finance.
Content: Historical stock prices.
AI-Powered Investment and Stock
Prediction Platform
WorkFlow Diagram
AI-Powered Investment and Stock
Prediction Platform
Sentiment Analysis
Process:
Scrape financial news using BeautifulSoup.
Analyze sentiment using Vader SentimentIntensityAnalyzer.
Compute a "compound score" for each headline.
Output:
Daily average sentiment scores for each stock.
AI-Powered Investment and Stock
Prediction Platform
Cont.
Database Layer:
User Data: Stores user profiles, preferences, and wishlist information.
Stock Data & Predictions: Database for historical stock data, model-generated predictions,
and sentiment analysis results.
Notifications & Events: Stores information on board meetings, price changes, and other
notifications.
Frontend (User Interface):
User Dashboard: Displays real-time stock prices, predictions, and sentiment analysis results
in an intuitive format.
Investment Advice Module: Provides personalized recommendations with insights from
generative AI.
Wishlist & Alerts: Interface for users to create and manage their stock wishlist, with
notifications for price changes and board meetings.
Notification System: Alerts users about stock events, board meetings, and price changes via
email or in-app notifications.
AI-Powered Investment and Stock
Prediction Platform
Cont.
API Layer:
External APIs: Integration with financial data providers, social media platforms,
and news sources for real-time data collection.
Internal APIs: Facilitates communication between the frontend, backend, and
database layers to handle data requests, predictions, and notifications.
Security & Authentication:
User Authentication: Secure login system using OAuth or token-based
authentication.
Data Security: Ensures secure handling of user data, stock predictions, and
investment advice.
Notifications & Alerts:
Notification System: Triggers alerts for price changes, board meetings, and
significant stock events via email, SMS, or in-app notifications.
AI-Powered Investment and Stock
Prediction Platform
DataFlow Diagram
AI-Powered Investment and Stock
Prediction Platform
Implementation Plan
FYP-I GANTT CHART
Background Study, Literature Review, Methodology Identify Tools, Proposal
Defense, Data Acquisition, Preprocessing, Backend Development, Model
Development, Frontend Development, Report Submission
AI-Powered Investment and Stock
Prediction Platform
Cont.
FYP-II GANTT Chart
Frontend Development, Backend Development, Gen-AI ChatBot, Accuraccy Testing,
Integration Testing, Deployment, Final Report Submission
Thesis Topic
Testing and Evaluation
Testing Methods:
Unit Testing: Test individual components (e.g., data collection, models, API
endpoints) to ensure each functions correctly.
Integration Testing: Test the interactions between different system components
(data processing, prediction models, frontend-backend).
End-to-End Testing: Simulate real user interactions and test the full system from
data collection to predictions and recommendations.
Evaluation Metrics:
Prediction Accuracy: Measure model accuracy using Mean Absolute Error
(MAE), Root Mean Square Error (RMSE), and R-squared.
Sentiment Analysis Accuracy: Evaluate sentiment classification accuracy using
Precision, Recall, and F1-score.
Response Time: Measure the system's ability to handle real-time data and deliver
predictions quickly.
AI-Powered Investment and Stock
Prediction Platform
Expected Results
Anticipated Outcomes:
Accurate stock price predictions using a combination of machine learning, deep
learning (LSTM), and sentiment analysis.
Personalized, actionable investment recommendations powered by generative AI.
A user-friendly platform for real-time stock forecasting and advice.
Potential Impact:
Improved decision-making for investors by combining financial data with real-time
sentiment analysis.
Enhanced trading strategies through more accurate and holistic market predictions.
Increased accessibility to sophisticated stock prediction tools for a broader range of
users.
AI-Powered Investment and Stock
Prediction Platform
Challenges and Risks
Possible Obstacles:
• Data Quality Issues: Inconsistent or noisy data from social media and news sources.
• Solution: Apply data cleaning and noise reduction techniques (Wavelet Transform).
• Model Overfitting: Risk of overfitting due to small datasets or complex models.
• Solution: Use cross-validation, regularization, and train on diverse data sources.
• API Rate Limits: Potential limits on API requests for stock and social media data.
• Solution: Implement caching and schedule requests to optimize API usage.
Risk Management Strategies:
• Continuous Monitoring: Regularly track system performance to identify and fix issues.
• Backup Data Sources: Use multiple APIs for redundancy in case of failure.
• Scalability Plan: Design the system to scale easily as data volume and user base grow.
Thesis Topic
Conclusion
Project Significance & Goals:
Our stock prediction system integrates machine learning, deep learning, and
sentiment analysis, providing accurate stock forecasts and AI-powered
investment advice. This tool enhances investor decision-making by combining
financial data with real-time social media and news sentiment.
Next Steps:
Expand the system to cover more markets and asset types.
Improve prediction models using more advanced algorithms and larger datasets.
Explore commercialization opportunities for the platform.
This project lays the groundwork for a powerful, scalable stock prediction and
investment adivce tool with real-world impact.
Thesis Topic
References
1. X. Ji, J. Wang and Z. Yan, "A stock price prediction method based on deep learning technology," in
International Journal of Crowd Science, vol. 5, no. 1, pp. 55-72, April 2021, doi: 10.1108/IJCS-05-2020-
0012. keywords: {Deep learning;Wavelet transforms;Social networking (online);Biological system
modeling;Time series analysis;Predictive models;Feature extraction;Text mining;Deep learning;Financial
social media;Stock price prediction}
2. Mokalled, Wassim El-Hajj Mariam, and Mohamad Jaber. "Automated stock price prediction using machine
learning." Proceedings of the Second Financial Narrative Processing Workshop (FNP 2019). 2019.
3. Rather, Akhter Mohiuddin, Arun Agarwal, and V. N. Sastry. "Recurrent neural network and a hybrid model
for prediction of stock returns." Expert Systems with Applications 42.6 (2015): 3234-3241.
4. Rout, Ajit Kumar, et al. "Forecasting financial time series using a low complexity recurrent neural network
and evolutionary learning approach." Journal of King Saud University-Computer and Information
Sciences 29.4 (2017): 536-552.
5. Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G. S., Davis, A., Dean, J., Devin, M.,
Ghemawat, S., Goodfellow, I., Harp, A., Irving, G., Isard, M., Jia, Y., Jozefowicz, R., Kaiser, L., Kudlur, M., Levenberg, J.
(2016). TensorFlow: Large-Scale Machine Learning on Heterogeneous Distributed Systems. [Link]. https://
[Link]/abs/1603.04467
6. Kamalov, F., Smail, L., Gurrib, I. (2020). Stock price forecast with deep learning. 2020 International Conference on Decision
Aid Sciences and Application (DASA). [Link]
7. M, H., E.A., G., Menon, V. K., K.P., S. (2018). NSE Stock Market Prediction Using Deep-Learning Models. Procedia
Computer Science, 132, 1351-1362. [Link]
Thesis Topic
Q&A
Any Question?
Thesis Topic