I build the systems behind portfolios and trades, and AI workflows with a check on every step.

Current engagement

Through Lost Mine Interactive, I’m designing and building a real-time position management system with agentic AI workflows for one of the fastest-growing wealth management firms in the US.

I’m Brian Barrecchia. I spent nine years at Bridgewater Associates, the last six as tech lead for portfolio construction and trade generation. I take on fixed-scope builds, AI agent workflows and part-time engineering leadership for funds, banks and fintech companies.

Selected work

Four results from my nine years at Bridgewater.

I moved a multi-billion-dollar swap book off spreadsheets.

I led my department’s side of a multi-year program that put a multi-billion-dollar interest rate swap book onto systematic trade generation across about 20 markets. I wrote about 70 percent of the code. The program systematized the whole special opportunities fund that held the swaps, for both centrally cleared and bilateral swaps, and it ran through the middle of the LIBOR-to-SOFR transition. It also covered unconventional markets such as Brazil, which counts interest on a 252-business-day year. Each market went live after cross-department testing, both integration tests and full trade-lifecycle tests. Those tests followed a trade from generation through execution and the back office into held positions, then on through secondary position management: maintaining duration exposure, rolling swaps near expiry into longer-dated ones, and packaging close-to-expiry swaps into a large net-zero book that was sold in the secondary market. Each market then had a go and no-go review with the business. Senior portfolio managers got back an estimated 20 hours or more a week, and a class of manual errors that I estimate had cost tens of millions of dollars over the years fell to almost nothing.

I proposed and delivered the firm’s market-data platform.

The platform holds more than 80 versioned data concepts across about ten asset classes and about 20 security types, including several kinds of bonds and swaps, equities, currencies and options. Each concept is promoted by its business owner, and any run can be reproduced as of a past date. I wrote the business case and the architecture, which the firm’s Architecture Council reviewed, and cut over one asset class at a time between 2021 and 2024. Market-data connectivity errors fell by about 95 percent, adding a new data feed went from several days of development and testing to a few hours, and tens of older systems were retired without a big-bang cutover.

About 50 developers still use my regression application to prove a change safe.

On every pull request the test platform runs the full application graph in two environments, and my application compares what comes out, down to business-level totals, across more than ten systems. A developer adds a check in a few lines over the domain model, and any table or diagnostic file a run touches without a declared check is compared row by row, so coverage cannot fall behind. Portfolio managers and portfolio operations use it too, running experiments to confirm that a change to portfolio configuration, weights or tranches produces the outcome they intend. It remains a core part of the firm’s change and release process, and it gates the pre-release run and the overnight canary.

I took the trading day from an 11pm hard stop to around the clock.

Timelines were tight enough that any delay in the day’s process snowballed, and when trades for Asian markets went out late the firm entered the market late and lost liquidity. A nightly archive that ran for ten hours forced the business to finish its runs by 11pm, and I rebuilt it to finish in about an hour and a half. A metrics job ran for about 45 minutes after every run that generated the firm’s trades, and the waiting cost the operations team more than two hours a day. I rebuilt it to finish in under ten minutes. I then rewrote the operations team’s workflow so the firm could generate trades around the clock between the US and Singapore, which went live around 2024. The business could then split portfolio and trade generation between the regions, which roughly halved the risk of late delivery.

Approach

I approach a complex problem by first understanding what the business is trying to achieve, and by challenging the assumptions that made sense years ago and no longer hold. Then I work with the decision makers to streamline the process and settle what the systems need to look like. I reimagine and re-architect the applications, data flows and processes the business depends on, build them new, and get them into production safely, bringing the business users and stakeholders along while the business keeps running.

I deliver large-scale projects incrementally because business needs continue to evolve throughout development. At every stage, I reassess the work against the business’s current priorities rather than blindly executing a plan established a year earlier.

My approach and design evolve alongside the business. Each increment is reviewed and agreed upon with stakeholders, and when circumstances change, I revisit earlier decisions and adjust course without hesitation.

That isn’t scope creep; it’s deliberate, controlled evolution. Continuous alignment with the business ensures I deliver what it actually needs, not simply what it originally asked for.

When a new system takes over from one already in production, I build it beside the old one, prove that its outputs match wherever the behavior is meant to carry over, and keep supplying the old system’s consumers until each one has moved. Then I cut over one market or one asset class at a time, each with sign-off from the business and a burn-in period. Tens of older systems at Bridgewater were retired this way.

A rule that depends on someone remembering it eventually gets skipped, so the proof runs in the pipeline and an untested step does not go out. Late one night during a swap market cutover, another team wanted to roll forward with a production fix that had not been through testing. I stopped the cutover, and my leadership and the business backed the call.

Businesses build their processes around the tools they already have, and after a few years nobody can tell which steps the business needs and which exist only because a system was slow. I start with how the business wants the work to run and choose the technology after that.

Services

I work on a fixed-scope or part-time basis.

Investment decisions stay with the client. Lost Mine Interactive builds and runs the systems that carry them out, and it does not manage money or give investment advice.

Every service, with the engagement catalog and fees

About

Brian Barrecchia

I have 16 years of experience in software engineering, most of it on investment systems. At Bridgewater Associates I was a Senior Site Reliability Engineer from 2016 to 2019, Tech Lead for Trade Generation Development from 2019 to 2021, and Tech Lead for Portfolio & Trade Generation Engineering from 2021 to 2025, leading teams of five to seven engineers across Connecticut, Silicon Valley and Redmond. Before that I was a quantitative developer at UBS Hedge Fund Solutions, a multi-manager fund with about $40 billion under management, where I built the P&L and risk application most of its portfolio managers used, with a hypothetical portfolio builder and back-tester. I started at Atlas Air, the cargo carrier with the world’s largest fleet of 747 freighters, where I moved from the operations desk into its business intelligence team. Lost Mine Interactive LLC is my company. Beyond the work above, my Bridgewater years included the following.

  • Designed a staged ingestion pipeline for position and trade data from the firm’s China entity, under complex Chinese regulatory constraints that carry severe legal consequences for moving company data out of the country if it is not done correctly. The upload is write-only, every file is scanned for malware before anything can read it, and its schema is validated on remote Azure servers, so no internal system touches any part of a file until it is known to be a plain CSV matching the exact schema expected. Each step is staged in its own short-lived container, in a more internal network zone than the last.
  • Rebuilt the held-position store, which reconstructs the firm’s current positions on demand and in real time: it starts from the book of records’ positions as of three days earlier, then layers on the positions booked since and the pending trades, so the integrity checks run against accurate positions all day. I also rewrote and owned the service that keeps the internal security master current from the order management system’s event stream, across equities, bonds, futures and swaps.
  • Built the valuation engine for about 80,000 interest rate swap contracts priced twice a day. It values one representative contract for each distinct shape and imputes the duration to all the others, which cut the work by four to five times and took about 45 minutes off the daily pricing window.
  • Was one of five tech leads in a CIO-sponsored modernization, five to six years of work across about 100 people, that moved the department to containerized services on Kubernetes, infrastructure as code and weekly releases gated on green pipelines. Its ephemeral test environments let the business move its daily test runs off production.
  • Was one of about 15 people in the firm’s pilot of an AI coding assistant, and then rolled it out to my team. My view has not changed since: these tools are leverage for engineers who already understand the architecture and can judge what comes back, and a hazard for anyone winging code they do not understand. I use them every day and ship on the Anthropic and OpenAI APIs in products I run in production, with the safety built into the mechanism rather than the policy, including a four-layer, fail-closed content safety pipeline. Operationalized responsibly, they accelerate the work without betting the business on a tool whose price or behavior could change next quarter.

How it is built

The projects below are Lost Mine Interactive’s own work, and the same methods apply to client builds.

replay-parity. replay-parity is a harness that proves a replacement system behaves like the system it replaces on real traffic. It records traffic against the existing system, replays it against the replacement, and compares every response under diff rules kept as data. The replacement passes only if it meets the correctness and latency gates. It is the idea behind my regression application at Bridgewater, generalized to any two systems. It is published as open source and documented against an order management system migration.

A safety pipeline that fails closed. LetterGames lets children type anything and see it drawn, so every prompt passes four checks, ordered from the cheapest to the most expensive: a local word list tuned against evasion, a free moderation service, a small reasoning model that judges intent, and the image provider’s own filter. A timeout, an error or an unreadable verdict at any layer rejects the request, so an outage never becomes the easy way through.

Agents with written limits. I built radiofreq with AI agents under a written brief, numbered rules on what an agent may read or touch, and a log of each decision. In the product, the assistant turns a sentence into validated edits of a favorites list and has no tool that reaches the radio, and the person sees a diff of every file before anything is written. Two of its architecture write-ups are republished here: the dispatch pipeline and the control plane.

A side-by-side diff of a favorites list file, with changed coordinates highlighted character by character
The diff radiofreq shows before it writes anything to the radio.

Method

Development is agent-assisted, and tests are the feedback loop that decides when a change is finished. Every deliverable is handed off with a named owner. Documentation is written for the person who inherits the system.

Model governance and platform readiness checklist

The checklist sets out the questions that examiners and institutional operational due diligence teams ask about models, data, production systems, change control, continuity, vendors, cyber controls and AI workflows. It is free to read and to download.

Products

Lost Mine Interactive also builds and runs its own software: radiofreq, LetterGames, everyfish, Spy Catcher and swarm-review.

See the products

Contact

To arrange a readiness assessment or discuss a build, write to [email protected] or call 860-217-5700. My record is on LinkedIn.