MSC Finance Project — An end-to-end agentic AI pipeline for automated trading signal generation across 11 financial assets using machine learning, technical analysis, and AWS cloud infrastructure.
The entire pipeline is deployed on AWS, operating daily via serverless triggers, with a real-time monitoring dashboard hosted on an EC2 instance.
The system is divided into six distinct layers, separating the heavy data science processing from the lightweight daily execution and user interface.
-
Agent 1 (Market Analysis): Calculates technical indicators (RSI, MACD, SMA crossovers) and labels data based on 5-day forward returns.
-
Agent 2 (Information Retrieval): Fetches daily global news headlines and extracts multi-class sentiment scores using NLP.
-
Agent 3 (Decision Engine): A Random Forest Classifier (100 Trees, 13 Features) that outputs BUY/SELL/HOLD signals with confidence probabilities.
-
Agent 4 (Risk Management): The "Gatekeeper." Enforces a 55% minimum confidence threshold, stop-loss limits, and portfolio sizing rules before approving a trade.
- Cloud Infrastructure (AWS): * EventBridge: Daily cron schedule trigger (8:00 AM Local).
- Lambda: Executes the daily trading pipeline.
- S3: Stores historical raw data, trained
.pklmodels, and dailysignals.jsonoutputs. - RDS (MySQL 8.4): Maintains an immutable audit trail (
trade_log) of all AI decisions. - EC2: Hosts the persistent 24/7 web dashboard.
- Machine Learning:
scikit-learn(Random Forest, StandardScaler) - Data Pipelines:
yfinance(OHLCV data),NewsAPI(Sentiment),pandas - Frontend UI:
Streamlit
├── data/
│ ├── featured/ # Processed data with technical indicators
│ ├── plots/ # Generated EDA and performance charts
│ ├── raw/ # Raw OHLCV market data
│ ├── backtest_summary.csv # Historical backtesting results
│ └── sentiment_scores.csv # NLP sentiment analysis outputs
├── notebooks/ # Jupyter notebooks for experimentation
├── package/ # AWS Lambda deployment packages
├── src/ # Python scripts for the 4 ML Agents
├── .gitignore # Hidden files and keys
├── app.py # Streamlit Dashboard UI
├── requirements.txt # Project dependencies
└── README.md # Project documentation