Skip to main content
Trading Tech at Hedge Fund

Hedge Fund Technology

Completed
Trading Finance Hedge Fund Backend Python Java

Modernizing a Trading Desk: Building Practical Tools for Options, Futures, and FX

Project description and intro

For nine months I worked on the trading floor of a boutique hedge fund in Pasadena, embedded with the options, futures, and currency desks as their lead software developer. The mandate was straightforward and ambitious at the same time: improve trader efficiency and modernize a patchwork of legacy tools without disrupting the rhythm of live trading. I came in as both architect and builder—someone who could sit next to the desk, understand how decisions were actually made under time pressure, and turn those workflows into robust, explainable software that portfolio managers and traders would trust from pre-open through the end-of-day close.

In this engagement I owned the architecture and implementation of several desk-critical applications: a Portfolio Manager for point-in-time positions, P/L, and mandate visibility; an Options Allocator & Rebalancer that translated targets and risk budgets into executable plans; and an integration layer for Orc Trader that unlocked quoting, hedging, and spreading with a clean Java bridge to in-house models.


Business use case

Company

A Pasadena-based boutique hedge fund managing billions on behalf of sophisticated institutions—sovereign wealth funds, private equity partnerships, and large family offices—trading listed options, index futures, and major FX pairs with leveraged overlays and client-specific mandate constraints.

Business need

Before I arrived, the desk relied heavily on a mix of Excel VBA, ad-hoc Perl and Python scripts, and Bloomberg plug-ins. These tools had grown organically around smart people solving immediate problems; they worked, but they were brittle, hard to audit, and slow to change. Trade capture and reconciliation required too much manual effort. Position views were fragmented, P/L attribution was inconsistent across teams, and mandate limits were enforced late—often during end-of-day scrambles rather than as living guardrails throughout the day.

Trading instruments, strategies used by traders I worked with

  • Instruments: Index options (e.g., SPX/NDX, ETF options like QQQ), index futures (ES/NQ/RTY), major FX pairs (EUR/USD, USD/JPY), rolls and currency forwards

  • Greeks & surfaces: Δ (delta), Γ (gamma), V (vega), Θ (theta), ρ (rho); skew/term-structure; vol surfaces with SVI/SSVI-style wings; bucketed vega/gamma by moneyness/tenor

  • Risk & exposure: gross/net exposure, factor buckets, concentration constraints, liquidity bands (ADV/participation caps), margin impact

  • Rebalancing & hedging: target-to-trade translation, delta hedging with futures, volatility-aware no-trade bands, tracking-error control, contract roll management

  • Options workflows: verticals, calendars/diagonals, synthetic spreads, quote width/aggressiveness controls, market-maker protections (MMP/IFM-style)

  • FX overlay: hedge ratios, forward points/carry attribution, base-currency reporting consistency

  • Execution & TCA: pre-trade checks (limits, liquidity, margin), post-trade TCA and reconciliation to brokers/clearing with break workflows

Goals

The fund wanted a stable, explainable software backbone that reflected how traders actually operated: timely positions, clean P/L windows, visible compliance constraints, drift detection with risk-aware rebalancing, and a path to automation that respected liquidity, margin, and practical market microstructure. The systems needed to be conservative by default, traceable end-to-end, and easy to extend as strategies evolved.


Solution

Approach

I started with observation and shadow mode, spending full days on the desk to capture real workflows: morning run-ups, intraday hedges, and end-of-day cleanups. From those observations I carved the platform into three focused products that shared a common data spine. The Portfolio Manager became the daily cockpit for PMs—positions, exposures, P/L attribution, and mandate visibility presented as point-in-time truth with drill-downs by instrument, issuer, sleeve, or currency. The Options Allocator & Rebalancer became the decision engine—turning targets and budgets into suggested trades with no-trade bands, expiry windows, and delta/vega/gamma controls baked in. The Orc Trader integration unlocked production-grade quoting, hedging, and spreading by wrapping Orc’s text-based protocol in a robust Java client and exposing it to the house’s models and utilities.

How I arrived at the solution

Every feature earned its way in by matching what traders already did manually. We validated the allocator in shadow mode against intraday snapshots and fills until its suggestions matched trader intuition on slippage, margin deltas, and urgency under volatile tapes. We moved mandate checks from after-the-fact reporting into live dashboards where breaches and drifts surface immediately, complete with historical context and the why behind each alert. We replaced brittle Excel pivots with fast, reusable saved views and clean exports so PMs could run periodic reviews without reconstructing macros.

Tech stack

The core stack remained pragmatic and close to the metal: Python for analytics, reconciliation, and the Portfolio Manager; Java on Linux for latency-sensitive integration and the Orc bridge using JBoss Netty; Bloomberg Terminal and data interfaces where appropriate; and a small set of well-structured Python services for ingestion and event capture. Everything was designed to be deployable, monitorable, and auditable with minimal ceremony.

  • Languages & runtimes:

    • Python (analytics, reconciliation, portfolio UI logic),
    • Java with JBoss Netty (low-latency Orc bridge)
  • Trading stack:

    • Orc Trader (mass quoting, hedging, spreader),
    • Bloomberg Desktop API
    • Portware FX
  • Risk & optimization: Greeks/exposure engine; QP → discrete projection optimizer with hard/soft constraints; volatility-aware thresholds

  • Interfaces & delivery: CSV/Excel exports, saved views, scheduled summaries; lightweight dashboards for PMs


Architecture overview

At the heart of the platform is a clear separation between data capture, risk computation, and decisioning. Executions and prices are ingested and normalized into an event-sourced ledger, risk engines compute greeks and exposures by sleeve and bucket, and an optimizer translates targets and budgets into discrete trades under hard and soft constraints. Every step produces an “explain” artifact—inputs, parameters, and solver state—so PMs and risk can audit the chain without spelunking through code.

architecture_diagram_no_arrows.svg

Here are some useful architecture practices that helped me to ensure high quality and reliability of delivered solutions:

  • Event sourcing as source of truth: append-only ledger enabling replay, forensic audits, and point-in-time views
  • Clear separation of concerns: ingestion → canonical ledger → risk calc → allocator/optimizer → UI/reporting
  • Explainability by design: every decision emits explain artifacts (inputs, parameters, solver state, TCA) to an immutable audit log
  • Idempotent, schema-evolved ETL: safe reprocessing, versioned contracts, and checksum/row-count guards
  • Constraint-driven decisioning: portfolio, liquidity, margin, and mandate limits modeled as data (hard/soft), not hard-coded
  • Vol- and drift-aware control: no-trade bands, hysteresis, and expiry windows to reduce churn and slippage
  • Latency-aware integration: resilient Java/Netty socket client for Orc (heartbeats, reconnects, back-pressure handling)
  • Shadow-mode rollouts: validate against live snapshots/fills before enabling execution influence
  • Deterministic time handling: standardized and centralized trading calendars, cut-offs, and TZ normalization to UTC. This was a must due to multitude of timezones where various trading venues/exchanges were located
  • Failure isolation & observability: bounded queues, retries with jitter, circuit breakers, metrics/alerts around SLOs
  • Security & compliance: least-privilege creds for broker/data APIs; signed artifacts and tamper-evident audit trail

Considered alternatives

We evaluated rewriting the stack around a heavy event bus, a larger ORM-centric data warehouse, or adopting a commercial middle-office platform first and customizing around it. Those paths offered breadth but compromised control and velocity. By starting thin—Python services, an explicit ledger, targeted UI, and a clean Orc bridge—we shipped useful capability in weeks, not quarters, and preserved our option to add more infrastructure only where it paid for itself.

Challenges

The hardest problems were not purely technical. Traders tolerate small tracking error when liquidity is thin, then demand urgency when volatility spikes; those thresholds are tacit knowledge, not constants. We solved this with volatility-aware no-trade bands, expiry windows for options, and “good-enough” solutions that prefer small, frequent adjustments over dramatic end-of-day fire drills. Data reconciliation also demanded rigor: broker files and internal books do not always align, so we built explicit break workflows and made P/L attribution—price, carry, and FX—transparent at every roll-up


Portfolio Manager

The Portfolio Manager replaced a patchwork of spreadsheets with a single, reliable cockpit. Portfolio managers start with NAV, exposures, and attribution, then drill down by instrument, issuer, sector, currency, or strategy sleeve, all as point-in-time views with consistent P/L windows. Client mandates and compliance limits are not buried in PDFs—they are visible beside the book as traffic-light indicators with breach history, so drift and concentration risks surface early. Trade ingestion and reconciliation run continuously, aligning internal positions to broker reports and flagging breaks with clear, repeatable workflows. Saved views, CSV and Excel exports, and scheduled summaries turned periodic reviews from a reconstruction exercise into a routine.


Options Allocator and Rebalancer

The allocator turns targets and risk budgets into precise, executable plans across futures, listed options, and FX. It ingests live prices and vol surfaces, aggregates greeks and factor exposures by sleeve, detects drift, and proposes trades that minimize turnover and transaction costs. Currency overlays, futures rolls, and options-specific controls—delta neutrality with bucketed vega/gamma bands—are first-class. Pre-trade checks enforce portfolio, liquidity, and margin constraints; post-trade TCA closes the loop and feeds the next day’s bands. The engine earned trader confidence by running in shadow mode until its suggestions matched practical desk behavior on liquidity and urgency.


Orc Trader integration

To leverage a proven market-making stack without handcuffing proprietary models, I implemented a Java bridge to Orc Trader’s text-based socket protocol using JBoss Netty. That unlocked server-side mass quoting with market-maker protections, automated spreading, and policy-driven auto-hedging while keeping surfaces, quotes, and risk in sync. Traders could port custom volatility models and wing/SSVI parameters, drive quotes off house views, and run real-time greeks and stress alongside execution. The result was the best of both worlds: mature exchange-certified plumbing where it matters, and flexible in-house logic where the fund differentiates.


Conclusion

By meeting the desk where it worked and encoding its practical wisdom into software, we moved from brittle spreadsheets and ad-hoc scripts to an explainable platform that keeps portfolios aligned with mandates, reduces reconciliation friction, and turns targets into executable trade plans that respect liquidity and risk. The impact showed up in quieter closes, faster periodic reviews, and fewer surprises: mandate breaches surfaced during the day, not after it; allocator suggestions reduced end-of-day fire drills; and PMs spent more time on decisions and less time rebuilding pivots. Costs went down in the places that count—maintenance, key-man risk, and time lost to manual reconciliation—while the ability to add strategies and instruments went up because the architecture is modular and the reasoning behind every decision is preserved. For a boutique fund competing on clarity, speed, and discipline, that combination is exactly what software should deliver.