Zero Errors in Four Months: How Jedi Hill Built an Agentic AI System for Sigma Trading's Daily Swap Rate Operations
Sigma Trading Management provides trading operations services to online brokers running on MetaTrader 4 and 5. Every trading day, Sigma has to collect overnight financing rates ("swaps") from multiple liquidity providers, convert and mark them up correctly, and publish them to client platforms before a deadline that doesn't move. Jedi Hill built an agentic AI system, running on Amazon Bedrock, that has automated this process in production for the past four months — with zero incorrect rates published.
The Challenge
A swap rate is the overnight interest charged or paid on a trading position held past rollover. Every broker Sigma serves works with its own set of liquidity providers (LPs), and every LP sends its daily rate file in a different format. A single provider file can carry around 150 instruments, each with two values — one for each side of the position (long and short). All of it has to be processed and published before the daily rollover deadline.
Handled manually, this process carried three real risks:
A P&L leak. A single wrong rate hits every overnight position on that symbol, and keeps charging incorrectly every night until someone notices.
A conduct exposure. If a client is charged a rate nobody approved, that's a regulatory conversation, not an operations slip.
An open arbitrage channel. If the long and short rates for a symbol sum to a positive number, a client can hold both sides at once and collect money risk-free — a loophole that looks like normal trading unless someone is watching for it.
With hundreds of numbers to process every trading day under time pressure, comprehensive manual review was effectively impossible.
The Solution: A Narrowly-Scoped Agentic System on AWS Bedrock
Jedi Hill designed the system around one governing principle: no model computes a number a client sees, and no model is taken at its word.
The system runs three agents, each deliberately restricted to the minimum it needs to do:
The Orchestrator holds session state and decides what happens next — it has no opinion about any number.
The Extraction Agent meets each incoming LP file, writes a purpose-built parsing script for that provider's format, runs it inside an isolated Amazon Bedrock Code Interpreter sandbox, and hands back nothing but raw extracted values.
The Cross-Check Agent independently re-reads the original source file from scratch — not the first agent's output — and produces one of two results: agree, or stop. Any disagreement halts the batch for human review.
Everything below this "trust boundary" is deterministic Python: unit conversion, digit precision, markup application, and five validation gates — sanity, calculation, arbitrage, historical consistency, and the AI cross-check itself. A rate can only be released when all five gates pass and a named human approver signs off. The system has no authority to publish on its own.
Architecture: the full stack runs inside an isolated VPC across two AWS regions. Route 53, CloudFront, and S3 serve the front end; Amazon Cognito handles authentication; an Application Load Balancer routes to three Amazon ECS Fargate services (core backend, engine API, engine worker); Amazon RDS for PostgreSQL and Aurora PostgreSQL store operational state, rate versions, and approval records; Amazon SES, SNS, and SQS handle notifications; and Amazon Bedrock, accessed from a separate region, hosts the Claude models along with Bedrock Code Interpreter and the AWS Strands Agents SDK runtime. The trading database that holds the source-of-truth data is accessed read-only — there is no write path from any AI component back into it.

Figure: High-level view of the system — Bedrock, Code Interpreter, and the Strands Agents SDK sit above the trust boundary; a pure-Python deterministic engine, S3, and Aurora PostgreSQL sit below it.

Figure: Full production architecture — VPC-isolated ECS Fargate services, RDS PostgreSQL, and a cross-region connection to Amazon Bedrock and Bedrock AgentCore.
Model Selection Was an Evaluation Result, Not a Default
Rather than defaulting to the largest available model, Jedi Hill ran a systematic evaluation of model options against this specific workload. The result: a smaller, faster model delivering roughly 3x lower cost and 2x faster response times, at equivalent accuracy to the larger alternative.
Results — Four Months in Production
All of the following figures come from Sigma's live production system, not a projection:
6,000+ LP swap files processed since go-live
1,000+ symbol rates checked per production run
5,000+ versioned, approval-tracked rate sets published
Processing time per LP file cut from ~30 minutes to under 5 minutes
4 pricing errors caught per week before publication — errors that would previously have gone live
Zero incorrect rates published since go-live
Designed for a Regulatory Audience
The system was built to satisfy Singapore's MAS FEAT principles (Fairness, Ethics, Accountability, Transparency) as operating controls, not slideware:
Fairness — the system only ever handles symbols and rates; markup is a disclosed commercial term applied identically by code for every client on a symbol, with no model involvement.
Ethics — the AI is locked outside the decision path: it reads, but it does not calculate, approve, or publish.
Accountability — every published rate carries a named approver and a version number; the trading database is read-only, so nothing in the system can write back to the source of truth.
Transparency — every published number, including the extraction script the model wrote to produce it, can be re-derived and inspected after the fact.
Lessons Learned
Design for the minimum an agent needs to do, not the maximum it could do. The orchestrator decides sequence, never values; the extraction agent only extracts; the cross-check agent only agrees or stops.
Don't trust a single model's read of a document. An independent second model re-reading the original source — not the first model's output — catches extraction errors before they reach a person, let alone a client.
Sandbox AI-generated code rather than running it directly. Each LP's parsing script is generated and executed inside an isolated Bedrock Code Interpreter environment, with every version retained — giving both operational flexibility and a full audit trail for the step regulators care about most.
Build validation gates around the business's actual failure modes, not generic data-quality checks — the arbitrage gate exists specifically because of how swap rates can be exploited, not as a boilerplate check.
Be precise about what's production and what isn't. A related arbitrage-detection module remains in design validation using test data; only the swap rate operations module described here is backed by production figures, and that distinction is kept explicit rather than blurred for effect.
About Jedi Hill
Jedi Hill is an AWS Advanced Tier Partner based in Sydney, specializing in generative AI and agentic AI systems for regulated, high-stakes financial workloads — designed, deployed, and operated in production on AWS.
Working with high-volume, multi-source financial data processes? Contact Jedi Hill to learn more.



Comments