4
4 Comments

I open-sourced HedgeVision — a full-stack stat-arb engine built in Python (FastAPI + React). Here's what I built and why.

After months of building in private, I just open-sourced HedgeVision — a full-stack statistical arbitrage platform.

GitHub: https://github.com/ayush108108/hedgevision

What it is:
HedgeVision is the quantitative core of a much larger project I'm building — SuperIntel, a fully autonomous, agentic trading system. HedgeVision is the first piece going public.

What it does:

  • Cointegration-based pairs discovery (Engle-Granger & Johansen)
  • Backtesting engine with z-score thresholds and configurable lookbacks
  • Paper trading simulation before going live
  • FastAPI backend + React/Vite dashboard with live analytics
  • Local-first: runs on SQLite, zero external dependencies to start
  • Production mode: Supabase/PostgreSQL + CCXT for live exchange trading
  • LLM-powered market intelligence (Ollama, OpenAI, Anthropic)
  • Docker + CLI + MCP server

Why I'm open-sourcing it:
I want other builders and quant developers to use it, stress-test it, and contribute. Stat-arb is a well-studied strategy but there aren't many clean, accessible open-source implementations with a proper UI and backtesting layer.

What's next:
More OSS projects from the SuperIntel ecosystem are dropping soon. If you're into algo trading, AI agents, or just want to follow the build — watch the repo or reach out.

Happy to answer any questions on the architecture or strategy.

on March 31, 2026
  1. 1

    Really cool to see someone open-source a full stat-arb stack with a proper UI layer. Most open-source quant tools stop at the backtesting engine and leave the visualization/monitoring as an exercise for the reader, which means nobody actually uses them in practice.

    The local-first SQLite approach is smart for onboarding -- one of the biggest friction points with quant platforms is the setup overhead. Being able to go from clone to running backtest without provisioning a database removes a huge barrier.

    Curious about the cointegration piece: are you re-testing pair stability on a rolling window, or is it a one-time discovery step? In my experience the pairs that look great in backtesting tend to break down exactly when you start trading them live, especially in crypto where market structure shifts fast. A regime detection layer that flags when a pair is drifting out of cointegration would be a killer feature.

    The MCP server integration is an interesting choice too -- are you thinking of this as something that AI agents could use to autonomously execute strategies, or more as a tool-use interface for human traders?

    1. 1

      Really appreciate the depth here — these are exactly the right questions to ask.

      On cointegration stability: right now it's a scheduled re-discovery step (not continuous rolling), but you've nailed the core problem. Static pair selection breaks down fast in live crypto — market structure shifts, correlations regime-switch, and suddenly your "cointegrated" pair is just two uncorrelated random walks. A rolling Engle-Granger window with a drift threshold is already on the roadmap as the next major feature for HedgeVision. The idea is to flag pairs drifting out of cointegration before positions go underwater, not after.

      On MCP: honestly, both. The immediate use case is tool-use for human traders — expose strategy execution, pair analysis, and position sizing as MCP tools so an LLM can reason over live portfolio state. But the longer vision (this is part of why HedgeVision feeds into SuperIntel) is fully autonomous agent execution — where the agent decides entry/exit based on regime signals, not a human clicking buttons. The MCP layer is what makes HedgeVision pluggable into any agentic loop.

      If you want to dig into the architecture, it's all in the repo: https://github.com/ayush108108/hedgevision — would genuinely value a second pair of eyes from someone thinking at this level.

  2. 1

    open sourcing a full stat-arb engine is bold. most people in quant keep everything proprietary. the fastapi + react stack is a practical choice too — ive been running a similar python backend for a different kind of data pipeline (scraping agency contacts at scale).

    whats your backtesting showing in terms of sharpe? and are you targeting retail traders or more of a dev audience who wants to build on top of it?

    1. 1

      Appreciate that — yeah, open-sourcing quant infra is a bit of a contrarian move but I think the real edge isn't in the strategy itself, it's in execution quality, risk management, and iteration speed. Sharing the engine doesn't give that away.

      On Sharpe: in backtests across crypto pairs (2021-2024 data), we're seeing 1.4-2.1 Sharpe depending on the pair and lookback window. But I'd be cautious about citing backtest Sharpe too confidently — it's the most optimism-biased number in quant. Live paper trading results are more interesting and still in progress.

      On audience: honestly both, but the current build skews dev. The architecture is designed so a quant dev can swap in their own pair selection logic or strategy class and get a full backtesting + live trading stack without rebuilding the plumbing. Retail traders will come once the UI layer gets more polish. But if you're building data pipelines at scale, the FastAPI + async task queue pattern might actually be reusable for your use case too.

      Repo: https://github.com/ayush108108/hedgevision — happy to dig into any part of the stack.

Trending on Indie Hackers
7 years in agency, 200+ B2B campaigns, now building Outbound Glow User Avatar 105 comments How I built an AI workflow with preview, approval, and monitoring User Avatar 60 comments The "Book a Demo" Button Was Killing My Pipeline. Here's What I Replaced It With. User Avatar 46 comments I built a desktop app to move files between cloud providers without subscriptions or CLI User Avatar 27 comments Show IH: I built an AI agent that helps founders find the right people User Avatar 24 comments After 4 landing page rewrites, I finally figured out why my analytics SaaS wasn't converting User Avatar 20 comments