An operations stack for a systematic multi-asset fund, in Python with its own FIX 4.4 engine: portfolio-to-orders, the FIX order lifecycle, a live monitor with a fault-injection harness, SQL reconciliation, a corporate-actions engine, exchange and contract calendars, and transaction-cost analysis with a broker wheel. Systemd units and a runbook cover deployment on Linux. Brokers and fills are simulated; prices and corporate actions are twenty years of real daily data.
The question: what has to be checked before, during and after the trading day for the book to be right, how fast does a monitor catch what goes wrong, and what does execution cost?
- Monitor. Over 28 fault days, 454 of 462 injected faults were caught, with a median time to detect of 0.6 s. On the 28 clean days it raised 0.9 alerts a day. The fault that is not the monitor's job (a fill missing from the drop copy) is found by the end-of-day reconciliation.
- Reconciliation. 1,775,514 fills were reconciled three ways (blotter, broker drop copy, prime-broker file) and against positions in SQL. All 608 of 608 seeded breaks were found and classified, with 0 unexplained.
- Corporate actions. The engine matches Yahoo's dividend adjustment on 10,672 of 10,675 dividends (median relative error 1.2·10⁻⁷). For London names Yahoo adjusts pence prices with the dividend read in pounds, a factor of 100, which the check finds on all 973 LSE dividends. Splits, spin-offs, cash mergers and renames are applied to positions and open orders.
- Calendars. The NYSE calendar matches the 4,958 trading days in the data exactly, and the LSE calendar matches 4,981 with two vendor discrepancies. Futures first-notice and last-trading days, IMM and CDX rolls, option expiries and SIFMA TBA classes are checked against published dates.
- Execution cost. Over 5,519 executed orders ($36.4bn) implementation shortfall is 14.1 bp of the decision price: delay 2.2, execution 10.6, opportunity 0.9, fees 0.5. The broker wheel ranks the three simulated brokers in their true order when each algorithm is judged against its own benchmark (BRK3 costs 6.4 bp more than BRK1, CI [+4.0, +9.1]). Against a single VWAP benchmark it cannot, and 1,589 orders per broker would be needed to resolve 2 bp.
| fault | injected | caught | median time to detect |
|---|---|---|---|
| dup_fill | 52 | 52 | 0.6 s |
| drop_ack | 50 | 50 | 15 s |
| stuck | 47 | 42 | 24 min |
| silent_session | 28 | 28 | 60 s |
All numbers are in results/summary.md; the detail is in docs/method.md.
- Portfolio to orders. Three strategies on $2bn are netted with internal crossing, then lot-rounded, checked against restricted lists and locates, capped by ADV, and given an algorithm by size and urgency.
- FIX 4.4. A session layer with sequence numbers, resend, gap fill and persistence, plus a buy-side order state machine with an explicit transition table. It runs over TCP and on a virtual clock.
- Monitor. Seventeen rules evaluated every 15 s, scored against planted faults. Clean days measure false alerts.
- Reconciliation and TCA. Three-way reconciliation in SQL with a break taxonomy. TCA uses the Perold decomposition, which is exact by construction, and a wheel with bootstrap and power analysis.
- Corporate actions and calendars. Adjustment factors in the Yahoo convention, applied to positions and orders and checked against the vendor.
- Brokers, fills and the prime broker are simulated, so cost levels are stylised. The monitor, reconciliation and corporate-action results do not depend on that.
- Detection depends on thresholds. A stuck order on a small name is only visible once the schedule has expected a few percent of it.
- This is a Python FIX engine, not QuickFIX, and has not been certified against a broker.
- Vendor data is reported, not corrected: the LSE unit error and a dozen calendar disagreements stay in the store.
pip install numpy pandas pyarrow duckdb matplotlib pytest
scripts/run_all.sh --skip-download # about fifteen minutes; --quick runs four days
On Linux, copy deploy/*.service and *.timer to /etc/systemd/system and run systemctl enable --now xops-sod.timer xops-day.timer xops-eod.timer; deploy/RUNBOOK.md covers every alert and break. CI runs the 26 tests, the calendar and corporate-action checks and a four-day pipeline.

