FIX와 Performance Session Layer

1.
처음 여의도에 발을 들여놓은 이후 수 많은 기술들이 나타났다가 사라졌습니다. 현재까지 살아있는 기술들은 어떤 특징을 가지고 있을지 생각해보았습니다.기술적인 진보, 고객친화적인 기능? 이런 것이라고 할 수도 있지만 ‘안정적인 고객’입니다. 다른 말로 하면 시장에서 경쟁을 이기고 살아남았습니다. 동어반복입니다만 ‘생존’이라는 단어 말고 기술들이 가지는 특징을 찾기 힘듭니다. 제품 혹은 기술이 어떻게 변화발전하여 현재에 이르렀는지 알 수 없습니다. 이십년전 기술이라고 하여도 고객이 있고 계속 사용하면 그대로 생존하는 것이 여의도의 현실입니다.

사라지고 유지하고 발전하고 다양한 모습을 보여주는 여의도IT이지만 계속 변화와 발전을 하고 있는 것이 있습니다. 국제표준인 FIX입니다. FIX가 탄생한 이후 알고리즘트레이딩, 고빈도매매, 기계주도 트레이딩 등으로 시장환경이 변화하였지만 FIX는 변화속에서 변화를 수용하면서 생존하고 있고 발전하고 있습니다.

FIX와 시세 – ITCH 그리고 SBE
FIX Protocol과 고성능(High Performance)

몇 일전 FIX가 새로운 Session Layer와 관련한 시안(RC2)를 내놓았습니다. 최초 FIX가 나왔을 때 Session Layer가 하는 일은 Sequence와 heartbeat였습니다. 전문의 순서를 보장하고 세션이 죽었는지, 살았는지 확인하는 역할이었습니다. FIX가 정의한 세션계층의 역할은 고성능을 지향하는 현대 트레이딩과 맞지 않는 면이 있었습니다. 이런 이유로 새로운 제안을 내놓았습니다.

The following proposal provides a new FIX session layer for high performance. FIX Performance Session Layer (FIXP) is a “lightweight point-to-point protocol” introduced to provide an open industry standard for high performance computing requirements currently encountered by the FIX Community. FIXP is a derived work. The origin and basis for FIXP are the FIX session layer protocols and the designed and implemented by NASDAQOMX, SoupTCP, SoupBinTCP, and UFO (UDP for Orders). Every attempt was made to keep FIXP as close to the functionality and behavior of SoupBinTCP and UFO as possible. Extensions and refactoring were performed as incremental improvements. Every attempt was made to limit the FIXP to establishing and maintaining a communication session between two end points in a reliable manner, regardless of the reliability of the underlying transport.
FIX Performance Session Layer중에서

Download (PDF, 1.11MB)

2.
위의 글을 보면 생소한 단어가 몇 등장합니다. 무엇인지 알아보았습니다. 위에서 소개한 프로코콜은 대부분 나스닥이 제공하는 것들입니다. 서로 어떤 관계가 있을까요? Genium INET – Protocol Specifications에 있는 문서중 일부입니다.

nasdaq

FIX와 비유하면 ITCH와 OUCH는 Application Message이고 SoupTCP, MoldUDP은 Session Message라고 할 수 있습니다. 세션프로토콜인 SoupTCP와 MoldUDP를 한국과 비교하면 SoupTCP는 거래소와 통신하는 FEP 프로토콜과 비슷하고 MoldUDP는 시세프로토콜과 비슷합니다. 다만 한국은 순서를 보장하지 않는 단순 UDP인 반면 나스닥의 MoldUDP는 순서를 보장하는 Reliable UDP이라고 할 수 있습니다.

각 프로토콜의 특징을 비교해보죠. 2012년 Welcome to the FIX Trading Community Chicago Regional Meeting때 발표한 Market Data Protocol Analysis가 잘 정리하고 있습니다.

Download (PDF, 3.59MB)

미국이나 한국이나 거래소가 트레이딩을 위한 정보기술의 중심입니다. FIX가 공통으로 있지만 Nasdaq이나 NYSE 혹은 CME의 영향을 큽니다. KRX가 독점인 한국은 말할 필요도 없습니다. Exture+를 할 때도 느꼈지만 새로운 기술을 개발하고 제품을 만들 때 고민을 많이 했으면 합니다. 지금과 같은 시세서비스일 경우 순서가 바뀌더라도 큰 문제가 없지만 시세서비스가 레벨2로 바뀌면 어떻게 할지 궁금하네요. FEP 프로토콜도 좀더 신경을 써서 문서화를 하고 구조화를 하였으면 합니다.

3.
ITCH와 MoldUDP가 어떻게 동작하는지를 알고 싶으면 NASDAQ OMX simulator를 확인해보세요. Go로 만들어진 프로그램으로 시험을 해볼 수 있습니다.

NASDAQ OMX simulator that replays NASDAQ OMX Nordic TotalView ITCH SoupFILE files over MoldUDP protocol.

위의 프로그램을 개발한 사람이 만든 FIX엔진도 있습니다. QuickFIX보다 고성능이라고 합니다.

Falcon, the open source ultra low-latency FIX engine for Java

트레이더가 바라보는 MoldUDP라는 글도 있네요.

Dispatches From The Trading Floor – MoldUDP

마지막으로 위에서 소개한 프로토콜에 대한 상세한 내용은 아래에서 참고하세요.

MoldUDP for Nasdaq Nordic Version 1.0

MoldUDP is a networking protocol that allows efficient and scalable transmission of data messages in a “one transmitter to many listeners” scenario. MoldUDP is a lightweight protocol layer built on top of UDP that provides a mechanism for listeners to detect and re-request missed packets.

SoupTCP Version 2.00

SoupTCP is a lightweight point-to-point protocol, built on top of TCP/IP sockets that allow delivery of a set of sequenced messages from a server to a client in real-time. SoupTCP guarantees that the client receives each message generated by the server in sequence, even across underlying TCP/IP socket connection failures.

Genium INET ITCH Protocol Specification Revision 1.11

Leave a Comment

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

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