Most content about algorithmic trading assumes a US or European market context. When I started building a system specifically for the Korean stock market, I kept running into structural features that weren't covered in any of the resources I was reading — and that turned out to matter a great deal for how the system needed to be designed. This post covers the market structure details that influenced the system most directly, drawn from the specific problems I encountered while building and running it.
The Basic Schedule — and What Happens at Each Boundary
The Korean Stock Exchange (KRX) runs its regular continuous trading session from 09:00 to 15:30 Korea Standard Time. Within that window, prices are formed through continuous two-sided matching: buy and sell orders come in and execute against each other as they arrive, with each execution producing a new trade print and potentially moving the price.
Before and after continuous trading, the exchange runs single-price auction periods. The pre-market auction runs from 08:30 to 09:00. During this window, orders can be submitted and modified but nothing executes. At 09:00, the exchange takes all outstanding orders and calculates the single price that would result in the maximum number of shares changing hands — and that price becomes the opening price. Every order that can execute at that price does so simultaneously.
The closing auction works the same way, running from 15:20 to 15:30. The price formed in the closing auction is the official closing price for that day, and it matters more than just for settlement — it becomes the reference price against which static volatility halts are calibrated for the following session.
Why the Opening Matters Disproportionately for Signal Detection
The most active period for the signal system is the first ninety minutes of continuous trading — from 09:00 to 10:30. During this window, the system accepts new stocks into its tracking list. After 10:30, no new stocks are added, though stocks already being tracked continue to progress through the detection stages.
This cutoff wasn't arbitrary. After running the system without it for the first few weeks, I found that the quality of signals deteriorated significantly after 10:30. The early session concentrates the strongest responses to overnight news, earnings releases, and regulatory announcements. Stocks that react strongly in this window tend to show the clearest wave-pullback-breakout structures because the price discovery process is genuinely working through new information. After 10:30, the market's information processing is largely complete, and many of the price moves that look like breakout setups are simply intraday noise without the same supply-demand dynamics underneath.
The practical effect of the cutoff was a significant improvement in signal quality. The same binary filters and grade thresholds that produced too many low-quality signals throughout the full session produced much cleaner signals when restricted to the 09:00 to 10:30 window.
The Volatility Halt Structure and How It Interacts With the System
Korea's volatility halt system — which temporarily pauses trading when a stock moves more than a defined percentage within a short period — runs continuously during the trading session. There are two types: a static halt triggered by a move of roughly 10% from the day's reference price, and a dynamic halt triggered by a move of roughly 3% from the most recent executed price.
When a volatility halt fires, trading pauses for two minutes and switches to single-price auction matching. For the signal detection system, a halt creates an interruption in the tick data stream. The candle currently forming at the time of the halt stops receiving ticks. When trading resumes, ticks start flowing again, but the candle that was forming before the halt and the candles forming after the halt can have very different characteristics.
Early in the system's operation, I noticed that signals occasionally fired immediately after a halt lifted — not because the wave-pullback-breakout pattern had completed organically, but because the halt had artificially interrupted a candle at a misleading point and the resumption created a false breakout reading. After reviewing several of these cases in the trade logs, I added a check that flags any stock that experienced a volatility halt within the most recent candle window and requires additional confirmation before treating a subsequent signal as valid.
The After-Hours Session
After 15:30, KRX runs a after-hours single-price auction from 16:00 to 18:00, where stocks can trade at the official closing price only. This session is relevant for the system primarily because it represents a source of overnight positioning by some institutional participants — stocks that see significant after-hours volume sometimes carry that momentum into the next morning's open.
I don't currently use after-hours data in the signal system, but tracking after-hours participation by investor type — particularly foreign institutional activity — is something I've been considering as a supplementary filter for early-morning stock selection.
The 15:30 Data Reset
When the market closes at 15:30, the system performs a full data reset: all current signal records are deleted from the Firebase database, the in-memory tracking lists are cleared, and the system enters a standby state until the next session. This reset is triggered automatically by a time check that runs on a 30-second polling interval throughout the day.
The reason for a complete reset rather than carrying over any data is straightforward: signals generated during one session are not meaningful input for the next. A breakout that occurred at 10:00 today tells you nothing reliable about tomorrow's price action. Carrying that signal forward would create confusion about whether a displayed signal was generated today or yesterday — particularly on days when I check the dashboard early in the morning before the market opens.
I learned the importance of this reset the hard way. In the system's early days, I occasionally shut down the Python engine before 15:30. When I restarted it the next morning, the previous day's signal data was still in the Firebase database and appeared on the dashboard alongside new signals from the current session. On two separate occasions, I acted on what I thought was a fresh signal only to realize afterward that it was a holdover from the previous day. After that, I added a specific check: if the engine starts up before 09:00, it automatically clears all existing signal data before beginning the new session.
Today's Investing Insight — How Korean Market Structure Differs From US Markets
Traders accustomed to US equity markets will find several structural differences in Korea. The KRX does not use a specialist or market maker system for most stocks — prices are determined by pure order-book matching without a designated intermediary obligated to provide liquidity. This means thin stocks can be significantly more illiquid than their US equivalents. Korea also has a daily price limit: stocks cannot move more than 30% above or below their previous day's closing price in a single session, a circuit breaker that has no direct equivalent in US equity markets. And unlike the US, where extended-hours trading is active and widely used, Korean after-hours trading is thin and limited to the official closing price. These structural differences matter when adapting strategies developed in one market context to another.
---
This post documents a personal journey of building an algorithmic trading system in the Korean stock market and is not a recommendation of any specific stock or strategy. Market structure rules are subject to change by exchange regulations. All investment decisions and their outcomes are the sole responsibility of the investor.
Comments
Post a Comment