← Back to Portfolio

Anomaly Stock Detection System

Results

Plotted Result of Anomaly Detection

The chart above displays the plotted result of the Z-score, Isolation Forest, and Residual Anomaly Detection.

Information Coefficient 0.072
Sharpe Ratio 0.37
Data Coverage 39 Years (1986-2025)

The IC of 0.072 indicates the model has statistically significant predictive power. In quantitative finance, an IC > 0.05 is generally considered strong performance.

What It Does

The model takes 60 days of historical stock data (prices, volume, technical indicators) and predicts whether the stock will go up or down the next day. It uses two LSTM layers to learn temporal patterns in the data.

Features Used

The model uses 30+ features including:

Model Architecture

Input: 60 days × N features
↓
LSTM: 64 units
Dropout: 0.2
↓
LSTM: 32 units
↓
Dense: 1 output (predicted return)

Trained for 30 epochs with Adam optimizer and MSE loss.

Why LSTM?

Stock prices have temporal dependencies - patterns from previous days affect future prices. LSTM's gating mechanism allows it to remember relevant information across the 60-day sequence while filtering out noise. This makes it better suited than simpler models like linear regression or random forests which ignore temporal ordering.

Setup & Usage

pip install -r requirements.txt
jupyter notebook project.ipynb

Data Leakage Prevention

Requirements