Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Лекция в СГТУ: Информационные системы и технологическая инфраструктура биржевой торговли

404 views

Published on

Мастер класс: Информационные системы и технологическая инфраструктура биржевой торговли, Саратовский государственный технический университет имени Гагарина Ю.А., 23 апреля 2015

Иосиф Иткин, Exactpro Systems
exactpro.com

Published in: Education
  • Be the first to comment

Лекция в СГТУ: Информационные системы и технологическая инфраструктура биржевой торговли

  1. 1. Информационные системы и технологическая инфраструктура биржевой торговли
  2. 2. Разработка и тестирование для высоконагруженных трейдинговых систем
  3. 3. Main Technology and libraries: • server, data processing, distributed systems • java, c++, c#, javascript, Perl, bash • Linux, Windows • winapi, posix • FPGA, System Verilog Business Areas: • Test Automation and Verification Tools • Markets and Post Trade Simulators • Monitoring and surveillance for trading systems and exchanges • Trading and Brokerage Front End Systems • Algo Trading and Market Data • Trading and Market Data gateways Methodologies: • agile, scrum, DevOps • rapid delivery to end users • continuous integration Instruments: • git, svn • eclipse, visual studio • Jenkins • visual vm, valgrind Web: html5, AJAX, JSF, ExtJS, JQuery, Tomcat, Play Framework Distributed: Tibco RV, UMQ, ZeroMQ, RabbitMQ, akka, Boost Asio DB: MySql, Postgres, Oracle DB, LevelDB, Hibernate Communication protocols and APIs: FIX, ITCH, Reuters Foundation API, QuantHouse
  4. 4. ClearTH: • Post-Trade testing tool • Verifies each stage of the DLC • Integrated schedule • Automated matrices • Can create multiple days test scenarios • Concurrent multiple tests • Integrated simulators • SWIFT ISO protocol support Minirobots: • Executes multithreaded java code • Complexity of test algorithms is defined by the test developer • Supports multiple client fix connections, order entry and market data via FIX • Can use GUI to iterate through sent and received messages Dolphin: • Model-based testing of market surveillance systems • Production-scale capacity and throughput • Interactive real-time alerts and reports Shsha: • Post-transactional tool • Analyzes clients' activity and forecasts system response • Parses and displays logs in a user-friendly way • Parses messages and then puts each to a data base table where each column corresponds to each message field • Allows making summarized reports, etc • Easy to understand GUI Load Injector: • Simulates multiple client connections with a specified load shape for each connection or a group of connections • Up to 75K messages / second from a single CPU core • Measures latencies in microsecond range • Performance test reports Sailfish: • Can test Order Entry, Market Data and Post Trade connections in one test scenario • Each test scenario is independent • Allows running test scripts in any sequence • Simulation of multiple user connections • Server simulators • All messages are stored into a data base • Generates test reports
  5. 5. Командировки
  6. 6. Информационные системы и технологическая инфраструктура биржевой торговли
  7. 7. Фондовая биржа – уникальная технологическая система • 100 – 200 m заявок в день • 50 k заявок в секунду • Трехзначное количество серверов в ЦОД • Миллисекундные всплески • Время отклика порядка 100 uS
  8. 8. • 100 – 200 m заявок в день • 50 k заявок в секунду • Трехзначное количество серверов в ЦОД • Миллисекундные всплески • Время отклика порядка 100 uS Свет идет из Саратова в Москву в 24 раза дольше Самолет успевает пролететь 2.5 сантиметра Мгновение ока длится в 3000 раз дольше Фондовая биржа – уникальная технологическая система
  9. 9. • 100 – 200 m заявок в день • 50 k заявок в секунду • Трехзначное количество серверов в ЦОД • Миллисекундные всплески • Время отклика порядка 100 uS Одна секунда – 5 метров Сутки – 20 километров Миллисекунда – 25 сантиметров Фондовая биржа – уникальная технологическая система
  10. 10. Компоненты биржевой системы
  11. 11. Ускорение • Убрать все лишнее с пути заявки • Не освобождать память • Максимально простой внутренний протокол • Привязать потоки к ядрам процессора • Посылать сообщения одновременно нескольким получателям Аппаратные методы • Infiniband • GPU • Overclocking • FPGA • TOE
  12. 12. Отказоустойчивость • Дублировать все компоненты • Разносить компоненты по разным серверам • Асинхронная запись информации для восстановления Масштабирование • Инструменты • Участники
  13. 13. Базы данных • Убрать все лишнее с пути заявки • Асинхронная запись информации для восстановления
  14. 14. Mizuho Securities 12 October 2005, Tokyo Attempts to sell a single J-Com stock for 610,000 Yen ($5,041) Mistakenly price and quantity were swapped Risk systems failure: • Mizuho Securities • Tokyo Stock Exchange Estimated loss $225 millions This type of errors is called Fat Finger
  15. 15. Nasdaq & ABN Amro 18 September 2012, Stockholm A trader had the intention of posting a sell order for 5,000 SKF B shares. Due to an input error with the Client, the order volume field was populated with a negative value (-5,000) Instead of returning an error, the system converted the value into a random 9-digit figure - 294,962,296 The Sell Order corresponded to approximately 71 % of the total outstanding volume in the SKF B share. The Sell Order resulted in execution of 813,442 shares
  16. 16. Facebook IPO
  17. 17. 18 May 2012, NASDAQ, One of the largest IPOs in history • Secondary trading is preceded by a designate Display Only Period (DOP) • Multi-component architecture that included Matching Engine, IPO Cross Application and Execution Application • At the end of the DOP, NASDAQ’s “IPO Cross Application” analyzes all of the buy and sell orders to determine the price at which the largest number of shares will trade; then NASDAQ’s matching engine matches the buy and sell orders at that price. Usually takes 1-2 ms • NASDAQ allowed orders to be cancelled at any time up until the end of the DOP, including the very brief interval during which the IPO cross price is calculated. After calculation was completed, the system performed orders validation check between ME and “IPO Cross Application”. If any of the orders were cancelled after the start of the cross, the system would have to repeat the calculation Facebook IPO
  18. 18. • Over 496k orders participated in the cross, and its duration exceeded 20ms • Order cancellation arrived during this period, and the application had to repeat the calculation. Two more cancellations arrived during the second iteration, and four more - during the third one • IPO Cross Application went into infinite loop at 11:05 • The NASDAQ team switched off validation check on the secondary system and performed failover 25 minutes after the start of the loop • Unknown at that moment, 38k orders submitted between 11:11 and 11:30 were stuck and did not participate in the uncross. It created another discrepancy, this time with Execution App and Members who were not able to receive confirmation for orders executed in the cross until 13:50 Facebook IPO
  19. 19. Facebook IPO
  20. 20. Facebook IPO
  21. 21. Knight Capital
  22. 22. 1 August 2012, New York • Knight Capital – one of the most successful HFT firms • Implemented changes related to Retail Liquidity Program at NYSE • SMARS – an ultra-fast order router • Source code responsible for legacy functionality PowerPeg • 212 parent orders, millions child orders • Accumulated loss – $460m or $170k/sec • Incorrectly configured risk systems • Deployment on 7 servers instead of 8… Knight Capital
  23. 23. Knight Capital
  24. 24. Knight Capital
  25. 25. http://www.tmpaconf.org Научно-исследовательская работа
  26. 26. Спасибо Офис 401, 38/114, БЦ Ковчег ул. Вавилова +7 (8452) 338-908 http://www.exactpro.com

×