Skip to main content
Finance2020Senior Software Architect

Real-Time Trade Settlement Engine

Low-latency settlement and reconciliation platform processing equities and fixed-income trades with T+1 regulatory compliance and intraday risk controls.

Overview

The broker-dealer's settlement operations relied on an overnight batch pipeline that left intraday positions opaque and delayed exception resolution until the next business day. Regulatory shifts toward T+1 settlement compressed already tight processing windows and exposed manual reconciliation bottlenecks. I architected an event-sourced settlement domain that processes trade events in near real time, applies netting rules incrementally, and surfaces breaks to operations dashboards within minutes. Legacy SSIS ETL jobs were retained for regulatory reporting but fed from the new canonical trade store rather than source silos.

Business Problem

Settlement failures averaged 340 exceptions per day, each requiring 20 minutes of manual investigation across three systems. Intraday risk exposure was calculated from stale position snapshots, understating counterparty concentration by up to 12% during volatile sessions. FINRA reporting deadlines created quarterly fire drills when batch jobs missed cutoffs due to upstream feed delays. Operations headcount could not scale linearly with trade volume growth projected at 25% annually.

Solution

Trade capture feeds via FIX and internal OMS APIs publish normalized trade events to Azure Event Hubs with deterministic partitioning by instrument and counterparty. Settlement aggregates apply netting and allocation rules in .NET domain services, persisting state transitions to SQL Server with optimistic concurrency. A reconciliation microservice compares nostro statements against expected cash movements, flagging breaks with root-cause classification. Regulatory ETL pipelines extract from the canonical store on schedule, eliminating duplicate transformation logic across reporting streams.

Architecture

The engine uses event sourcing for the trade lifecycle, with snapshots every 500 events to bound replay time for aggregate reconstruction. CQRS separates the write model from read-optimized position and exception dashboards backed by indexed views and Redis caches for hot counterparty lookups. Azure Functions handle scheduled nostro file ingestion and dead-letter reprocessing. Network segmentation isolates the settlement cluster from front-office systems, with all cross-zone traffic passing through audited API gateways.

Tech Stack

.NET Core 3.1SQL ServerAzure Event HubsAzure FunctionsRedisSSISPower BIFIX Protocol

Challenges

  • FIX message variant handling across counterparties required a pluggable normalization layer with versioned mapping configurations deployed independently of core services.
  • Optimistic concurrency conflicts spiked during market close; we introduced aggregate-level locking hints and retry policies with exponential backoff.
  • Migrating historical trade data into the event store without downtime required parallel write paths validated by checksum reconciliation over 90 days.
  • Regulatory reports depended on legacy field formats; adapter layers projected canonical events into SSIS-compatible staging schemas.

Results

  • Reduced daily settlement exceptions from 340 to 52 within four months of production rollout.
  • Achieved intraday position accuracy within 0.3% of end-of-day reconciliations during pilot trading sessions.
  • Eliminated quarterly FINRA reporting fire drills by decoupling regulatory ETL from batch settlement cutoffs.
  • Decreased mean exception resolution time from 20 minutes to 4 minutes via automated root-cause tagging.

Screenshots

Key interfaces and system views from the engagement.

Real-Time Trade Settlement Engine screenshot 1
Real-Time Trade Settlement Engine screenshot 2
Real-Time Trade Settlement Engine screenshot 3

Lessons Learned

  • In financial domains, auditability beats raw speed—every state transition needs a human-readable explanation for operations and regulators.
  • Event sourcing pays off when business rules change retroactively; replay from historical events avoided costly backfill migrations.
  • Keep batch and streaming paths reading from one canonical store; dual sources of truth recreate the reconciliation problems you are solving.
  • Operations buy-in requires dashboards that match their mental model, not just technically correct data models.

Related Projects

Additional work in adjacent domains and technology stacks.

Enterprise
Principal Software Architect2024

Enterprise Order Management Platform

Modular .NET order orchestration platform replacing a legacy monolith with bounded contexts, event-driven workflows, and multi-region deployment.

.NET 8Azure Kubernetes ServiceAzure Service BusKafka
View Case Study
Healthcare
Lead Software Architect2021

HIPAA Clinical Data Exchange Hub

FHIR-native interoperability platform enabling secure clinical data exchange between hospitals, payers, and specialty networks with full audit trails.

.NET Core 6Azure API ManagementAzure Service BusSQL Server
View Case Study
Blockchain
Blockchain Solutions Architect2022

Enterprise Supply Chain Blockchain Network

Permissioned blockchain network for multi-party supply chain provenance, smart contract escrow, and auditable handoff records across manufacturers and logistics providers.

Hyperledger Fabric 2.5Node.js.NET 6IPFS
View Case Study