https://github.com/h-vance/algorithmic-trading-engine
Low-latency execution framework supporting quant-driven strategies, featuring sub-10ms response times, dynamic risk parity modeling, and optimized order flow across fragmented markets.
https://github.com/h-vance/algorithmic-trading-engine
algorithmic-trading aws cpp execution-engine finance fintech hft low-latency python redis risk-parity trading-bot
Last synced: 25 days ago
JSON representation
Low-latency execution framework supporting quant-driven strategies, featuring sub-10ms response times, dynamic risk parity modeling, and optimized order flow across fragmented markets.
- Host: GitHub
- URL: https://github.com/h-vance/algorithmic-trading-engine
- Owner: h-vance
- Created: 2026-04-30T22:30:59.000Z (27 days ago)
- Default Branch: main
- Last Pushed: 2026-05-02T20:17:48.000Z (25 days ago)
- Last Synced: 2026-05-03T06:22:22.415Z (25 days ago)
- Topics: algorithmic-trading, aws, cpp, execution-engine, finance, fintech, hft, low-latency, python, redis, risk-parity, trading-bot
- Language: TypeScript
- Homepage:
- Size: 28.6 MB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Quantitative Algorithmic Trading Platform
Institutional-grade algorithmic trading platform optimized for low-latency execution on the Hyperliquid exchange. This system provides a secure, hardened, and scalable infrastructure for managing automated trading strategies with real-time risk monitoring and high-frequency execution patterns.
[](https://www.typescriptlang.org/)
[](https://www.python.org/)
[](https://reactjs.org/)
[](https://nodejs.org/)
[](https://fastapi.tiangolo.com/)
[](https://expressjs.com/)
[](https://cloud.google.com/)
[](https://hyperliquid.xyz/)
[](https://www.terraform.io/)
[](https://www.docker.com/)
[](https://www.postgresql.org/)
[](https://redis.io/)
## System Architecture
The platform is built as a decoupled, microservices-oriented monorepo to ensure fault tolerance and ultra-low latency.
- **Web Frontend (`apps/web`)**: A high-performance React dashboard for strategy management, real-time performance tracking, and system health monitoring.
- **Backend API (`apps/server`)**: A Node.js/TypeScript Express-based middleware layer managing authentication, strategy configuration, and coordination between the frontend and the execution layer.
- **Execution Engine (`apps/execution-engine`)**: A specialized Python/FastAPI microservice optimized for high-frequency interaction with the Hyperliquid API, utilizing asynchronous connection pooling and circuit-breaker patterns.
- **Shared Packages (`packages/shared`)**: Common TypeScript utilities, types, and business logic used across the Node.js components.
## Institutional Hardening
### Security & Access Control
- **Least Privilege IAM**: Service accounts are scoped to specific resources (e.g., resource-level Secret Manager access) rather than project-wide roles.
- **Edge Security**: Integrated Google Cloud Armor with pre-configured WAF rules to mitigate SQLi, XSS, and DDoS attacks.
- **Secure Secret Management**: Automated secret handling via GCP Secret Manager with zero-exposure lifecycle policies in Terraform.
- **Auth Guardrails**: Multi-layer authentication including wallet-based signing and staging-bypass keys for environment isolation.
### Reliability & Performance
- **Connection Optimization**: Hardened PostgreSQL connection pooling with read/write separation and SSL encryption.
- **Fault Tolerance**: Circuit breaker patterns implemented in the execution layer to prevent cascading failures during exchange outages.
- **Cost-Effective Compute**: Standardized on Cloud Run Gen2 for serverless efficiency, with optional C3-high-memory instance groups for extreme low-latency requirements.
## Key Features
- **Low-Latency Execution**: Optimized WebSocket integration with Hyperliquid for sub-millisecond order response times.
- **Risk Management**: Real-time equity tracking, automated circuit breakers, and position-sizing safeguards.
- **Infrastructure as Code**: Production environments defined and managed via Terraform (GCP/AWS) for repeatable, secure deployments.
- **Observability**: Integrated health checks, performance monitoring, and centralized logging.
## Technical Stack
- **Languages**: TypeScript, Python 3.12+
- **Frontend**: React, Vite, Tailwind CSS
- **Backend**: Node.js, Express, Vitest
- **Execution Engine**: Python, FastAPI, UV, Pytest
- **Database**: PostgreSQL (Prisma ORM), Redis
- **DevOps**: Docker, Terraform, Google Cloud Platform, GitHub Actions
## Getting Started
### Prerequisites
- Node.js 20+ and `pnpm`
- Python 3.12+ and `uv`
- Docker and Docker Compose
### Installation
1. Clone the repository:
```bash
git clone https://github.com/harrison-vc/algorithmic-trading-app.git
cd algorithmic-trading-app
```
2. Install dependencies:
```bash
pnpm install
```
3. Set up the execution engine:
```bash
cd apps/execution-engine
uv sync
```
### Development
- Start the full stack in development mode:
```bash
pnpm dev
```
- Run tests:
```bash
pnpm test
```