IMC

Inspiration

In 40°C heat in India, one of our teammates watched three young siblings split a single banana into three pieces, smiling just because everyone got something to eat. Hunger doesn't just take calories from a child, it takes their dignity.

Malnutrition drives half of all deaths under age five, claiming more lives than AIDS, TB, and malaria combined. Yet most charities still buy food after droughts or floods spike prices by 35% or more. While major UN agencies run enterprise platforms like Palantir DOTS and Optimus, smaller regional NGOs are left guessing, overlapping in some districts while near-expiry food spoils in silos just kilometers from empty clinics.

What it does

AegisAid is an open-data anticipatory logistics and surplus-sharing platform built for Tier-2 child-nutrition NGOs:

4-Week Early-Warning Time-Lapse: Combines live weather anomalies, Brent crude freight costs, local FX, and WFP staple prices to flag shortage districts weeks before prices jump across North India (UP & Bihar) and East Africa (Kenya).

Risk-Adjusted Pre-Positioning: Uses a Two-Stage Stochastic Linear Program to ship food early where risk is high and hold cash where risk is low, so charities never burn their budgets on false alarms.

Earmarking Opportunity Cost & 1-Click Waiver: Compares constrained vs. relaxed optimization to show exactly how many more children can be fed when geographic donor restrictions lift, generating an auditable Donor Waiver Brief in one click.

Shared NGO Surplus Network: Parses urgent field shortages and near-expiry surplus (including via WhatsApp/SMS) and matches them to the closest partner with a 1-click handoff.

How we built it

Backend (FastAPI · Python · SciPy): Deterministic-equivalent Two-Stage Stochastic LP (scipy.optimize.linprog, HiGHS) integrating Open-Meteo precipitation anomalies, EIA/FRED Brent Crude (DCOILBRENTEU) + FX with bounded empirical food elasticity, and WFP HDX baseline market prices.

Frontend (Next.js · TypeScript · Tailwind · Leaflet): Clean light-mode command center on OpenStreetMap tiles with smooth World-to-Corridor zoom, interactive 4-week time-lapse playback, animated NGO shipping arcs, district signal breakdowns, and UN Aid Cluster toggles (Food, Medicine, Hygiene).

Challenges we ran into

Preventing "Acting in Vain": A naive optimizer wastes money on false alarms. Reformulating it as a Two-Stage Stochastic LP with spoilage costs and a break-even trigger solved this in under 200ms.

Realistic Oil-to-Food Economics: Instead of assuming 1:1 inflation, we grounded pass-through in peer-reviewed studies—routing oil and FX into distance-scaled inland freight with a capped ~0.25 commodity elasticity.

Live Integration: Fixed a Next.js 16 Turbopack PostCSS crash (--webpack) and kept frontend and backend payloads tightly synced via a shared API_CONTRACT.ts.

Accomplishments that we're proud of

Calibrated, Auditable ROI: Our solver's 1.48× baseline aligns with independent UN, BCG, and PwC studies ($1.50 median / $2.60 mean return per $1 invested, arriving 10–14 days faster and cutting hunger days by over a third).

Unlocking Trapped Capital: Turning rigid geographic earmarking into a concrete "children reached" metric, backed by an instant donor waiver.

Production-Ready Build: A live FastAPI + SciPy engine driving a real-time Leaflet time-lapse UI, verified end-to-end with pytest, tsc, eslint, and offline resilience.

What we learned

Clarity beats complexity: Charities don't want black-box math jargon; they want clear reasons why a district is at risk and frictionless coordination.

Solve the cold-start problem on Day 1: Giving a single NGO immediate value through free forecasts makes it much easier to grow a wider surplus-sharing network.

Privacy by design: Anonymized, district-level capacity data delivers full coordination with zero PII.

What's next for Bot G65

Deeper Open Feeds: Add Open-Meteo root-zone soil moisture (NDVI proxy) and GloFAS river discharge gauges to anticipate flash-flood road cuts.

Multi-Sector Scale: Expand from Food into our schema-ready Essential Medicines and Hygiene clusters—plus a regulated Phase-2 module for licensed blood banks to prevent 5-day platelet expiry during dengue and flood surges.

Pre-Agreed Smart Escrow: Pair our risk thresholds with pre-agreed donor clauses so relief funds release automatically the moment verified triggers fire.

Optiver

Inspiration

Optiver gave us eight stocks, an exchange and no hint where the edge is. We decided to treat it like a measurement problem rather than a guessing game. Record what the market does, find out who makes money and how, and only let the bot trade on what survives a live test.

What it does

Bot G65 trades all eight stocks on Optibook autonomously, within the ±100 position limit and the 25 requests/second budget. It has three parts:

  • Lead–lag follower pricing. Three stocks follow three others: SNDK follows NVDA, NBIS follows AVGO, CRWV follows MU. The bot keeps a live fair value for each follower from its leader. When a leader jumps, it trades against the follower's stale quotes, then unwinds passively at the top of the book.
  • Passive market making with small size. Between jumps it quotes in front of the exchange's large resting orders. It uses small clips and pulls quotes as soon as those orders start to move.
  • Risk layer. Small per-stock caps and fast unwinding. A loss stop, and automatic reconnect. A guard checks every single order against self-trades and the position limit just before it is sent.

How we built it

  • Recording first. We wrote a read-only recorder that logs every trade with buyer and seller once the exchange de-anonymised trades. From about 10,000 named trades over 96 minutes we profiled every team's trade count, lot size, share of aggressive volume, markout, holding time and favourite stocks.
  • What the data told us. The best teams traded small lots (12–14) and were flat again within about 5–7 seconds. Most of their volume was in AVGO, NVDA and AMD. The exchange's house bots lost the most money: two of them were around −9,000 each. Both findings went straight into the bot (smaller clips, AMD added, faster unwinding).
  • A live A/B harness. Strategies run in rotation (A B A B) for fixed rounds on the real exchange, with hard loss and drawdown stops. Our rule: a strategy only qualifies if it is positive in every round and never hits a stop.
  • An adaptive layer. It measures the markout of our own fills per stock and shrinks or pauses stocks where we get picked off. Parameters can be changed live from a JSON file without restarting the bot.
  • Live audits. We read the live logs line by line. They showed a follower intercept that froze in a dead zone after a leader move, and an unwind order that sat several ticks behind the market. Together they left an 80-lot position open for over a minute. Both are fixed in v4.

Challenges we ran into

  • One connection per team. Starting the bot three times by accident made three copies kick each other off the exchange every few seconds. Now we check for exactly one runner before every start.
  • Forced disconnects. A self-trade disconnected us live once. We also exceeded the request limit once, because an added wrapper polled too often. Both led to safeguards in the order path.
  • A false loss stop. Cash and positions were read at slightly different moments, which produced a phantom loss of about 1,000 and switched the bot off. The stop now needs valid prices and three consecutive breaches.
  • Backtests lie. Our replay backtester said +3,194 in ten minutes for a strategy that made about +18 per minute live. From then on we used it only to catch broken code, and judged strategies live.
  • Copying winners did not work. We rebuilt the momentum-taking behaviour of the top teams and tested the underlying signals on recorded data. Trade-flow momentum and shifts of the large resting orders showed no edge after paying the spread at our speed (backtest −235). We dropped it instead of shipping it.

Accomplishments that we're proud of

  • A counterparty analysis of the whole field, built during the event, that explained where the money in this market comes from.
  • A disciplined test loop: recorder, analysis, backtest for correctness, live A/B with stops, log audit, fix.
  • A final bot that stayed connected, kept positions small and unwound quickly in live testing.

What we learned

  • Ten minutes of live PnL is mostly noise. Single jumps decide a lot, so you need many rounds and risk measures, not one good-looking run.
  • Speed and position room matter more at jumps than clever signals.
  • Exchange rules are hard constraints. One self-trade or one order over the limit costs more than any strategy improvement earns.
  • Writing down what failed saved us from repeating dead ends.

What's next for Bot G65

  • A faster order path, deciding on the client's network thread.
  • Measuring mean reversion towards a base price, and testing it out of sample before trading it.
  • A simulator tuned to our recordings, so changes can be judged over many half-hours instead of single live rounds.
  • Sizing each position by what a jump in that stock could cost.

Built With

  • ai
Share this project:

Updates

Submission history