Market Hours and Sessions
U.S. equity markets operate on a defined schedule with distinct trading sessions. Trading systems must enforce session-specific rules for order types, pricing, and routing.
Pre-Market Session (4:00 AM - 9:30 AM ET): Some exchanges and ECNs accept orders as early as 4:00 AM ET. Pre-market trading typically has lower liquidity, wider spreads, and may restrict certain order types (e.g., only limit orders permitted, no market orders). Not all securities are available for pre-market trading.
Regular Trading Session (9:30 AM - 4:00 PM ET): The primary trading session during which all NMS protections apply (Reg NMS trade-through rules, LULD bands, market-wide circuit breakers). The session begins with an opening auction and ends with a closing auction.
Post-Market Session (4:00 PM - 8:00 PM ET): Extended-hours trading after the regular session close. Similar restrictions to pre-market: lower liquidity, limit orders only on many venues, wider spreads.
Opening Auction (Opening Cross): Exchanges conduct an opening auction to establish the opening price. During the pre-open period, orders accumulate and the exchange publishes indicative match price and volume. At 9:30 AM ET, the exchange matches accumulated orders at a single clearing price that maximizes executable volume. Nasdaq calls this the "Opening Cross"; NYSE uses its Designated Market Maker (DMM) system to facilitate the open.
Closing Auction (Closing Cross): The closing auction determines the official closing price, which is used for NAV calculations, index rebalancing, and benchmarking. On Nasdaq, the Closing Cross accepts Market-On-Close (MOC) and Limit-On-Close (LOC) orders. On NYSE, the DMM facilitates the close. Closing auction volume has grown significantly — on many days, 5-10% or more of total daily volume executes in the closing auction.
Half-Day Sessions: U.S. markets close early (1:00 PM ET) on the day before Independence Day (July 3, or July 2 if July 3 is a weekend), the day after Thanksgiving (Black Friday), and Christmas Eve (December 24, or December 23 if December 24 is a weekend). Systems must have a holiday calendar that adjusts session times and early close handling.
Holiday Calendar Management: Trading systems must maintain a calendar of market holidays (New Year's Day, MLK Day, Presidents Day, Good Friday, Memorial Day, Juneteenth, Independence Day, Labor Day, Thanksgiving, Christmas) and half-day sessions. The calendar must be updated annually as the exchanges publish their schedules. Holiday calendar errors can result in orders being sent to closed markets (rejected) or orders not being sent when markets are open.
Connectivity Resilience
Exchange connectivity must be designed for high availability. Failures in connectivity can prevent order submission, cause missed fills, and create compliance and financial risk.
Primary/Backup Connections: Every production FIX session or data feed should have a backup. The primary and backup connections should use different physical network paths (different switches, different extranets, different ISPs) to avoid common-mode failures. Some firms maintain primary connectivity through one extranet (e.g., TNS) and backup through another (e.g., IPC) to ensure that a single provider outage does not take down all venue connectivity.
Failover Testing: Failover from primary to backup connections must be tested regularly — not only in annual DR (disaster recovery) exercises but through periodic controlled failovers during production trading. Untested failover procedures frequently fail when needed in a real outage.
Heartbeat Monitoring: At the FIX session level, heartbeats detect broken connections. At the infrastructure level, firms typically implement additional monitoring: network-level health checks (ping, TCP connect), application-level health checks (periodic test messages or timing checks on data feed throughput), and latency monitoring that alerts on degradation (e.g., round-trip time exceeding a threshold). Monitoring systems should alert both technologists and trading desks when connectivity degrades or fails.
Session Recovery Procedures: When a FIX session disconnects unexpectedly, the recovery procedure involves: (1) detecting the disconnection (heartbeat timeout or TCP reset), (2) attempting reconnection with exponential backoff to avoid overwhelming the exchange gateway, (3) re-establishing the session with the persisted sequence numbers, (4) performing gap recovery via ResendRequest/SequenceReset to synchronize state, and (5) reconciling open order state — orders that were submitted before the disconnect may have been filled, partially filled, or canceled during the outage, and the firm must determine the current state of each order upon reconnection.
Disaster Recovery and Cross-Region Connectivity: Firms must maintain the ability to resume trading from a secondary site in the event of a primary site failure. DR sites typically have their own exchange connectivity (FIX sessions, market data feeds, network infrastructure) that are kept in standby or warm-standby mode. Critical design decisions include: RTO (Recovery Time Objective) — how quickly must trading resume after a primary site failure, RPO (Recovery Point Objective) — how much order/position state can be lost, and whether the DR site uses the same or different SenderCompIDs (same CompIDs allow seamless continuation; different CompIDs require exchange coordination).
Performance Monitoring: Ongoing monitoring of connectivity performance includes: network latency (one-way and round-trip, measured at the application layer), message throughput (messages per second during peak periods), packet loss rates, order acknowledgment latency (time from order submission to exchange acknowledgment), and market data timeliness (gap between exchange timestamp and firm receipt timestamp). Latency spikes or throughput degradation may indicate network congestion, hardware issues, or exchange gateway problems.
Regulatory Requirements
Firms that connect to exchanges and trading venues are subject to specific regulatory requirements governing their systems, controls, and reporting.
Regulation SCI (Systems Compliance and Integrity): SEC Regulation SCI (adopted in 2014, effective November 2015) applies to "SCI entities" — exchanges, certain ATSs that meet volume thresholds (approximately 5% of NMS volume), clearing agencies, the SIP processors, and certain exempt clearing agencies. SCI entities must: establish policies and procedures reasonably designed to ensure that their systems have adequate capacity, integrity, resiliency, availability, and security; conduct periodic reviews and testing of these systems (including business continuity testing); promptly notify the SEC of "SCI events" (system disruptions, system intrusions, and significant system compliance issues); and provide the SEC with annual SCI reviews. While Reg SCI directly applies to exchanges and large ATSs (not to broker-dealers connecting to them), broker-dealers should understand Reg SCI because exchange system failures affect their connectivity and because broker-dealers operating large ATSs may themselves become SCI entities.
Consolidated Audit Trail (CAT): The CAT is a comprehensive order tracking system operated by FINRA on behalf of the SROs. CAT requires broker-dealers and exchanges to report the full lifecycle of every order in NMS securities and OTC equity securities — from order origination through routing, modification, cancellation, and execution. CAT reporting includes: customer identification (via the FDID — Firm Designated Identifier), order receipt and origination timestamps, order routing events (including the destination venue), order modifications and cancellations, and execution details (price, quantity, venue). Firms must assign CAT Reporter IDs, map customer accounts to FDIDs, and submit daily reports to the CAT processor. Exchange connectivity infrastructure must capture the timestamps and routing details required for CAT compliance.
Market Access Controls (SEC Rule 15c3-5): Rule 15c3-5 requires every broker-dealer that provides market access (including access to an exchange or ATS) to establish, document, and maintain a system of risk management controls and supervisory procedures reasonably designed to manage the financial, regulatory, and other risks of market access. Required controls include: pre-trade controls that prevent the entry of orders that exceed pre-set credit or capital thresholds, prevent the entry of erroneous orders (e.g., price reasonability checks, order size limits, duplicate order detection), restrict access to trading systems to authorized persons, and comply with all applicable regulatory requirements (e.g., short sale restrictions, trading halts). The controls must be under the direct and exclusive control of the broker-dealer — they cannot be delegated to the customer or another party. The broker-dealer must conduct regular reviews (at least annually) of the effectiveness of its market access controls.
Pre-Trade Risk Controls for Market Access: Specific controls required or expected under Rule 15c3-5 and exchange rules include: order price collars (rejecting orders with prices far from the current market), maximum order size limits, position limits and capital exposure limits per symbol and aggregate, duplicative order detection, kill switches that can halt all order flow from a firm if a risk threshold is breached, restricted securities lists (preventing trading in halted, delisted, or restricted securities), and short sale compliance checks. These controls must operate in real time with minimal latency impact.
Worked Examples
Three worked examples are in references/examples.md — load for an end-to-end scenario: (1) designing FIX connectivity to five equity venues with Rule 15c3-5 controls, (2) building market data infrastructure with consolidated and direct feeds, (3) implementing trading halt handling across OMS, SOR, and market data systems.
Common Pitfalls
- Failing to persist FIX sequence numbers across application restarts, leading to sequence number resets that can cause duplicate order submissions or missed execution reports
- Using a single network path for both primary and backup FIX sessions, so that a single switch or carrier failure takes down both connections simultaneously
- Not handling PossDupFlag correctly during gap recovery — processing a PossDup execution report as a new fill results in double-counting
- Relying solely on the SIP for NBBO when the firm's trading strategy is latency-sensitive — the SIP is slower than direct feeds by hundreds of microseconds to single-digit milliseconds
- Ignoring LULD price band updates in the order router, leading to orders being rejected by the exchange for violating price bands
- Treating all halt types identically — different halt types have different implications for resting orders, resume mechanisms, and regulatory obligations
- Not maintaining a current and tested holiday calendar, causing the system to attempt trading on market holidays or to miss half-day early closes
- Deploying pre-trade risk controls (Rule 15c3-5) that can be circumvented, overridden, or disabled by trading staff — the controls must be under the exclusive control of the broker-dealer's risk management function
- Failing to test failover procedures regularly — an untested backup connection that does not work during a real outage provides no resilience
- Using ticker symbols as the sole identifier in internal systems — ticker symbols change, are reused, and are not globally unique; internal systems should use stable identifiers (CUSIP, ISIN, or internal IDs) with symbology mapping
- Not accounting for the difference between exchange timestamps and receipt timestamps when analyzing latency — the two clocks may not be synchronized, and one-way latency measurements require clock synchronization (e.g., PTP or GPS)
- Assuming that a FIX session Logon means the exchange is ready to accept orders — many exchanges have separate "trading session status" messages that indicate when the matching engine transitions from pre-open to open
Cross-References
- order-lifecycle (trading-operations plugin): Order states, order types, and the order lifecycle from creation through execution or cancellation — exchange connectivity is the transport layer that carries order lifecycle events
- trade-execution (trading-operations plugin): Execution algorithms, venue selection, and smart order routing depend on the connectivity and market data infrastructure described in this skill
- pre-trade-compliance (trading-operations plugin): Pre-trade risk controls (Rule 15c3-5) are a regulatory requirement for market access and must be integrated into the exchange connectivity architecture
- settlement-clearing (trading-operations plugin): Post-execution, trades flow from exchange connectivity systems through clearing and settlement — correct venue and execution identifiers are critical for downstream processing
- operational-risk (trading-operations plugin): Exchange connectivity failures are a significant source of operational risk, and the resilience, failover, and monitoring practices in this skill are operational risk controls
- books-and-records (compliance plugin): Order and execution data captured through exchange connectivity must be retained per SEC Rules 17a-3 and 17a-4, and CAT reporting obligations require comprehensive audit trail data from connectivity systems