Thanks to visit codestin.com
Credit goes to github.com

Skip to content

kevanbtc/hydra

Repository files navigation

UnykornX HydraGrid

Multi-asset AI trading system: equities + energy futures, governed by an AI swarm with MCP tools.


Table of Contents


Overview

HydraGrid is a modular, multi-asset trading platform designed for:

  • Equity/ETF trading (US + global)
  • Energy market trading (power futures, gas/oil futures, spreads)
  • AI-driven strategy orchestration (swarm of agents + MCP tools)
  • Multi-tenant SaaS delivery (API + web portal)
  • Extensibility (new venues, instruments, strategies without rewrites)

Architecture

See ARCHITECTURE.md for the full design document.

Quick Structure

hydragrid/
  packages/
    engine-core/           → Universal order/portfolio engine
    data-pipelines/        → Stock & energy data ingestion
    strategies-stock/      → Equity strategies
    strategies-energy/     → Futures/energy strategies
    swarm/                 → AI agents + MCP orchestration
    risk/                  → Risk engine, limits, scenarios
    analytics/             → Metrics, backtests, benchmarks
    infra/                 → API, workers, deployment
    web-portal/            → Frontend + user dashboard
    docs/                  → Documentation

Color-coded repo map

Legend: packages are grouped by functional domain and color-coded consistently across docs and diagrams.

  • Data: data
  • Engine: engine
  • Strategies: strategies
  • Risk: risk
  • Swarm (AI/MCP): swarm
  • Analytics: analytics
  • Infra/API: infra
  • On-chain: onchain
Package Domain Path
engine Engine core packages/engine-core/unykornx_engine/
data Data pipelines packages/data-pipelines/hydragrid_data/
strategies Stock strategies packages/strategies-stock/unykornx_strategies_stock/
strategies Energy strategies packages/strategies-energy/unykornx_strategies_energy/
swarm AI agents + MCP packages/swarm/hydragrid_swarm/
risk Risk engine packages/risk/hydragrid_risk/
analytics Analytics packages/analytics/hydragrid_analytics/
infra API, workers, deploy packages/infra/hydragrid_infra/
onchain Contracts + scripts packages/onchain/

Color legend and end-to-end diagrams are in DIAGRAMS.md.


Diagrams & flow trees

See consolidated diagrams (system architecture, data flow, swarm decisioning, on-chain control plane, risk policy flows) in DIAGRAMS.md.

Setup (Phase 1: Skeleton)

Prerequisites

  • Python 3.10+
  • pip or pipenv

Installation

  1. Clone the repo:

    cd hydragrid
  2. Create a virtual environment:

    python -m venv .venv
    source .venv/bin/activate  # or .venv\Scripts\activate on Windows
  3. Install in development mode:

    pip install -e .[all]
  4. Copy .env.example to .env and configure:

    cp .env.example .env

Run Tests

pytest tests -v

Build Phases

  • Phase 1: Skeleton + VS Code workspace ✓
  • Phase 2: Engine-core + toy strategies + backtest
  • Phase 3: Analytics & benchmarks
  • Phase 4: Swarm + MCP tools
  • Phase 5: API & Portal
  • Phase 6: Energy expansion + real venues

Usage (Next Steps)

After Phase 1 scaffold is complete:

  1. Point builder-AI at packages/engine-core/ to implement Phase 2.
  2. Each phase unlocks the next with increasing complexity.

See PHASE_GUIDE.md for detailed implementation steps per phase.

Contributing

Contributions follow the project structure and coding standards in .vscode/settings.json and pyproject.toml.

License

MIT. See LICENSE.

Contact

HydraGrid Dev Team

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published