All software

hedgY

A paper-trading app that pairs a stock position with a prediction-market contract on the event that could break it, and places both as one position.

When
June 2026
Type
Team, 30 hours at Unaite Paris Builds
Stack
Python, FastAPI, SQLite, Next.js
Links
Live demo, code
The hedgY dashboard: a one-year Palantir price chart with a Trade button, and a column of correlated prediction markets on the right, each with Yes and No prices and a Hedge button.
The hedge builder. Pick a stock and the right column lists the prediction markets matched to it, each one a click from becoming the hedge leg.

Problem

Someone long a defence stock is exposed to an election they cannot easily hedge. That risk is priced on a prediction market, which means a separate account, separate funding, odds quoted differently and no tool to size the offset against the stock.

What was built

  • Kalshi and Polymarket markets pulled into one schema and deduplicated across venues with a clustering matcher, showing the best Yes and No price per market.
  • A template library that maps an equity thesis to a hedge: defence and elections, pharma and FDA decisions, shipping and the Strait of Hormuz, rate-sensitive stocks and the Fed.
  • Combined orders: the equity leg and the prediction leg share a group id, so they are marked and closed together at the live price.
  • A SQLite paper ledger that starts at $1,000, with Alpaca prices streamed to the dashboard over server-sent events.

Stocks and real-world outcomes trade on different venues. The product is the position that spans both.

Limits

Paper trading only. Stock orders go to Alpaca's paper API, prediction fills happen inside the app against live aggregated odds, and nothing holds real money. The hedge pairings come from hand-written templates, so the app suggests hedges for the themes it knows and nothing outside them.