
An exchange is more than just a place where trades happen. It’s a highly structured system with defined rules, phases, and mechanisms that govern exactly when and how trading occurs. As a quant developer, you need to understand this structure deeply — because your systems must behave differently depending on what phase the market is in.
What Does an Exchange Actually Do?
At its core, an exchange provides three things:
- A central order book — a real-time record of all buy and sell orders for every listed instrument
- A matching engine — the system that matches buy and sell orders according to defined rules (we’ll cover this in depth in Module 4)
- Market structure — defined rules about when trading occurs, what order types are accepted, and how prices are determined
Exchanges also provide market data — a real-time feed of every order, trade, and price change. This market data feed is the lifeblood of every trading system and will be covered in depth in Module 3.
Market Phases
A trading day is divided into distinct phases. Each phase has different rules about what orders are accepted and how they’re handled. Understanding these phases is critical for quant developers because your systems need to behave differently in each one.
Pre-Open / Opening Auction
Before continuous trading begins, most exchanges run an opening auction — also called the pre-open phase. During this phase:
- Participants can submit, modify, and cancel orders
- No trades are executed yet
- The exchange calculates an indicative opening price based on the orders received
- At the end of the auction, a single opening price is determined and all matching orders are executed simultaneously
The opening auction is important because it establishes the day’s opening price in an orderly way — avoiding wild price swings that would happen if continuous trading started immediately with no price reference.
For quant developers, the auction phase is a distinct operating mode. Many order types (like IOC — Immediate or Cancel) are not accepted during the auction. Your system needs to detect which phase the market is in and adjust its behaviour accordingly.
Continuous Trading (Day Session)
This is the main trading phase where the exchange operates a live order book and matches orders in real time. Orders are matched on a price-time priority basis — the best price gets matched first, and within the same price, earlier orders get priority.
This is where most of the action happens — and where low-latency systems matter most.
Pre-Close / Closing Auction
Similar to the opening auction, most exchanges run a closing auction at the end of the day to establish an orderly closing price. The closing price is important because:
- It’s used for daily P&L calculation
- Index rebalancing trades are often executed at the close
- Many financial products reference the official closing price
GFD (Good for Day) orders are automatically cancelled at the end of the continuous trading session, before the closing auction begins. This is a critical detail for quant developers — if your system submits GFD orders, you need to track which ones were cancelled versus filled.
After Hours Trading (AHT)
Some exchanges offer after hours trading sessions after the main close. HKEX for example offers an After Hours Trading session for futures and some other derivatives, running from around 5:00pm to 11:00pm Hong Kong time — allowing participants to react to overseas market moves overnight.
Not all instruments have AHT sessions — on HKEX, equities don’t have AHT but many futures and options contracts do.
What’s Allowed in Each Phase
This is one of the most important things a quant developer needs to know. Sending the wrong order type in the wrong phase will result in rejections, and in a live trading system, an unexpected rejection can cascade into bigger problems.
| Operation | Pre-Open Auction | Continuous Trading | Pre-Close Auction | AHT |
|---|---|---|---|---|
| Submit limit order | ✅ | ✅ | ✅ | ✅ |
| Submit market order | ❌ | ✅ | ❌ | ❌ |
| Submit IOC order | ❌ | ✅ | ❌ | ❌ |
| Submit FOK order | ❌ | ✅ | ❌ | ❌ |
| Submit GFD order | ✅ | ✅ | ❌ | ❌ |
| Modify order | ✅ | ✅ | ✅ | ✅ |
| Cancel order | ✅ | ✅ | ✅ | ✅ |
| Trades execute | ❌ | ✅ | ✅ (at auction price) | ✅ |
| Real-time matching | ❌ | ✅ | ❌ | ✅ |
Note that this varies by exchange — always refer to the specific exchange’s technical specifications. HKEX, ASX, and CME each have their own rules and some differences in what’s permitted in each phase.
Implications for system design:
- Your order management system (OMS) must track the current market phase for every exchange it connects to
- Before sending any order, the OMS should validate whether that order type is permitted in the current phase
- When transitioning from pre-open to continuous trading, your system may need to re-submit orders that were rejected during auction
- GFD orders need special handling — track them separately so you know exactly which ones the exchange cancelled at the end of the day session
- During the closing auction, aggressive strategies should pause — the auction matching rules are different from continuous trading and unexpected fills can occur at the auction price
Trading Hours Across Major Exchanges
Different exchanges around the world operate on different schedules. This matters for quant developers because global trading firms run systems across multiple exchanges simultaneously.
| Exchange | Location | Equities hours | Notes |
|---|---|---|---|
| ASX | Sydney | 10:00am – 4:00pm AEST | Pre-open 7:00am |
| HKEX | Hong Kong | 9:30am – 4:00pm HKT | Lunch break 12:00–1:00pm |
| NYSE | New York | 9:30am – 4:00pm ET | Pre-market from 4:00am |
| LSE | London | 8:00am – 4:30pm GMT | — |
| CME | Chicago | Nearly 24 hours | Futures, brief daily break |
Notice that CME (futures) trades nearly 24 hours — this is common for derivatives exchanges because futures markets need to react to global events overnight.
Why This Matters for Quant Developers
Market phases directly affect how your systems behave:
Order type restrictions — during the auction phase, many order types are rejected. Your order management system must know which order types are valid in each phase.
GFD order management — Good for Day orders must be tracked carefully. When the continuous session ends, any unfilled GFD orders are cancelled by the exchange. Your system needs to reconcile this.
Market data interpretation — the market data feed looks different during auction vs continuous trading. During the auction, you receive indicative prices rather than traded prices. Your system must interpret these correctly.
Position and risk — risk systems need to know whether the market is open, in auction, or closed. A position that can be hedged immediately during continuous trading cannot be hedged during a closed phase.
Multi-exchange systems — if your firm trades across ASX, HKEX, and CME simultaneously, your systems need to track the phase of each exchange independently and handle the transitions correctly.
In Module 4 we’ll go deep into the matching engine — the core system that processes orders during continuous trading and runs the auction algorithm.