Download presentation
Presentation is loading. Please wait.
Published byViolet Bryant Modified over 7 years ago
1
Algorithmic Trading and FIX Protocol Sergey Troshin, Ph.D. Director st@exante.eu Moscow, March 2016 Anton Antonov Head of OPS aan@exante.eu www.exante.eu
2
Содержание Алгоритмическая торговля. Классы алгоритмов (10 мин) Инфраструктура современного брокера (10 мин) FIX протокол. Основные концепции (40 мин) – Тэги и сообщения – Dictionary файл – Разница между версиями – Как читать FIX спецификацию брокера FIX протокол. Пример реализации на С# (20 мин) Вопросы и ответы (10 мин)
3
Algorithmic Trading
4
Algorithmic trading Automatic trading HFT – high frequency trading Algorithmic Trading
5
How does Execution Works? Order driven market model – Market Order – Limit Order
6
Automatic trading Buy-sideSell-side Statistical arbitrage VWAP Market Making / HFT Trend following Arbitrage Smart order routing Well Known Strategies.
7
Automatic trading Market Making and Scalping
8
Trend Following Technical Analysis SMA / EMA Moving Average Convergence/Divergence Bollinger bands Stochastic oscillator Parabolic SAR Rate of Change (ROC) Relative Strength Index (RSI) etc …
9
Volume Weighted Average Price
10
Volatility and Option Trading Implied volatility prediction 1.Delta neutral portfolio – Buy option / sell stock on volatility going up – Sell Option / buy stock on volatility going down 2.Various options strategies – Straddle – Strangle – Butterfly – Etc.
11
Arbitrage Strategy Example GAZPRU (MICEX) On new tick: ogzd_rub = convert(ogzd, usd_rub) spread = normalize(ogzd_rub/gazpru) changedSpread() OGZD (LSE) USD/RUB (FOREX) LIMIT (LSE) London Server Filled (size) MARKET (MICEX) Filled (price) On change spread: if (spread > threshold) place_limit(OGZD, price, size) On limit fill: If (limit_is_filled) place_market(GAZPRU, size) Parameters: threshold Another example: S&P stocks on NYSE and NASDAQ in NY against Futures on CME in Chicago
12
Pairs Trading and Statistical Arbitrage Market neutral portfolio – Short one set of stocks – Long another set – Rebalance very often Pair Trading – Coca-Cola (KO) and Pepsi (PEP) – Renault (RNO) and PSA Peugeot Citroen (UG) Statistical Arbitrage – Up to 1000+ stocks in portfolio – Huge quantitive calculations
13
How to Compare Strategies?
14
Sharp Ratio
15
Which is better? StrategySharp RatioCalculationsHFT / Delay Sensitive? Trend Following Mean revision BadEasyNo Volatility TradingBadHardNo Arbitrage / Pair trading GoodEasyYes Statistical Arbitrage GoodHardYes Market MakingGoodEasyYes
16
Technology Market data Delays Market Depth Best Bid Offer Trades Execution Delays Client side / Server side Pre-trade risks, Software Connection Protocol Virtual Machines Co-location Control Trades ExportInterfaceError handling
17
Technical Broker Infrastructure
18
EXANTE Platform in ATP out Customized backoffice reporting API (FIX) Platform
19
300 + Servers
20
->What is located on servers?
21
-> Where are other exchanges?
22
-> Where FIX server is located? -> What is algorithm?
23
FIX Server Location One exchange – Low latency algorithm Exchange data center – No special requirements Back up data center or any random data center Several exchanges – Arbitrage with low latency algorithm Exchange data center (exchange depends on algorithm) Dedicate link to other exchanges – No special requirements Any data center (non exchange preferably) Common Internet link
24
Creating an Algorithm Any programming language 3 rd party software Run algorithm on your server or in broker’s VM Control through the trading terminal
25
Trading Terminal Market Analysis Manual trading FIX orders control Account control -> What about other servers?
26
Trading Data and Client Accounts Processing + DEMO environment + Development servers
27
FIX Protocol. Main Concepts
28
Origins
29
Versions 4.2 4.4 5.0 FIXML FIX FAST
30
The two parts of FIX
31
Communication partners Initiator Acceptor
32
Why FIX?
33
Structure: Tags TAG=VALUE[SOH] 35=A [SOH]35=A[SOH]34=1[SOH] |35=A|34=1|
34
Structure: Message 8=FIX.4.4|9=125|35=A|34=1|49=EXAMPLE_TRADE_UAT|52=20160318- 14:28:55.885|56=EXANTE_TRADE_UAT|98=0|108=30|141=Y|553=User|554=PA55W0RD| 10=217|
35
Structure: Message 2 8=FIX.4.4|9=192|35=D|34=241|49=EXAMPLE_TRADE_UAT| 52=20160318-16:53:18.655|56=EXANTE_TRADE_UAT|1=TST1111.001| 11=20160315152146019575|22=111|38=37|40=1|48=AAPL.NASDAQ| 54=2|55=blank|59=3|60=20160318-16:53:18.653|10=225|
36
Structure: Component blocks 146=3 55=SHAREA 207=EXCHANGE 55=SHAREB 207=EXCHANGE 55=SHAREC 207=EXCHANGE
37
Message types Admin: 35=0 Heartbeat 35=5 Logout 35=A Logon Application: 35=D New Order - Single 35=8 Execution Report 35=3 Reject
38
Fix engines FIX Antenna C++: QuickFIX QuickFIX/J VersaFix UL FIX
39
Certification
40
Dictionary files
41
FIX Specification
42
Logging and debugging
43
FIX Protocol. C# Example
44
EXANTE’s Demo program overview QuickFix lib and Project dependencies Configuration files Application class Methods to override Some implement samples: – Market data subscribe and receive – Getting symbols list
45
https://bitbucket.org/SergeyTroshin/exante-fix-sample
46
Project Dependencies Classes to Implement QuickFIX minimum
47
QuickFIX. Configuration Files
48
Feeder Application
49
Feeder Application Class. From Server.
50
Feeder Application. Receive Market Data.
52
Feeder Application Class. Subscribe for Market Data.
53
Broker Application
54
Broker Application. From Server.
55
Broker Application. Symbol List Request.
56
FIX Specification. Symbol List Response.
57
Broker Application. Symbol List Response.
58
Using EXANTE FIX Wrapper
59
Links www.exante.eu support@exante.eu http://elato.se/minifix/ http://www.quickfixengine.org/ http://btobits.com/fixopaedia/fixdic44/index.html https://bitbucket.org/SergeyTroshin/exante-fix-sample
60
NEXT GENERATION PRIME BROKER Questions? Portomaso Business Tower, Level 7, ST. Julians, Malta info@exante.euinfo@exante.eu | st@exante.eu | www.exante.euwww.exante.eu
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.