Phase C · Application Architecture
Hero Screen — Interactive Mockup
SCR-TRD-001Order Blotter
agent:aib-tradingHead of Trading
2
Open / in gate
6
Filled today
1
Rejected
1
Cancelled
42 ms
Gate P95
Orders — 2026-06-11 (gates: S suitability · A appropriateness · L limit · I instrument approval)
OrderClientInstrumentSideQty / NominalTypePre-Trade GatesStatus
SIM-O-007Petra KellerABN AMRO Autocall Note 2028BUYEUR 250’000 nom.marketSALIrejected — gate
SIM-O-008Alpenrose StiftungNestlé SABUY3’000marketSALIpre-trade check
SIM-O-009Anna MüllerABB LtdBUY1’500limit @ 50.40SALIsubmitted to market
SIM-O-010Petra KelleriShares Core MSCI World ETFSELL5’000marketSALIfilled
SIM-O-001Anna MüllerNestlé SABUY1’000marketSALIfilled @ 103.80
SIM-O-003Anna MüllerApple IncSELL500marketSALIcancelled
Selected order — SIM-O-007
Order ID
SIM-O-007
Account
SIM-A-004 · Petra Keller
ISIN
XS2345678901
Nominal
EUR 250’000
Suitability
FAIL
Appropriateness
NOT REQUIRED
Limit / Mandate
FAIL — max_illiquid_pct
Instrument Approval
NOT ON APPROVED LIST
Gate Result Detail
Suitability fail: complex structured product not approved for retail client under MiFID II Art. 25(3).
Best Execution Venue
No eligible venue — XS2345678901 absent from approved_instrument; best-execution rationale blocked until waiver.
Actions
Release blocked while any gate ≠ pass. Waiver routes to SCR-TRD-005 — requires CRO approval (PROC-005); agents cannot self-approve a failed check.
Simulation — mock data (SIM-*)Agents propose · humans dispose (P11)

SCR-TRD — Trading & Settlement Screens

Version: 1.0 · Date: 2026-06-11 · Owner: Head of Trading (settlement screens: COO) Related: PROC-004, PROC-005, PROC-009, aib-trading-service-api.md, aib-operations-service-api.md Primary agent(s): agent:aib-trading, agent:aib-operations · Human roles: Head of Trading, COO, CRO, Trade Operations Manager, Settlement & Custody Officer

Function Overview

Trading & Settlement covers the full instrument lifecycle: order intake through the 5-check pre-trade gate (MiFID II Art. 25 suitability, Art. 27 best execution), execution and confirmation (MiFID II Art. 25(6)), T+2 settlement under CSDR Art. 5, settlement discipline including cash penalties and buy-ins under CSDR Art. 7, position keeping, and corporate action processing. Best execution quality is published annually per RTS 28.

agent:aib-trading runs the pre-trade gate (P95: 50ms), creates order_, trade and settlement records via the Trading Service API, computes fail-day counters and CSDR penalty accruals, and aggregates RTS 28 venue statistics. agent:aib-operations updates positions post-settlement and processes corporate action entitlements. Humans never key trades; they review queues, approve exceptions (suitability waivers, T+3 fails, buy-in decisions, discretionary elections) and own the audit trail — per principle P11, agents propose, humans dispose.

All records are retained, not deleted (BankG Art. 47; 10-year retention per the data ownership matrix). Suspension or cancellation is a status transition with a documented reason, never a row delete.

Screen Map

SCR-TRD-001 — Order Blotter

Purpose: Real-time queue of all orders with pre-trade gate status; the human checkpoint between agent-proposed orders and market submission. Personas: Head of Trading (approvals), Trade Operations Manager (monitoring), CRO (waiver escalations).

Data Sources

TableRole in screen
order_primary record (one row per order)
instrumentlookup: name, asset class, is_complex, priips_class
approved_instrumentgate input: ISIN on approved list, max_weight_pct, suspended
mandate (via order_.mandate_id)gate input: mandate compliance context
best_execution_policylookup: active policy version, approved venues

CRUD Matrix

Tableagent:aib-trading (via API)Head of TradingTrade Ops Manager
order_C R U (gate checks, status)R U (approve/reject)R
approved_instrumentRRR
best_execution_policyRRR

(D never — order records retained per BankG Art. 47)

Key Flows

  1. agent:aib-trading receives the order, runs the PROC-004 5-check gate (suitability validity, mandate ISIN + weight, best-execution venue, MAR/sanctions flags, ESG preference alignment) and writes results to suitability_check, appropriateness_check, mandate_compliance_check; status moves pending → pre_trade_check.
  2. All checks pass → agent sets status approved and submits (submitted_to_market). Blotter shows it as straight-through, no human action.
  3. Any check fails → order parks in the blotter with rejection_reason draft and the failing check highlighted. Head of Trading either confirms rejected or routes to SCR-TRD-005 (waiver path, PROC-005).
  4. Fills stream back: partially_filled → filled with executed_price/quantity/amount; the agent creates the linked trade record.

States & Gates

  • order_.status: pending → pre_trade_check → approved | rejected → submitted_to_market → partially_filled → filled; terminal alternatives cancelled, expired.
  • Gate: human approval (approved_by, approved_at) required for any order where a gate check ≠ pass; agents cannot self-approve a failed check.
  • ESG override (check 5 only): Senior RM override with written client instruction + CCO notification (PROC-004); checks 1–4 are not overridable here — they go to SCR-TRD-005.
  • SLA: pre-trade gate P95 50ms (trading service API); parked orders >4h flagged to Head of Trading.

Validation

  • direction CHECK in ('buy','sell','switch_in','switch_out'); order_type in ('market','limit','stop','best_execution').
  • suitability_check in ('pending','pass','fail','waived_execution_only'); mandate_compliance_check in ('pending','pass','fail') — a fail requires mandate_breach_detail.
  • appropriateness_check in ('not_required','pending','pass','fail','warning_issued'); required ≠ not_required when instrument.is_complex = 1 (MiFID II Art. 25(3)/(4)).
  • best_execution_rationale mandatory before approved (MiFID II Art. 27); execution_policy_version must match an active best_execution_policy.version.
  • approved_instrument.suspended = 1 blocks submission regardless of gate results.

SCR-TRD-002 — Trade Detail & Best Execution

Purpose: Drill-down on an executed trade: economics, confirmation status, and best-execution evidence including RTS 28 aggregates. Personas: Head of Trading, COO, Internal Audit (read-only).

Data Sources

TableRole in screen
tradeprimary record (execution economics, confirmation)
order_parent: gate results, venue, rationale
best_execution_policypolicy version in force at execution
rts28_execution_qualityannual venue-quality aggregates (top-5 venues)
instrument_pricereference close prices for slippage context

CRUD Matrix

Tableagent:aib-trading (via API)Head of TradingCOO
tradeC R U (confirmation flags)RR
rts28_execution_qualityC R U (aggregation, publication)R U (sign off publication)R
best_execution_policyRR U (review/version)R

Key Flows

  1. Broker callback → agent creates trade with gross_amount, commission, fees_other, net_amount, value_date = intended_sd = T+2.
  2. Agent issues client confirmation (MiFID II Art. 25(6)); confirmed_to_client = 1, confirmed_at stamped. Unconfirmed trades >24h surface in an exception strip.
  3. Yearly: agent aggregates per asset class / order type / venue into rts28_execution_quality; Head of Trading reviews ranking and slippage, signs off publication (published_at, published_url) by 30 April of the following year (RTS 28).
  4. Policy review triggers (best_execution_policy.review_trigger: annual, material venue change, regulatory update, SREP finding, client complaint) open a review task for the Head of Trading; new versions require board approval.

States & Gates

  • trade has no status machine; lifecycle is carried by linked settlement (SCR-TRD-003).
  • Gate: RTS 28 publication requires human sign-off; agent prepares, Head of Trading publishes.
  • Gate: best_execution_policy.status draft → active only with board_approved = 1 and board_approval_date; prior version → superseded.

Validation

  • trade.executed_price, executed_quantity, gross_amount, net_amount NOT NULL; accrued_interest defaults 0 (bonds only).
  • rts28_execution_quality.asset_class CHECK in ('equities','bonds','derivatives_rates','derivatives_fx','derivatives_equity','derivatives_credit','etfs','structured','other'); order_type in ('market','limit','all'); UNIQUE per (legal_entity, year, asset_class, order_type, direction, venue_mic).
  • best_execution_policy.retail_client_basis CHECK in ('total_consideration','best_net_price'); UNIQUE (legal_entity_id, version).

SCR-TRD-003 — Settlement Monitor

Purpose: T+2 settlement pipeline with fail aging, CSDR Art. 7 penalty and buy-in tracking; the operations cockpit for settlement discipline. Personas: Settlement & Custody Officer, Trade Operations Manager, Head of Operations, COO (T+3 escalations).

Data Sources

TableRole in screen
settlementprimary record (status, fail_days, escalation flags)
tradeparent: economics, intended_sd
csdr_settlement_penaltyper-fail-day penalty accruals
csdr_buy_inbuy-in process records
settlement_calendarbusiness-day calculation for fail aging

CRUD Matrix

Tableagent:aib-trading (via API)Settlement & Custody OfficerHead of Operations
settlementC R U (matching, fail_days)R U (resolution notes, counterparty contact)R U (T+3 sign-off)
csdr_settlement_penaltyC R U (daily accrual)RR U (invoice decision)
csdr_buy_inC RR U (initiate, record outcome)R U (approve initiation)

Key Flows

  1. Daily CSD file match (PROC-009): agent matches trade ID/ISIN/quantity/date; matched → settled with actual_sd; mismatch → failed, fail_days increments per business day.
  2. At fail_days = 3 the agent sets t3_escalation_required = 1 and stamps head_ops_notified_at; Head of Operations confirms escalation handling (t3_escalated_at).
  3. From the first fail day the agent accrues csdr_settlement_penalty rows (daily reference-price penalty per Del. Reg. 2018/1229); Head of Operations decides client re-invoicing (invoiced_to_client, invoice_ref).
  4. buy_in_assessment_due = ISD+4: agent proposes assessment; Settlement & Custody Officer records the buy-in decision, appoints agent/extension in csdr_buy_in; cash compensation if undeliverable.
  5. Match-rate KPI strip: target 99.5% within 24h (PROC-009); break rate >1% alerts Head of Ops + CRO.

States & Gates

  • settlement.status: pending → instructed → matched → settled; fail branch failed → buy_in_assessed → bought_in; alternatives partial, cancelled.
  • Gate: T+3 escalation is mandatory and human-acknowledged (CSDR Art. 7 settlement discipline); buy-in initiation requires Head of Operations approval.
  • SLA: daily reconciliation complete by 10:00; break resolution within 3 days (before T+3).

Validation

  • settlement.status CHECK in ('pending','instructed','matched','settled','failed','partial','buy_in_assessed','bought_in','cancelled').
  • csdr_settlement_penalty.penalty_type CHECK in ('cash','securities') (CSDR Art. 7(2)); allocated_to in ('buyer','seller','both').
  • penalty_amount only with penalty_applicable = 1 and a penalty_period_start/end window.
  • csdr_buy_in.initiation_date NOT NULL; extension_period_end bounded by the 7-day buy-in agent extension (CSDR Art. 7(3)-(7)).

SCR-TRD-004 — Position Keeper

Purpose: Settled vs. pending position view per account/ISIN with valuation and unrealised P&L; reconciliation point between trading and custody. Personas: Trade Operations Manager, Settlement & Custody Officer, CRO (read).

Data Sources

TableRole in screen
positionprimary record
instrumentlookup: name, asset class, last_price
instrument_pricevaluation history (close_price by price_date)
fx_ratebase-currency conversion for market_value_base
settlementpending-quantity audit trail

CRUD Matrix

Tableagent:aib-operations (via API)Trade Ops ManagerSettlement & Custody Officer
positionC R U (settle, revalue)RR U (custody break annotation)
instrument_priceC R (feed ingest)RR
fx_rateC R (feed ingest)RR

Key Flows

  1. On settlement.status = 'settled' the agent moves quantity from quantity_pending to quantity_settled and recomputes avg_cost_per_unit (FIFO default) and total_cost.
  2. EOD revaluation: agent prices from instrument_price.close_price, converts via fx_rate.mid_rate, writes market_value, market_value_base, unrealised_pnl, valuation_date.
  3. Custody reconciliation: positions whose custodian_ref quantity diverges from custodian feed are flagged; Settlement & Custody Officer investigates and annotates (breaks route to SCR-PAY-004 when cash-side).
  4. Stale-price flag: instrument.last_price_date older than 5 business days on a held ISIN → manual pricing task.

States & Gates

  • No status machine; position is a maintained snapshot keyed by as_of_date. Pending quantity must net to open unsettled settlements — divergence is an exception.
  • Gate: manual price overrides (instrument_price.source = 'manual') require Trade Ops Manager entry with source documented; agents only ingest bloomberg/reuters feeds.

Validation

  • quantity_settled NOT NULL DEFAULT 0; market_value = quantity_settled * market_price (recompute check on save).
  • instrument_price PRIMARY KEY (isin, price_date) — one close per day; source documented (bloomberg, reuters, manual).
  • fx_rate PRIMARY KEY (base_ccy, quote_ccy, rate_date); mid_rate NOT NULL.
  • instrument.priips_class CHECK BETWEEN 1 AND 7 displayed on the instrument flyout.

SCR-TRD-005 — Pre-Trade Waiver Approval

Purpose: Approval console for the PROC-005 waiver path (suitability override with CRO sign-off) and maintenance of the MiFIR pre-trade transparency waiver register. Personas: CRO (approver), Head of Trading (requester review), Compliance (read).

Data Sources

TableRole in screen
pre_trade_waiverprimary record (transparency waiver register)
order_linked order with failed gate check + waiver context
instrumentlookup: asset class for threshold mapping
audit_logimmutable trail of override approvals

CRUD Matrix

Tableagent:aib-trading (via API)CROHead of Trading
pre_trade_waiverC R (draft from ESMA refs)R U (activate/deactivate)R
order_R U (apply waiver outcome)R U (approve override)R
audit_logCRR

Key Flows

  1. Suitability override (PROC-005): order fails check → client + RM request override → CRO reviews rationale on this screen and approves; agent sets order_.suitability_check = 'waived_execution_only' and resumes the order in SCR-TRD-001. The approval chain (RM → CRO) is written to audit_log.
  2. Transparency waiver register: agent drafts pre_trade_waiver rows from ESMA opinions (esma_opinion_ref, competent_authority_ref, LIS/SSTI thresholds); CRO activates (active = 1) and records periodic review (last_reviewed).
  3. Expiry watch: applicable_until within 30 days → review task; lapsed waivers auto-flagged inactive by the agent, confirmed by CRO.

States & Gates

  • Waiver register rows: active 1/0 with applicable_from/until window; deactivation requires a note, never deletion.
  • Gate: suitability override is a strict two-human chain (RM proposes, CRO disposes) — agent:aib-trading can prepare but never approve. Override without CRO sign-off is technically blocked.

Validation

  • pre_trade_waiver.asset_class CHECK in ('equity','equity_like','bond','structured_finance','emission_allowance','derivative').
  • waiver_type CHECK in ('large_in_scale','order_management_facility','reference_price','negotiated_trade','size_specific','illiquid_instrument','package_order','si_systematic_internaliser').
  • large_in_scale_threshold_eur required when waiver_type = 'large_in_scale'; ssti_threshold_eur when 'size_specific'.
  • order_.suitability_check = 'waived_execution_only' only reachable from fail with a CRO approval entry in audit_log.

SCR-TRD-006 — Corporate Actions Console

Purpose: Lifecycle view of corporate actions: announcement capture, entitlement computation, voluntary elections with deadline control, and payment processing. Personas: Settlement & Custody Officer (processing), Trade Operations Manager, RM (election capture), COO (late-election exceptions).

Data Sources

TableRole in screen
corporate_actionprimary record (event terms, dates)
corporate_action_entitlementper-account entitlements (gross/WHT/net)
corporate_action_electionvoluntary event elections + deadlines
positioneligible quantity at record date
bank_transactionproceeds credit linkage (transaction_id)

CRUD Matrix

Tableagent:aib-operations (via API)Settlement & Custody OfficerRM
corporate_actionC R U (feed ingest, processing)R U (confirm terms)R
corporate_action_entitlementC R U (compute, pay)R U (exception fix)R
corporate_action_electionC R U (instruct custodian)R U (submit instruction)R U (capture client election)

Key Flows

  1. Custodian feed announces event → agent creates corporate_action (announced); Settlement & Custody Officer confirms terms against a second source → confirmed.
  2. At ex/record date the agent computes corporate_action_entitlement per holding account (eligible_quantity from position), applying withholding_tax_rate (e.g. 0.35 Swiss WHT) to derive entitlement_net.
  3. Voluntary events: elections captured per account (client instruction via RM, or discretionary_election = 1 under DPM mandate); agent sends custodian instruction before election_deadline; late submissions flag submitted_late = 1 and escalate to COO.
  4. Payment date: agent books proceeds as bank_transaction (dividend_credit/coupon_credit/redemption_credit), links transaction_id, marks entitlement paid and event completed.

States & Gates

  • corporate_action.status: announced → confirmed → processing → completed | cancelled.
  • corporate_action_election.status: pending → instructed → confirmed → processed; alternatives lapsed, failed.
  • Gate: discretionary elections (no client instruction) only under a discretionary mandate; flagged for RM 4-eyes review. Deadline timer: instruction due 24h before election_deadline.

Validation

  • corporate_action.action_type CHECK in 15 values ('cash_dividend' … 'delisting'); ex_date NOT NULL; split events require split_ratio_new/split_ratio_old.
  • corporate_action_election.election_type CHECK in ('tender_offer','rights_subscription','rights_sale','rights_lapse','conversion_election','scheme_of_arrangement','exchange_offer','stock_dividend_cash_election','other'); election_deadline NOT NULL; UNIQUE (corporate_action_id, account_id).
  • submission_channel CHECK in ('custodian_portal','swift_message','manual_instruction','client_portal').
  • corporate_action_entitlement.status CHECK in ('pending','processed','paid','cancelled'); entitlement_net = entitlement_gross - withholding_tax.

Access Control Notes

  • Head of Trading: full SCR-TRD-001/002; read on settlement screens. Cannot approve waivers of checks 1–4 (CRO only) — order approver ≠ waiver approver.
  • CRO: sole approver on SCR-TRD-005; read elsewhere. Segregation: the CRO never initiates orders.
  • Settlement & Custody Officer / Trade Operations Manager: operate SCR-TRD-003/004/006; no order approval rights (front-office/back-office separation).
  • agent:aib-trading and agent:aib-operations write only via their service APIs at Propose/query-only tier (agent register); every write carries the agent identity in audit_log.
  • Internal Audit: read-only across all screens (independence, agent register).

Cross-References

  • Processes: PROC-004 (order pre-trade gate), PROC-005 (trading → settlement, waiver path), PROC-009 (settlement reconciliation)
  • Service APIs: aib-trading-service-api, aib-operations-service-api, aib-compliance-service-api (mandate validation)
  • Data ownership: aib-data-ownership-matrix.md (order_/trade/settlement/position: aib-trading R/A, 10y retention)

References

Referenced by