This repository contains the implementation of a transformer-based machine learning model designed to predict trading signals (buy, sell, hold) based on high-frequency trading data. The project integrates traditional trading strategies with modern machine learning techniques to enhance trading decision-making processes.
The aim of this project is to develop a predictive model that can generate actionable trading signals from microsecond-level stock price data. It combines technical indicators and a transformer architecture to analyze patterns and suggest trading actions.
The dataset consists of high-frequency trading data, which includes features like price, volume, and various technical indicators (e.g., RSI, MACD).
The core of this project is a transformer model tailored to process time-series financial data. The model is trained to recognize patterns that precede buy, sell, or hold signals.
- Input Features: Price, Volume, RSI, MACD, Stochastic Oscillator K
- Output: Trading signals (0 = Buy, 1 = Sell, 2 = Hold)
Transformer_signal.ipynb
: Jupyter notebook containing the model training and evaluation code.weights_batch128/
: Folder containing the trained model weights.pics_batch128/
: Loss plots generated during training.
- Clone the repository.
- Install required dependencies:
pip install -r requirements.txt
- Run the Jupyter notebook to train the model or load pre-trained weights to simulate trading.