세계는 나노시대, 한국은 밀리시대

1.
대한민국 자본시장은 아직도 밀리초가 지배하고 있습니다. 지금은 밀리초시대입니다. 아는 사람 알지만 눈으로 밖으로 돌리면 곳곳이 마이크로초시대로 진입하고 있습니다. 거래소는 두자릿수의 마이크로초 경쟁을 벌이고 있습니다. 트레이딩시스템은 한자릿수 마이크로초 혹은 나노초 경쟁을 시작하고 있습니다.

고빈도매매(HFT)와 밀접한 관계가 있는 Low Latency를 둘러싼 경쟁이 Zero Latency를 향해 계속 이루어지고 있습니다. 어떤 모습일까요?

요즘 증권가의 핫이슈인 DMA와 관련된 수치를 보도록 하겠습니다. DMA서비스를 제공하는 수많은 브로커중 Deutsche Bank가 1.25 마이크로초를 달성했다고 합니다. 사용한 기술을 FPGA입니다. Hardware Embedded Trading System입니다. 개발언어는 HDL언어로 국방이나 원유에서 많이 사용한다고 합니다.

Deutsche Bank will offer a low-latency direct market access trading solution that is clocking executions at 1.25 microseconds.“We’re doing things at wire speed,” said Ralf Roth, Global Head of Product Development for Deutsche Bank’s global equity electronic trading business, in an interview yesterday with Advanced Trading.

Whereas most low latency trading solutions are built in software, Deutsche Bank’s solution is based upon a field programmable gate array (FPGA), in which blocks of logic are programmed into a chip.

“This is a bit of a revolution, since it’s breaking a barrier from previously doing a couple of hundreds of microseconds and then 80 microseconds which is the normal software-based Ultra products’ latency,” said Roth. “That is the market standard and now we’re getting into the low-single digit microseconds. That has never been done before,” he said.
Deutsche Bank Shaves Trade Latency Down to 1.25 Microseconds중에서

중요한 점은 단순히 전문을 받아서 처리한 시간이 아니라 시세를 받아서 알고리즘을 적용한 후 Pre-Trade Risk Check까지 한 결과값이라는  점입니다. 이미 Nasdaq시장의 거래를 위해 사용하고 있다고 합니다.  물론 측정이 문제입니다. 1.25마이크로초는 카드로 들어올 때와 나갈 때의 시간차를 합니다.

어찌되었든 놀라운 수치입니다. 또다른 발표도 있었습니다. 제딴엔 ZeroM의 경쟁자라고 생각하는 Tibco가 Rendevouz FTL(Faster Than Light)라는 메시징 제품을 발표하였는데 Latency 측정값이 384나노초라고 합니다. 기가 죽는 수치입니다.사이트에 소개한 벤치마크한 환경입니다.

Performance metrics based on testing conducted by TIBCO in March 2011. Test cases measured average one way end-to-end application latency based on round trip times for messages. This can be replicated using sample applications tibping.c and tibpong.c available as a part of the TIBCO FTL™ version 1.0.0 product download. Shared memory performance claim based on testing done using TIBCO FTL Version 1.0.0 running on a machine with Intel Xeon 5680 CPU, 48 GB RAM and Linux 2.6.35. RDMA over InfiniBand performance claim based on testing done using TIBCO FTL Version 1.0.0 running on a machine with Intel Xeon 5660 CPU, 40 GB RAM and Linux 2.6.18.

또다른 경쟁자인 29West제품보다 더 좋은 수치입니다. 이미 Tibco의 오랜 고객인 CME는 랩수준의 시험을 하고 있다고 합니다. 시험장비를 보면 속된 말로 ‘빵빵’합니다. 시험을 위해 들어간 비용만으로도 작지 않은 금액입니다.결국 영업을 위한 자료가 필요하지 않았을까 합니다만 그래도 놀라운 결과입니다.

3.
한국은 예외지만 HFT와 관련된 행사가 지구 곳곳에서 열리고 있습니다. 이전에 열렸던 행사중 HFT와 관련된 기술적 전망을 하는 자리도 있었다고 합니다. HIFEQ 2011에 패널로 참석한 어떤 분은 다음과 같은 의견을 개진하였습니다.

1.What are the different set ups and combinations for HFT architecture?

I have experience of four different architectures:

traditional monolithic event queue and broadcast
reflective memory, distributed processing
dma, shared memory, multi-process and multicast
trading engine on a card

The latter appears to be the dream set up. It consists of an FPGA enabled network card with the strategy running on the card itself. This has been implemented by several large prop trading outfits who have arb strats. Up until June last year, we were able to compete with an aggressive arb strat – but we our fill rates have dropped off dramatically and we’re consistently being beaten on speed. So we’ve moved the goalposts – we now focus on market making, news and global multi-venue trading.

I’d be interested in other approaches

2.Is massive multicore or specialist silicon (FPGA, GPU etc.) the next frontier?

Multicore is attractive for a multi strategy play, but it requires careful design to avoid data races and performance issues like tlb cache misses and memory barriers. FPGA has always been attractive for dealing with FIX and conversion of ascii to binary (ie parsing). GPU has promise in the equities world where dynamic pricing and portfolio analysis are required. What’s been widely overlooked is DSP. There are some very interesting things you can do with DSP.
HIFREQ 2011 Panel Discussion Input 중에서

앞서 도이치뱅크의 사례처럼 앞으로 더 많은 트레이더가 FPGA를 이용한 시스템을 이용하지 않을까 합니다. HFT를 위한 속도경쟁을 필연적으로 다음의 두가지 경향을 촉진시킵니다.  Agilysys라는 회사가 HFT고객들을 만나면서 정리한 내용입니다.

첫째는 10GbitE가 기본.

The new generation of switch ASICs (Application Specific Integrated Circuit) that is making low latency 10GBit Ethernet pervasive. This year will see a general upgrade from 1GbitE to 10GbitE. By the end of the year servers will be delivered with 10GbitE ports as standard. The subsequent aggregation at exchanges will cause them to behave more like ISPs (Internet Service Providers)

둘째는 타임스태핑을  위해 PTP가 지원되는 Ethernet Card가 보편화

Enabling precision time protocol (PTP) in silicon on the network card will enable better time stamping and process integrity.

같은 글에서 PTP가 Low Latency market에서 왜 중요한지를 정리하고 있습니다.

Accurate measurement of latency arbitrage. Traders will know to micro-second how long their position changes are taking and will be able to see arbitrage opportunities. The losers will have to get smarter which is good for market efficiency.
Consultants who have built a business on deploying estimated trade times by inserting probes and parallel processing runs will have to amend their approach because the network side will be producing accurate results, at last! The providers of network kernel by-pass acceleration will be able to quickly and simply demonstrate the benefits of their technology, making it easier to sell the concept. Who can argue with figures that trustworthy that so a drop from 20ms to 9ms.
Two Tech Trends in High-Frequency Trading 중에서

3.
이상은 국내 이야기가 아닙니다. 국내 시장으로 보면 시기상조이거나 시장규모가 작어서 쉽지않을 기술들도 보입니다. 그렇지만 누구나가 인정하듯이 레이턴시경쟁을 부정할 수 없습니다. 국내트레이딩시스템은 시스템대로, 거래소는 거래소대로 레이턴시를 줄이기 위해 지금도 노력하고 있습니다.

위의 경향중 국내서도 확인되는 사실은 10GbitE의 도입입니다. 스위칭장비를 바꾸고 트레이딩과 관련한 증권사 백본을 10G로 올리는 투자입니다. 여기서 더 나아가면 TOE나 RDMA가 지원되는 이터넷카드도 보편화하지 않을까 합니다.

다만 향후 미래를  위하여 타임스태핑과 관련된 투자도 고려를 해보면 어떨까 합니다. PTP든 아니면 GPS로 하든 시간측정은 나노시대에 접어들수록 점점 더 중요해집니다.

2 Comments

  1. Hammer

    Low latency 때문에 FPGA까지 한다고 하니 정말 놀라울 따름이네요..
    전자공학과 전공인 친구가 FPGA하고 있는데 저와는 다른 세상이라고 생각해 왔었습니다.
    기술의 발전은 항상 상상을 초월하는 것 같습니다.
    이제 곧 DMA Chip도 나오겠네요.

    Reply
    1. smallake

      Ethernet Card(RDMA를 지원하는 네트워크카드)에 FPGA Chip을 붙인 카드도 이미 나왔습니다.DMA Chip이라는 것이 결국 FPGA에 DMA를 위한 논리를 개발하여 탑재한 Chip일텐데 이미 현실화한 것은 아닐지?(^^)

      도이치뱅크도 그렇고 모증권사에서 DMA하고 있는 고객도 자체개발한 이더넷카드로 한다고 하는데 비슷한 유형인 듯.

      Reply

Leave a Comment

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

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