This repository contains a structured implementation of an algorithmic trading pipeline using Python and C++, utilizing Gemini's BTC trading data via REST API. The project covers data ingestion, feature extraction, model training, inference, and performance analysis, designed for practical algorithmic trading without execution.
The pipeline consists of the following stages:
- Python implementation of data ingestion using Gemini's REST API.
- GitHub Actions for automated Python unit testing (pytest), linting (Ruff, Mypy), and C++ linting and formatting (Clang-Tidy, ClangFormat).
- Unit tests and CI integration for robust verification.
- Feature engineering implemented in C++ using a header-only architecture.
- Features computed per trade tick: price, volume, and trade side (buy/sell).
- Integration with Python via Pybind11 (
internmodule).
- Online training implemented using scikit-learn's Lasso Regression.
- Buffer management logic for handling datasets (maintaining 10 recent X-Y pairs).
- Real-time predictions after training on accumulated data.
- Comprehensive unit testing for buffer management and model inference processes.
- Evaluate prediction accuracy using correlation between predicted values and actual target data.
- Automated scripts to output predictions and targets to files for subsequent analysis.
- Python scripts to perform correlation analysis and performance evaluation.
- C++ port of data ingestion logic using CPR.
- Pybind11 integration for Python interoperability, enabling Python scripts to leverage efficient C++ implementations.
- GNU Make
- CMake
- Ninja
- Conan
Clone the repository:
git clone https://github.com/MaxBreslin/trading-pipeline.git
cd trading-pipelineSet up your environment following the provided instructions and run:
make testEnsure all dependencies are correctly installed to avoid build issues.
- Python unit tests run via pytest.
- Integration tests automated through GitHub Actions.