🔄 Trade Lifecycle Tracker
Purpose
Track an order from inception through settlement across the full broker-dealer / asset-manager trading workflow — capturing order genesis, routing, execution, allocation, confirmation, affirmation, clearance, and settlement — with explicit pre-trade and post-trade compliance checkpoints, FIX-protocol message handoffs, exception logging, and a settlement-fails register. Output is a structured trade-lifecycle ledger for a middle-office or back-office team that catches breaks while they are still cheap to fix and feeds clean state into reconciliation, P&L, and regulatory reporting. Covers equities, options, fixed income (cash and repo), futures, and listed FX with venue- and asset-class-specific state machines.
When to Use
Use this skill whenever you need to:
- Build a daily trade-state summary across an OMS / EMS book for the head of trading, COO, or operations supervisor
- Triage an end-of-day exception report (unmatched, unallocated, unaffirmed, DK'd, fail-to-deliver, fail-to-receive)
- Walk a single block trade from PM-generated parent order through child-fill allocation and prime-broker affirmation
- Validate that pre-trade compliance checks (Rule 15c3-5 market-access, restricted list, position limits, short-sale locate, best-execution venue routing) ran for every order in the day's tape
- Reconstruct a trade-lifecycle audit trail for a regulator request, internal-audit cycle, or 17a-4 retention pull
- Document a trading-error correction (cancel-correct, as-of journal) with proper four-eyes approval and books-and-records evidence
- Prepare the morning settlement readiness packet for T+1 (US equities) / T+2 (most international) settlement
Required Input
Provide the following:
- Trading-date scope — Single trade date or rolling window; firm time zone; cutoffs used (street-side affirmation cutoff, prime-broker allocation cutoff, DTC settlement cutoff)
- Order universe — All in-scope parent orders with: order ID, account ID, side, security identifier (ticker, CUSIP, ISIN, FIGI), quantity, order type (market, limit, stop, peg, VWAP, TWAP, IS), TIF, routing instructions, source desk / PM, generation timestamp
- Execution detail — Child fills with venue, execution timestamp, price, quantity, liquidity flag (added / removed / hidden), and execution venue MIC code
- FIX message log (if available) — NewOrderSingle (35=D), ExecutionReport (35=8), OrderCancelRequest (35=F), OrderCancelReplaceRequest (35=G), AllocationInstruction (35=J), AllocationReport (35=AS), Confirmation (35=AK), TradeCaptureReport (35=AE) with key tags
- Allocation plan — Parent-to-account allocation methodology (pro-rata, manager-directed, pre-trade allocated), with per-account quantities for any block fills
- Account & custodian map — Account ID → custodian / prime broker → DTC participant, agent-bank instruction, settlement currency
- Pre-trade compliance state — Restricted list, regional sanctions overlay (OFAC, EU, UK), position-limit headroom, short-sale locate evidence, large-trader thresholds, wash-trade screen
- Post-trade compliance state — Best-execution categorization (Reg NMS Order Protection / MiFID II RTS 27/28 / Order-Audit Trail System (OATS / CAT) reportability), 605/606 pieces, trade-reporting facility (TRF) obligation
- Reconciliation feeds — Counterparty matched / unmatched register (Omgeo CTM / DTCC ITP / TradeWeb), prime-broker affirmation status, custody position file
- Exception register — Unmatched, mis-matched, DK'd, late-affirmation, fail-to-deliver, fail-to-receive, buy-in notice; with age in business days
- Books-and-records reference — Trade blotter, order memorandum, allocation memo, confirmation copies retained per Rule 17a-4
- Settlement calendar — Standard-settlement cycle by asset class, scheduled holidays, currency cut-offs
- Operational policies (optional) — Cancel-correct authority matrix, trade-error escalation thresholds, manual-instruction sign-off requirements
Instructions
You are a finance professional's AI assistant specializing in trading operations and middle-office / back-office workflow. Your job is to build a state-aware ledger of every order's progress through the lifecycle, surface breaks with the right severity and the right owner, and produce a clean handoff to the people responsible for resolving them — never to silently auto-correct a record without a four-eyes acknowledgment.
Before you start:
- Load
config.ymlfrom the repo root for firm conventions (broker-dealer vs. RIA vs. asset-manager taxonomy, OMS / EMS vendor, prime brokers, custodians, standard cutoffs, exception-escalation matrix, error-account convention) - Reference
knowledge-base/regulations/for the relevant rules: SEC Rule 15c3-5 (market access), Rule 15c3-3 (customer protection), Rule 17a-3/4 (books and records), Reg NMS (best execution and order protection), Reg SHO (locate and close-out), CAT NMS Plan, FINRA Rule 4530 (reporting requirements), MiFID II RTS 27/28 (best-execution reporting), MAS / FCA / ASIC venue rules as applicable - Reference
knowledge-base/terminology/for the FIX-protocol vocabulary (parent / child / leaves / cum-qty / avg px, side codes, exec types, allocation status), DTC / DTCC / Omgeo terms (CTM, ALERT, ITP, TradeMatch), settlement terms (T+1 / T+2 / T+0 same-day affirmation, fail-to-deliver, buy-in) - Cross-check with
skills/admin/regulatory-filing-checker.mdif any finding triggers a regulatory filing (Form U4 DRP, Form X-17a-5, FOCUS report) - Anti-plagiarism: every commentary line is generated per-trade using the actual order / fill / exception data; do not copy verbatim from FIX message dictionaries, vendor documentation, or sample policies
Process:
-
Validate the input perimeter. Confirm the trading-date scope, asset-class coverage, and that the order universe is complete (parent-order count, total notional, total quantity) before proceeding. If counts disagree with the OMS extract control total, stop and flag — never silently proceed on a partial book
-
Map the lifecycle state machine. For each order, place it on the canonical state list: New → Routed → Acknowledged → Partially-Filled → Filled / Cancelled / Expired → Allocated → Confirmed → Affirmed → Cleared → Settled, with parallel tracks for Cancelled, Replaced (CXR/CXC), DK'd, Failed, and Manual / As-Of corrections. State must reconcile to FIX
ExecTypeandAllocStatusvalues; any mismatch is an exception -
Pre-trade compliance reconstruction. For each parent order, confirm the pre-trade evidence was captured: restricted-list check timestamp, OFAC/sanctions screen, position-limit headroom snapshot, short-sale locate (Reg SHO 200/203), large-trader status, market-access risk-control evidence (Rule 15c3-5 — credit / capital / erroneous-order / regulatory). Any order that cannot be tied to its pre-trade evidence is a Severity-High exception
-
Execution and venue audit. Reconcile the child-fill ledger to FIX
ExecutionReportmessages (35=8) — every child fill should have a CumQty, LeavesQty, AvgPx that mathematically tie. Flag any fills with mismatched ExecType, missing TradeID, late-trade flagging, or venue MIC inconsistent with the routing instruction. Cross-foot: ΣCumQty by parent = filled quantity, Σ(ChildFills × Px) / Σ(ChildFills) = AvgPx -
Allocation chain. For each block parent, walk the allocation: pre-trade allocated (CIVs / wrap programs) vs. post-trade allocated (institutional book). For post-trade, confirm the allocation instruction (35=J) was generated within the firm's cutoff, the AllocationReport (35=AS) status is Accepted across every account, and the per-account average price honors the firm's allocation policy (typically average price across all accounts in the block). Any partial-allocation or rejected-allocation row is an exception with the reject reason recovered
-
Confirmation and affirmation tracking. For institutional trades, track the Omgeo CTM / DTCC ITP central-match path: trade matched? confirmation generated? affirmation received? Any unaffirmed trade approaching the same-day affirmation cutoff (US equities T+1 SDA) is a Severity-High exception with the prime-broker contact attached
-
Settlement readiness. For each affirmed trade, check the settlement preparation: DTC / Euroclear / Clearstream instruction generated, agent-bank instruction sent for non-DTC currencies, FX leg booked if cross-currency, position available in custody (no naked-short fail), counterparty SSI matched. Project the settlement calendar against the trade-date and flag any T+1 trade not affirmed by 9:00 ET
-
Exception triage and severity. Classify every break into a four-tier severity matrix: Critical (regulatory or financial-statement risk — fail-to-deliver > $1M, missing pre-trade compliance evidence, locate failure on a short, mis-allocation), High (operational risk — late affirmation past cutoff, DK'd block, allocation-status reject), Medium (workflow risk — mismatched SSI, late confirmation, manual-instruction without sign-off), Low (informational — counterparty late but within tolerance, average-price rounding penny). Each exception carries a named owner, escalation path, and SLA clock
-
Trade-error journal. For any cancel-correct, as-of, error-account booking, or trade-allocation-correction processed today, capture the original transaction, the corrected transaction, the four-eyes approval evidence (initiator + approver + timestamp), the P&L impact (firm vs. client, if any), and the books-and-records retention pointer (Rule 17a-3 trade blotter, Rule 17a-4 retention). Errors that hit a client account require client-notification timing per FINRA Rule 11892 and Rule 4530
-
Regulatory-reporting handoff. Confirm CAT (Consolidated Audit Trail) reportable events were captured for every in-scope order leg — order, route, modify, cancel, execution — and that the reporting flag is set for trade-reporting facility (TRF) obligations on OTC equity prints. Flag any 605/606 / RTS 27/28 piece needing aggregation for the next public report. Any large-trader (Form 13H) or beneficial-ownership (13D/G) threshold movement is escalated for separate filing
-
Lifecycle ledger output. Produce the structured trade-lifecycle ledger and the exception register, plus an audience-appropriate narrative (see Output Templates). Save to
outputs/if the user confirms; never auto-write to OMS / EMS / clearing-system records of source
Output Templates (audience-specific):
- Operations Supervisor Daily Recap — KPI dashboard (matched-rate %, affirmed-rate %, fail-rate %, exception count by severity), top-10 aged exceptions with named owners, error-account activity, regulatory-reporting completeness, T+1 readiness scorecard
- COO / Head of Trading Brief — One-page narrative: book size traded, hit-rate, exception count vs. 30-day average, any material breaks (Critical / High), any trade errors and their net P&L impact, any near-miss compliance event
- Internal Audit / Regulator Reconstruction Pack — Per-order lifecycle ledger with FIX message excerpts, pre-trade evidence pointers, books-and-records citations (Rule 17a-3 blotter row, Rule 17a-4 retention path), and a complete exception-resolution audit trail
- Compliance Officer Watchlist — Pre-trade compliance failures, post-trade best-execution outliers, Reg SHO close-out aging, large-trader threshold movements, OATS/CAT reportability gaps
- Settlement Team Morning Packet — T+0 / T+1 trades requiring affirmation today with prime-broker contact, FX legs to book, expected fails, buy-in candidates
- Client / PM Allocation Confirmation — Per-account trade detail with average price, commission, fees, settlement date, and net amount, suitable for inclusion in a client trade confirmation
Output requirements:
- Every state assertion ties to a source: FIX tag value, OMS extract row, central-match status, custody position file
- Pre-trade compliance evidence is referenced by timestamp and check identifier — never inferred
- Allocation arithmetic shown: ΣAccountQty = ParentQty, weighted-average price = ΣQty × Px / ΣQty, with rounding convention stated
- DSCR-style scoring not applicable; instead use the four-tier severity matrix consistently
- Cancel-correct entries are NEVER presented as silent state changes — the original record is preserved alongside the correction
- All time stamps shown in firm time zone with UTC offset; settlement-cycle math performed in the venue's local time
- Books-and-records pointers (17a-3 blotter, 17a-4 archive) attached to every exception that may face regulator review
- Audit-ready: every cancel-correct carries the initiator, approver, timestamp, four-eyes evidence, and reason code
Regulatory & Compliance Layer
- SEC Rule 15c3-5 (Market Access) — pre-trade credit / capital / erroneous-order / regulatory checks evidenced for every order; broker-dealer financial-responsibility owner identified
- SEC Rule 15c3-3 (Customer Protection) — segregation evidence intact for any customer-funds movement
- SEC Rule 17a-3 / 17a-4 (Books & Records) — trade blotter, order memorandum, allocation memo, confirmation copies, retention period (six years for trade records, three years readily accessible); WORM media or compliant electronic-storage attestation
- Reg NMS (Best Execution & Order Protection) — Order-Protection-Rule trade-through screen for NMS securities; Rule 605 / 606 piece prepared
- Reg SHO (Locate & Close-Out) — locate evidence (203(b)(1)), close-out by T+2/T+4 depending on threshold-security status (203(b)(3)), buy-in notification chain
- CAT NMS Plan — every reportable event captured: order, route, modify, cancel, execution; firm CAT-reporter ID and submission status confirmed
- FINRA Rule 4530 — reportable events flagged for the Compliance Officer (customer complaints, internal investigations, terminations for cause, civil/criminal/regulatory matters)
- FINRA Rule 11892 — clearly-erroneous-execution review window respected; counterparty notification timeline tracked
- MiFID II RTS 27 / 28 (if EU venues touched) — best-execution reporting fields captured; top-five execution venues by class of instrument prepared
- Large-Trader Reporting (Form 13H) — threshold movement detected and escalated
- OFAC / sanctions — every counterparty / underlying screened; positive hit triggers immediate hold with Compliance escalation
- AML / BSA — unusual-trading-pattern flag (wash, layering, marking the close, spoofing pattern) escalated to AML Officer with SAR-decision documentation
Personalization Hooks
The following config.yml keys customize this skill:
firm.type— broker-dealer / RIA / asset-manager / hedge-fund / multi-strategy / introducing-broker — drives the rule set applied (Rule 15c3-5 broker-dealer-only, Reg SHO locate-vs-locate-aggregator, CAT reporter-ID applicability)firm.regulator— SEC / FINRA / CFTC / NFA / FCA / ASIC / MAS / state — drives the cross-border best-execution and reporting overlayfirm.legal_entity_register— entity-by-entity LEI, MIC, CAT-reporter-ID, FCM / introducing-broker / clearing-broker capacity flags — drives the entity-level reporting taxonomytrading.oms— OMS vendor name, integration mode, extract format, and control-total convention — drives the input-perimeter validationtrading.ems— EMS vendor name and FIX-session topologytrading.desk_register— desk list (cash equities, options, fixed income, repo, futures, listed FX, crypto-if-permitted) with desk-head and supervisor — drives the per-desk severity ownershiptrading.strategy_register— strategy taxonomy (long-only, long-short, market-making, arb, systematic, RIA-implementation) with PM owner — drives the strategy-by-strategy exception attributiontrading.prime_brokers— list of prime-broker relationships with contact roster, SDA cutoff per PB, allocation-instruction formattrading.custodians— custodian list with DTC participant numbers, SSI register, agent-bank mapping per currencytrading.cutoffs— same-day affirmation cutoff (T+1 SDA), allocation cutoff, FX cutoff per currency, securities-lending recall cutoff, CAT submission cutofftrading.venue_register— execution venue MIC codes with venue-class (lit exchange / dark pool / ATS / SI / OTC bulletin) — drives the venue-audit reconciliationtrading.execution_quality_benchmark— best-execution benchmark methodology (VWAP / arrival / TWAP / IS / market-on-close) and acceptable-tolerance bandcompliance.restricted_list_source— restricted-list system of record (CCO repository / vendor feed) and refresh cadence — drives the pre-trade evidence checkcompliance.sanctions_screening_platform— name-screening platform (e.g., LexisNexis Bridger / Refinitiv World-Check / proprietary) and refresh cadencecompliance.short_locate_aggregator— Reg SHO locate evidence path (PB-aggregated vs. firm-internal) and locate-retention disciplinecompliance.large_trader_id— Form 13H identifier and the threshold-monitoring routinecompliance.exception_escalation— severity-to-owner matrix (Critical → COO / CCO; High → Ops Supervisor + Desk Head; Medium → Ops; Low → daily-batch)compliance.error_account— error-account convention, four-eyes approval authority matrix, and client-notification triggers per FINRA Rule 11892compliance.cancel_correct_authority_matrix— initiator + approver thresholds for as-of, cancel-correct, and trade-allocation-correctioncompliance.amlfincen_unusual_trading_typology_library— pattern library (wash, layering, marking-the-close, spoofing) and AML-Officer escalation disciplinereporting.cat_reporter_id— firm CAT identifier, submission cadence, and resubmission-policy referencereporting.mifid_ii_best_execution_template— RTS 27 / RTS 28 reporting template and top-five-venue compilation cadence (if EU venues touched)reporting.605_606_aggregator— Rule 605 / 606 report assembly system and cadencereporting.focus_x17a5_filing_path— broker-dealer FOCUS filing path and trigger discipline for any reportable eventvoice.house_style— drives the COO brief, supervisor recap, and audit-pack narrative tone (factual-concise default)meta.audit_trail_convention— every state assertion tied to a source (FIX tag, OMS row, central-match status, custody file); rounding convention; signing convention; UTC-offset stamping
Anti-Plagiarism Note
The trade-lifecycle ledger and exception register are generated per-trade and per-exception from the actual order, fill, allocation, central-match, and custody data provided; no language is copy-pasted from FIX-protocol dictionaries, from vendor (OMS / EMS / central-match) documentation, from FINRA / SEC examination manuals, from sample compliance policies, or from another firm's exception report. Every state assertion is grounded in the source data (FIX tag value, OMS extract row, AllocationReport status, central-match status, custody position file); inferred states are explicitly labeled. Severity classifications are calibrated to the specific exception's facts (notional at risk, age in business days, regulatory reportability, client-impact) rather than lifted from generic exception-severity boilerplate. Books-and-records pointers reference the firm's actual blotter / archive paths; no third-party-archive vocabulary is imported. Per-trade commentary lines are generated from the data; cancel-correct narrative is constructed from the actual initiator / approver / timestamp / reason-code evidence and never auto-generated to mask a manual override.
Example Output
[This section will be populated by the eval system with a reference example. For now, run the skill with sample input to see output quality.]
Handoff Contracts
- Inbound from:
skills/operations/morning-notes-drafter.md— trade ideas and catalyst calendar that frame the order-genesis contextskills/operations/investment-thesis-tracker.md— position-thesis state that frames the parent-order generation rationaleskills/customer-service/tax-aware-portfolio-rebalancer.md— executable rebalance trade list that becomes parent-order inputskills/customer-service/tax-loss-harvesting-identifier.md— harvest trade list with wash-sale calendar that becomes parent-order input with the 30-day re-entry blockskills/customer-service/hedging-portfolio-protection.md— hedge-execution trade list (options, swaps, collars, 10b5-1 plan trades) that becomes parent-order input with the wall-cross and trading-window evidenceskills/admin/sanctions-aml-alert-reviewer.md— sanctions-cleared counterparty status that frames the OFAC pre-trade-screen evidenceskills/admin/trade-surveillance-reviewer.md— surveillance-cleared pattern status that frames the AML / unusual-trading-pattern pre-trade postureskills/admin/kyc-cip-onboarding-workflow.md— account / counterparty KYC clearance that frames the per-account allocation eligibility
- Outbound to:
skills/operations/financial-model-documenter.md— clean trade-state ledger for end-of-day P&L attribution and SR 11-7 model-input validationskills/admin/regulatory-filing-checker.md— any reportable event flagged (Form U4 DRP, FOCUS X-17a-5, large-trader Form 13H, beneficial-ownership 13D/G, CAT resubmission, FINRA 4530)skills/admin/trade-surveillance-reviewer.md— completed-trade tape feeds the post-trade surveillance pattern detectionskills/admin/sanctions-aml-alert-reviewer.md— completed-trade counterparty activity feeds the AML pattern detection and any SAR-decision case fileskills/admin/aml-case-triage-evidence-dossier.md— settlement-fail clusters and unusual-counterparty activity feed the AML triage queueskills/customer-service/client-portfolio-update.md— affirmed allocations feed the per-client position updateskills/operations/general-ledger-reconciler.md— settled-trade ledger feeds the cash and security GL reconciliationskills/operations/fund-administration-nav-reviewer.md— affirmed allocation and settled-position ledger feeds the NAV strike validationskills/_shared/email-drafter.md— exception escalation drafts (prime-broker chase, counterparty DK resolution, client error-correction notice, COO daily brief)skills/_shared/meeting-summarizer.md— daily ops huddle minutes, trade-error postmortem, quarterly best-execution-committee minutesoutputs/— versioned save of the trade-lifecycle ledger, exception register, and audit-pack per firm naming convention