310 likes | 339 Views
Financial Information Exchange (FIX). Keenan Gao, Yakai Huang, Amin Sabzivand, Haoran Wang, Mingjun Yao, Yuchen Zheng Advisor: Christopher Prouty January 2016. Presentation Outline. 1/23. What is FIX?.
E N D
Financial Information Exchange (FIX) Keenan Gao, Yakai Huang, Amin Sabzivand, Haoran Wang, Mingjun Yao, Yuchen Zheng Advisor: Christopher Prouty January 2016
Presentation Outline 1/23
What is FIX? • A standard messaging protocol to communicate trading information electronically between buy-side and sell-side institutions • FIX can be used to communicate between OTC counterparties or with exchanges. • FIX is used in some automated trading shops to execute orders generated by algorithm.
Who Uses FIX? • Winter 2012 Survey by TowerGroup revealed that: • 75% of buy-side and 80% of sell-side firms plan to expand their FIX usage to over 93% • Over 80% of buy-side firms, over 95% of sell-side firms surveyed currently support, or plan to support FIX for allocations • Over 75% of all exchanges surveyed supported a FIX interface, with the majority handling over 25% of their total trading volume via FIX
Why Do We Use FIX? • Technical Reasons • Delivers information in real-time • Provides platform and vendor independence • Eliminates proprietary interfaces and coding of multiple message formats which reduces amount of time to connect • Guarantees order message delivery • Supports data security (encryption) • Supports multiple currencies and instrument types • Allows for cost-effective connectivity
Why Do We Use FIX? • Business Reasons • Accommodates higher volumes • Widely adopted • Prepares firms for shortened settlement cycles • Enables front to back STP • Promotes liquidity through IOIs • Responds quickly to industry changes • Leverages the active participation of industry experts via working groups
How Does It Work? • A FIX message is a string consisting of a collection of “tag-value pairs” 8=FIX.4.2|9=130|35=D|34=659|49=BROKER04|56=REUTERS|52=20070123-19:09:43|38=1000|59=1|100=N|40=1|11=ORD10001|60=20070123-19:01:17|55=HPQ|54=1|21=2|10=004| • Delimiter: ‘|’, which is actually ASCII character code “1”. • Each tag is labeled by a number and has a specific definition, and each tag has an associated value. • Tag 8 is defined as “Begin String” and its associated value is FIX.4.2, the protocol version.
How Does It Work? • FIX is only a protocol, we need FIX engine to establish FIX connectivity and understand FIX messages. • The initiator “initiates” the FIX connection. • Acceptor waits for someone connect to it. • Both parties send and receive messages. Initiator (Client) Acceptor (Server) FIX message FIX Engine FIX Engine
What Do We Want to Do? • Send and Receive FIX Messages
What Do We Want to Do? • Connect to the Server Configuration File
What Do We Want to Do? • Cracking The Message • It parses the messages received from the server and then processes them accordingly. • To design a proper message cracker, we should identify the elements of the message. • Bid Price • Ask Price • Timestamp • Message Type • Message Sequence number
What Do We Want to Do? • Create a database and store extracted data into a .csv file • Analyze the data to identify movement pattern of the security's price • Design an optimal trading strategy based on the identified pattern
What Do We Want to Do? • Client Application Server Parsed Message Received from the Server Message Send to the Server Confirmation Message received from the Server
Data Collection • Format of .csv file: • How much data did we collect? • Over 30 simulations in four days • Total time: More than 200 cumulative hours of runtime • Total data points: Over 200,000 messages
Time Series Analysis • The time series acts like a “signal” with a repeating pattern • We can find the periodicity using signal processing methods
Fourier Analysis • Fourier decomposition decomposes the series into sine functions • Fast Fourier Transform converts a signal from its original domain (in this case, time) to a representation in the frequency domain • Frequency is around .066114 millihertz => period is 1,635 messages
Spectral Analysis • Spectral analysis analyzes the frequency of a signal • Power spectral density describes how power of a signal or time series is distributed over frequency • Eyeball the maximum amplitude and the corresponding frequency. Between 0.06 and 0.07 millihertz => period is ~1,600 messages
Brute Force Analysis We canfind thepoints at which the price hits a local minimum and maximum. This price pattern repeats at regular periods. The periodicity is roughly 1190 messages. Localmaximum Localminimum
Trading Strategy: KDJ • KDJ is a stochastic index • Uses several benchmarks to determine when the stock prices are at extreme values • Momentum indicator • Relative strength index • Moving average • Use these benchmarks to calculate K, D, and J • Buy when: K<20, D<20, J<0 • Sell when: K>80, D>80, J>100
Trading Strategy: MACD • Moving Average Convergence Divergence • Calculated by subtracting the 26-day exponentialmovingaverage(EMA)fromthe12-dayEMA • Reveal changes in the trend of a stock price • Strength • Direction • Momentum • Duration • Buy when MACD goes from positive to negative • Sell when MACD goes from negative to positive
Trading Strategy •  Stock price KDJ MACD
Things We Can Improve • Implement more trading strategies • Refine our analysis to find the exact period • Implement real world market data into our project
Things We Learned • The FIX protocol and how it works • Program design and implementing an interface in C# • Methods for analyzing a time series • Various trading strategies
Thanks for your attention. Questions?