주문의 투명성과 타임스탬프(TimeStamp)

1.
마이크로초, 나노초로의 경쟁은 시간측정과 시간동기화가 중요합니다. 하여 시작은 단순하였습니다.? 그렇지만 결국 거래전, 거래후 투명성이라는 문제로 넘어갔습니다.

미국과 유럽 자본시장 감독규정의 근간인 RegNMS나 MiFid이? 아주 중요하게 다루는 항목이 투명성(Transparency)입니다.? 일반적으로 증권시장의 투명성은 시장참여자들이 거래과정에서 제공받는 정보의 양과 시의적정성을 의미합니다.? 사전적 투명성(pre-trade transparency) 과 사후적 투명성(post-trade transparency)으로 구분됩니다. 사전적 투명성은 시장참여자가 제시하는 매도매수호가(bid-ask quote)를 공개하는 것을 말하며, 사후적 투명성은 거래 체결
이후 거래와 관련된 정보(거래량, 거래시간, 주문종류, 거래주체, 거래가격 등)가 공개되는 것을 말합니다. 다음은 MiFiD가 규정한 부분중 하나입니다.

Pre-trade transparency requirements for regulated markets

1. Member States shall, at least, require regulated markets to make public current bid and offer prices and the depth of trading interests at those prices which are advertised through their systems for shares admitted to trading. Member States shall require this information to be made available to the public on reasonable commercial terms and on a continuous basis during normal trading hours.

Regulated markets may give access, on reasonable commercial terms and on a non-discriminatory basis, to the arrangements they employ for making public the information under the first subparagraph to investment firms which are obliged to publish their quotes in shares pursuant to Article 27.

KRX의 시장운영규정을 보면 다음과 같은 조항들이 있습니다. 투명성과 연관된 조항이 아닐까 합니다. 사후적 투명성과 관련된 부분이 18조인지는 자신없습니다.(^^)

제18조(호가의 기록) ① 규정 제14조제2항의 규정에 의하여 호가의 기록은 별지 제2호 서식에 의한 호가집계표에 의한다.
② 제1항의 규정에 의한 호가집계표에는 매도·매수를 구분한 가격별 합계수량을 기재한다.

제126조(호가정보의 공표등 <개정 2006.5.29>) ① 규정 제101조제1항제5호에 따라 거래소는 다음 각호에서 정하는 호가정보에 관한 내용을 공표한다. <개정 2006.5.29, 2009.2.3, 2010.7.29>

1. 단 일가격에 의한 개별경쟁매매를 위한 호가접수시간중에는 예상체결가격·예상체결수량, 매도·매수별 예상최우선호가의 가격을 포함하는 연속 3개의 예상우선호가의 가격 및 그 가격의 호가수량. 다만, 시가결정을 위한 호가접수시간중에는 호가접수시간의 개시시점부터 10분이 경과한 때부터 이를 공표한다.

2. 복 수가격에 의한 개별경쟁매매를 위한 호가접수시간중에는 매도·매수별 최우선호가의 가격을 포함하는 연속 10개의 우선호가의 가격, 그 가격의 호가수량 및 당해 호가수량의 합계수량. 다만, 주식워런트증권으로서 연속 10개의 우선호가중에 유동성공급호가가 제출되어 있는 경우에는 이를 구분하여 공표할 수 있다.

어찌되었든 어느 나라 거래소든 호가를 보고 시장참여자는 주문을 냅니다.? 이 때 대부분 거래소는 가격/시간우선의 원칙(Price/Time Priority)에 따라 매매체결이 이루어집니다. 가격만큼이나 시간도 중요합니다. Low Latency환경에서 고빈도매매(HFT)나 알고리즘매매가 커지고 거래소의 레이턴시경쟁이 밀리초단위에서 마이크로초단위로 넘어가면서 투명성의 문제는 시간측정의 문제로 나타납니다.

2000년초반 1초정도의 오차는 오차가 아니었습니다. 지금 1초의 오차는 수익을 좌지우지할 정도의 오차입니다.또한 사전적 투명성을 위해 공개하고 있는 매도매수호가의 시간 역시 중요해집니다. ?고객의 주문은 증권사 주문전달프로세스에 의해 거래소로 전달되고 주문별로 타임스탬핑(TimeStamping)을 합니다. 이 때 타임스탬핑한 시간정보가 호가의 시간이 됩니다. 또한 이 시간을 기준으로 가격/시간의 원칙에 따라 매매체결이 이루어집니다.

2.
HFT와 알고리즘트레이딩이 보편화하면서 각나라 감독기관이 감독규정을 개정하는 작업을 하는 듯 합니다. 유럽연합이나 호주도 그런 경우입니다. 호주의 Endance라는 회사가 사전적 투명성과 사후적 투명성을 다룬 감독규정에 아래와 같은 의견서를 제출하였습니다.

Endace provides feedback to the European Commission on European Securities market.
Endace provides feedback to ASIC on Time Stamp Increments and Clock Synchronization

가능하면 특정한 회사를 선전하지 않지만 위의 자료를 보면 감탄을 했습니다.그래서 원문을 인용하며 소개하고자 합니다.

Re: Feedback on CP-145 and REP-215: Australian equity market structure

Market Data & Trade Time Stamp Resolution

With the advent of high frequency trading over the last ten years there has been a gradual move to having finer ‘time stamping’ increments of the trades within the major equity execution venues around the world. Time stamping increments used to be in seconds, but over the last few year most exchanges have moved to millisecond or even nano-second time stamps. At the moment the time stamp increments on exchanges that have high frequency trading vary from nano seconds to millisecond increments. The increments associated with the time stamps used within the market data feeds of a range of equity execution venues are as follows:- BATS ‘time stamps’ trades in increments of 1 millisecond (see source 1), NASDAQ OMX times stamps in increments of 1 nano seconds (2), NYSE Euronext Europe ? UTP time stamps in increments of 1 millisecond (3), NYSE ARCA ? US, time stamps in increments of 1 millisecond (4), CHI-X Europe time stamps in increments of 1 microsecond (5), Turquoise (LSE Dark pool) time stamps in increments of 1 nano second (6), the London Stock Exchange is currently migrating to the Millenium Exchange platform and will be migrating to 1 nano second time stamps (7), DirectEdge time stamps in 1 nanosecond increments (8).

To detect market manipulation or fraudulent activity by high frequency (strictly ‘fast’ rather than ‘high frequency’) traders it is necessary to understand the correct time correlation of trades. This implies that time stamps should be accurate to an order of magnitude more detailed than the speed at which trades are executed, otherwise it is difficult to tell which trade happened first. Many Exchanges are now claiming sub millisecond trade latency and several are approaching the 100 microsecond point. Endace therefore suggests that all execution venues (be it Exchanges, ATSs, dark pools or large internalizers) use time stamps initially accurate to at least 0.01 millisecond (10 microseconds). Given the inevitable onward march of technology and to avoid upgrade issues in the future it is probably wise to have time increments in the data feeds of exchanges set to time stamp trades at the one micro second level, but with the long term goal of having sub micro-second time stamps.

HFT에 대비하기 위하여 최소한 한자리숫자의 마이크로초 수준으로 타임스탬핑을 하자는 주장입니다. 어떤 수준으로 타임스탬핑을 한다고 하더라도 증권사와 거래소는 아주 많고 다양한 시스템을 운용합니다.이 때 각 장비들의 시간을 어떻게 동기화할 것인가는 아주 중요한 이슈입니다.

Clock Synchronization

UMIR-10.14 discusses the need for synchronization of all trading entities to a single reference. UMIR is correct in this being a critical requirement for any regulation or monitoring of fast-trader networks.? However, the methods espoused within UMIR-10.14 are no longer accurate enough to monitor, or regulate modern trading networks.

NTP for example has been inadequate for task for almost 5 years now.? We discuss NTP accuracy, and especially auditability in a later section.

The advent of relatively low cost GPS receivers that derive absolute timing information accurate to better than 0.1 micro-seconds has significantly eased the problem of clock synchronization across multiple global locations and has been adopted by many high frequency traders for their own internal purposes and also by some exchanges. Such technology costs a few thousands of dollars per installation and can readily provide required synchronization at the major data centers of execution venues. The GPS timing signals are ‘synced’ to the UTC (and hence to UTS(AUS)) time clocks and provide a very high degree of accuracy. In addition it is a ‘global;’ solution which allows regulators and market participants to analyse trading behavior on a global basis.

GPS is currently the only technology that allows accurate time-keeping across multiple geographic locations with the auditable precision required.

Network Time Protocol을 사용하는 방법도 있고 Precion Time Protocol이라는 방법도 사용한다고 합니다.

IEEE1588 PTP (Precision Time Protocol)

그렇지만 NTP든 PTP든 한자리 마이크로초단위로 타임스탬핑을 하기엔 오차가 많다고 지적합니다.

Method Typical Accuracy Comment
NTP 10mSec (10,000 uSec) Synchronization cannot be guaranteed
PTP 1uSec at best Slaved to GPS over a dedicated network
PTP/LAN 10uSec typical Typical installation
PTP/WAN 100uSec typical WAN based installation
PTP Synchronisation cannot be guaranteed
GPS locked HW <100nSec Guaranteed

대신 GPS방법을 이용하라고 권고합니다.물론 비쌉니다. 이상을 통하여 투자자들은 시간과 레이턴시자료에 대한 투명성을 보장받을 수 있다는 의견입니다.

Transparency

Although not directly addressed in CP-145, the transparency of timing and latency data is an important topic and allows clients to make informed decisions on the destination of order flow.
Some market operators (eg. Direct Edge ? see source 10) are allowing customers access to a range of measures of real time trade latency along with the percent of orders that are matched internally. Endace believes that this transparency improves the overall fairness and efficiencies of the market and ASIC should consider mandating the publishing of key performance indicators in this area.

3.
현재 한국거래소는 9자리로 시간을 표시합니다. 계산을 하면 시간기준으로 밀로초입니다.밀로초를 기준으로 타임스탬핑을 하면? 착시현상이 발생합니다. 얼마전 주문전달프로세스와 관련된 글에서 공성성을 제기하였습니다.

Best Execution과 신의성실의 의무

아느 분들은 아시겠지만 슈퍼메뚜기나 HFT들의 주문시스템은 마이크로초단위로 시험을 하고 주문을 발생합니다. 그런데 주문전달프로세스를 운용하는 증권사나 주문을 받아서 처리하는 거래소나 밀리초단위로 타임스태핑을 하면 1000마이크로초사이에서 시간순서가 정해진 주문들이 뒤섞이는 결과를 초래합니다.? 호가의 역전 및 주문의 역전현상이 발생할 수 있습니다. 앞서 전제로 하였던 Pre-Trade Transparency를 충족하다고 하더라고 데이타가 정확하지 않은 문제가 발생합니다.? 아마도 유럽이나 호주에서 사전 및 사후 투명성조항을 손질하면서 시간동기화 및 측정을 중요한 이슈로 다루는 이유가 아닐까 합니다.

오늘 거래소 규정을 보다가 의미있는 조항을 발견하였습니다.

제123조(주문의 처리) ① 규정 제91조의 규정에 의하여 회원은 위탁자로부터 문서에 의한 방법 또는 전화등방법으로 매매거래의 위탁을 받은 경우에는 주문내용을 접수순에 따라 회원시스템의 주문단말기(이하 “주문단말기”라 한다)에 신속·정확하게 입력하여야 한다.

② 일부 영업소의 주문단말기에 장애가 발생한 때에는 본점 또는 다른 영업소의 주문단말기를 이용하여 주문을 처리하여야 한다.

③ 회원이 주문단말기에 장애가 발생하여 제1항 및 제2항의 규정에 의한 방법으로 주문을 처리할 수 없는 경우에는 거래소가 별도로 정하는 방법으로 주문을 처리할 수 있다.

④ 회원은 제1항부터 제3항까지 및 제109조제1항제3호에 따라 접수한 주문을 거래소에 호가로 제출하는 과정에서 주문입력매체의 특성, 주문건수 등을 감안하여 위탁자의 주문간 및 위탁자의 주문과 회원의 상품 운영을 위한 호가간에 형평이 이루어지도록 처리하여야 한다. <신설 2010.10.21>

123조 4항의 호가간 형평의 원칙을 말하고 있습니다. 그렇지만 호가간 형평의 원칙이 지켜지려면 기술적인 규정까지를 하지 않으면 의미없는 시대입니다.? 앞서 Endace의 의견을 따르면? 나노초기준으로 타임스탬핑을 하여야 하고 GPS로 시간을 동기화하는 세부규정이 필요합니다. 즉, 시간의 동기화와 타임스탬핑과 관련한 구체적인 규정을 변화된 트레이딩환경에 맞추어 하지 않으면 형평의 원칙이 파괴되는 결과가 나옵니다.

4.
마지막에 Latency Transapency라는 단어가 등장합니다.

Latency Transparency? for an exchange or a service provider, latency transparency means sharing information about latency performance with your trading clients. The goal is to better inform clients about the nature and quality of the products and services they use.

Latency Transparency를 위해 해외거래소중 Eurec가 어떤 작업을 하였는지 소개할까 합니다.Eurex에서 Enhanced Transaction Solution을 도입하면서 Timestamp와 관련된 기능을 개선하였습니다. 아래 그림과 같이 구간별로 타임스탬핑을 하였습니다.

이렇게 수집한 정보를 회원사별로 웹환경에서 모니터링을 할 수 있도록 하였습니다. NYSE가 Latencystats.com을 운영하는 것과 다른 차원으로 회원사에게 Latency정보를 제공하고 있습니다.

좀더 자세한 정보는 아래를 보시길 바랍니다.

Eurex Trading System 1.1

마찬가지로 기관투자자를 위해 TCA시스템이 필요하듯이 알고리즘트레이더나 HFT를 위해 Latency Monitoring System도 이제 필요한 때가 아닌가 합니다. 거래소는 회원사를 위해, 회원사는 트레이더를 위한 서비스가 필요합니다.(^^)

5.
KRX를 보면서 찹찹합니다. 독점기관이면서 공공기관이라 고객마인드가 없습니다. 새롭게 컨설팅을 하고 있다고 하니까 투자자가 원하는 정보를 제공하였으면 합니다.? IT화 되어가는? 자본시장의 특성을 이해하고 이를 규정에 반영하도록 노력도 있었으면 합니다.

어떤 정당은 자신들이 힘들면 ‘잃어버린 10년’을 이야기합니다. 꼭 맞는 비유는 아니지만 한국의 증권산업중 트레이딩을 놓고 보면 ‘잃어버린 10년’이라는 말이 떠오릅니다.

2 Comments

  1. PKT

    지금껏 준비해 오신 내용을 개괄적으로 이해하며 아쉬웠던 부분이 Monitoring 입니다.
    오늘글을 보고 더 완성도를 높이시고 계시다는 느낌이 팍팍 듭니다.
    노력의 결과가 기대됩니다.

    Reply
    1. smallake

      생각하는 부분은 많이 있습니다. 아직 개발파트너가 없어서 진행을 못하고 있습니다. 서비스로 구성하기 위해 필요한 여러가지을 구성할 생각입니다. 물론 latency Monitoring도 포함입니다.

      Eurex의 전문을 보니까 거래소의 게이트웨이가 받아서 매매체결로 보낸 시간과 매매체결에서 게이트웨이가 받아서 증권사로 보낸 시간을 기록한 필드가 있더군요. 사소하지만 의미있는 필드라는 생각을 했습니다.

      Reply

Leave a Comment

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.