
Project EPJ uses advanced deep learning techniques to predict stock prices with high accuracy. By leveraging the Temporal Fusion Transformer (TFT) architecture, this project captures complex temporal patterns in financial time series data.
- Multi-horizon Forecasting: Predict stock prices across multiple future time steps
- Interpretable Predictions: Understand which features drive the model's decisions
- Attention Mechanisms: Capture long-range dependencies in financial data
- Variable Selection Networks: Automatically identify the most relevant features
- Quantile Forecasting: Estimate prediction uncertainty for risk management
- Python 3.7+
- PyTorch
- PyTorch Forecasting
- pandas
- numpy
- matplotlib
git clone https://github.com/yourusername/project-epj.git
cd project-epj
pip install -r requirements.txt
# Example code to load model and make predictions
from model import TemporalFusionTransformer
import pandas as pd
# Load your pre-trained model
model = TemporalFusionTransformer.load("models/tft_stock_model.pth")
# Prepare your data
data = pd.read_csv("data/stock_data.csv")
# Make predictions
predictions = model.predict(data)
The Temporal Fusion Transformer combines:
- LSTM encoders for processing sequential data
- Self-attention layers for capturing long-range dependencies
- Variable selection networks for handling multivariate data
- Quantile outputs for uncertainty estimation
Our model achieves:
- MAPE: 1.2% on test data
- RMSE: 0.45 on 5-day forecasts
- Outperforms ARIMA and LSTM baselines by 15%
Explore the complete implementation in our Google Colab notebook.
This project is licensed under the MIT License - see the LICENSE file for details.
- PyTorch Forecasting for their implementation of TFT
- Paper: Temporal Fusion Transformers for Interpretable Multi-horizon Time Series Forecasting