Trade Classification Systems on RUB/USD data

UNIVERSITEIT GENT
GHENT UNIVERSITY
FACULTEIT ECONOMIE EN BEDRIJFSKUNDE
FACULTY OF ECONOMICS AND BUSINESS
ADMINISTRATION
ACADEMIC YEAR
2015 – 2016
Trade Classification Systems on
RUB/USD data
Masterproef voorgedragen tot het bekomen van de graad van
Master’s Dissertation submitted to obtain the degree of
Master of Science in Business Economics
Master of Science in Business Engineering
Dick D’Hoore
Under the guidance of
Prof. Dr. Michael Frömmel + Kevin Lampaert
UNIVERSITEIT GENT
GHENT UNIVERSITY
FACULTEIT ECONOMIE EN BEDRIJFSKUNDE
FACULTY OF ECONOMICS AND BUSINESS
ADMINISTRATION
ACADEMIC YEAR
2015 – 2016
Trade Classification Systems on
RUB/USD data
Masterproef voorgedragen tot het bekomen van de graad van
Master’s Dissertation submitted to obtain the degree of
Master of Science in Business Economics
Master of Science in Business Engineering
Dick D’Hoore
Under the guidance of
Prof. Dr. Michael Frömmel + Kevin Lampaert
PERMISSION
I declare that the contents of this master thesis may be consulted and/or
reproduced, provided the source is acknowledged.
Ondergetekende
verklaart
dat
de
inhoud
van
deze
geraadpleegd en/of gereproduceerd worden, mits bronvermelding.
Dick D’Hoore
masterproef
mag
“One of the funny things about the stock market is that every time one person buys, another
sells, and both think they are astute.”
-William Feather
ACKNOWLEDGEMENTS
This thesis concludes my five years at Ghent University and is written in order to obtain my
master’s degree in Business Engineering with a major in Finance. This is no mean feat and
therefore some gratitude is in place.
I would like to thank Prof. Dr. Frömmel for giving me the opportunity to get to delve deeper
into the fascinating world of the Foreign Exchange market, in which I have always had a
profound interest. After all, it truly affects people in countless subtle ways.
Further, my thanks go to Kevin Lampaert who has helped me tremendously by providing the
crucial dataset, helping me on my way with Matlab and giving useful feedback throughout the
years when necessary. Thibault Huysseune also deserves my gratitude for proof-reading this
thesis.
A special attention goes to the online Matlab community consisting of truly patient people who
are willing to spend their time educating others for free and help people like me grasp the
essence of Matlab. They are indispensable.
Finally, none of this would have been possible without the support of my parents, family,
friends and my girlfriend Victoria. They are my bedrock, they make everything worthwhile, they
made me the person I am today.
Dick D’Hoore
Ghent, May 2016
i
TABLE OF CONTENTS
ACKNOWLEDGEMENTS .......................................................................................................................................... I
TABLE OF CONTENTS ............................................................................................................................................. II
LIST OF ABBREVIATIONS ....................................................................................................................................... III
LIST OF FIGURES ................................................................................................................................................... IV
LIST OF TABLES ...................................................................................................................................................... V
NEDERLANDSTALIGE SAMENVATTING.................................................................................................................. VI
ABSTRACT ........................................................................................................................................................... VII
1.
INTRODUCTION ............................................................................................................................................ 1
2.
THE FOREIGN EXCHANGE MARKET ............................................................................................................... 3
2.1.
2.2.
2.3.
2.4.
3.
LITERATURE REVIEW ...................................................................................................................................10
3.1.
3.2.
4.
TICK RULE .................................................................................................................................................... 30
QUOTE RULE ................................................................................................................................................ 30
LEE AND READY (1991) RULE .......................................................................................................................... 31
ELLIS, MICHAELY AND O’HARA (2000) RULE ..................................................................................................... 31
CHAKRABARTY ET AL. (2007) MODIFIED EMO RULE ............................................................................................ 31
BULK VOLUME CLASSIFICATION RULE ................................................................................................................ 32
RESULTS ......................................................................................................................................................35
6.1.
6.2.
7.
DESCRIPTION OF THE DATA.............................................................................................................................. 26
METHODOLOGY ..........................................................................................................................................30
5.1.
5.2.
5.3.
5.4.
5.5.
5.6.
6.
MICROSTRUCTURE APPROACH ......................................................................................................................... 10
TRADE CLASSIFICATION SYSTEMS...................................................................................................................... 16
DATA ...........................................................................................................................................................26
4.1.
5.
OVERVIEW OF THE FOREIGN EXCHANGE MARKET ................................................................................................... 3
CHARACTERISTICS OF THE FOREIGN EXCHANGE MARKET.......................................................................................... 6
THE INSTITUTIONAL STRUCTURE OF THE FOREIGN EXCHANGE MARKET ....................................................................... 7
PLAYERS IN THE FOREIGN EXCHANGE MARKET....................................................................................................... 8
TRADE-BY-TRADE CLASSIFICATION .................................................................................................................... 35
BULK CLASSIFICATION..................................................................................................................................... 39
CONCLUSION...............................................................................................................................................43
BIBLIOGRAPHY ................................................................................................................................................... VIII
APPENDIX........................................................................................................................................................... XIII
TRADE-BY-TRADE CLASSIFICATION ................................................................................................................................... XIII
BULK CLASSIFICATION ................................................................................................................................................... XIX
ii
LIST OF ABBREVIATIONS
ASX
Australian Stock Exchange
B/A
Bid/Ask
BAR
Bulk Accuracy Ratio
BIS
Bank for International Settlements
BVC
Bulk Volume Classification Rule
CDF
Cumulative Distribution Function
CME
Chicago Mercantile Exchange
CPS
Chakrabarty, Pascual and Shkilko (2013)
DF
Degrees of Freedom
EBS
Electronic Brokerage System
ECN
Electronic Communication Network
ELO
Easley, Lopez de Prado and O’Hara (2013)
EMO
Ellis, Michaely and O'Hara (2000)
EUR
Euro
FX
Foreign Exchange
LR
Lee and Ready (1991)
MEMO
Chakrabarty et al. (2007) modified EMO
NASDAQ
National Association of Securities Dealers Automated Quotations
NYSE
New York Stock Exchange
QR
Quote Rule
RTR
Reverse Tick Rule
RUB
Russian Ruble
TCS
Trade Classification System
TORQ
Trades, Orders, Reports and Quotes
TR
Tick Rule
TWSE
Taiwan Stock Exchange
US
United States (of America)
USD
United States Dollar
iii
LIST OF FIGURES
Figure 1: Foreign Exchange market turnover by currency and currency pairs ............................... 5
Figure 2: Foreign Exchange market turnover by counterparty....................................................... 9
Figure 3: Nonagricultural export and nonoil import volumes, United States, 1980:1-1986:4 ..... 11
Figure 4: The real exchange value of the U.S. dollar, 1975:1-1987:1 ........................................... 11
Figure 5: The two stages of information processing. Source: Lyons (2001) ................................. 15
Figure 6: Tick rule. Source: Odders-White (2000) ......................................................................... 18
Figure 7: Quote rule. Source: Odders-White (2000) ..................................................................... 19
Figure 8: Chakrabarty et al. (2007) modified EMO rule. Source: Chakrabarty et al. (2007) ......... 22
Figure 9: Overview of the mean, maximum and minimum exchange rate on a quarterly basis . 28
Figure 10: Overview of the amount of trades on a quarterly basis .............................................. 28
Figure 11: Overview of the standard deviation on a quarterly basis ............................................ 29
Figure 12: Overview of the average bid/ask spread on a quarterly basis .................................... 29
iv
LIST OF TABLES
Table 1: Global Foreign Exchange market turnover ....................................................................... 4
Table 2: Overview of all discussed literature on trade-by-trade TCS ........................................... 23
Table 3: A sample of the available USD/RUB data ........................................................................ 26
Table 4: Descriptive statistics of the USD/RUB exchange rate on an annual basis ...................... 27
Table 5: Location and nature of trades in the sample .................................................................. 36
Table 6: General performance of trade-by-trade TCS .................................................................. 36
Table 7: Yearly performance of trade-by-trade TCS ..................................................................... 37
Table 8: Location and nature of the trades on a yearly basis ....................................................... 38
Table 9: Performance of TCS relative to the location of the trades ............................................. 39
Table 10: The influence of trade bar size on BVC with a Student’s t distribution (df = 0.25) ...... 40
Table 11: Robustness test of Student's t distribution for different values of df (horizontally) and
different trade bar size (vertically) ................................................................................................ 40
Table 12: The influence of trade bar size on BVC using a normal distribution ............................. 41
Table 13: The effect of overnight returns on BVC: with (BVCw) and without (BVCwo) overnight
returns ........................................................................................................................................... 41
Table 14: Computational time (s) of different TCS in Matlab ....................................................... 42
Table 15: Comparison of BVC to aggregated TCS ......................................................................... 42
v
NEDERLANDSTALIGE SAMENVATTING
Het was Lyons (2001) die een microstructuur benadering voorstelde en order flow
introduceerde als de belangrijkste driver voor het totstandkoming van wisselkoersen. De focus
van deze benadering is verspreide informatie en hoe informatie van dit type wordt
bijeengebracht in de marktplaats. Weten of de initiator van een transactie koopt of verkoopt is
van cruciaal belang voor de uitkomst van studies in dit domein. Hoewel al heel veel onderzoek
is gevoerd naar de accuratesse van systemen die transacties classificeren (trade classification
systems), werd dit slechts zelden toegepast op de valutamarkt en zelfs dan niet exhaustief.
Deze masterproef probeert deze lacune op te vullen door de huidige literatuur te doorzoeken
naar de belangrijkste trade classification systems en hun toepasbaarheid en accuratesse na te
gaan op de USD/RUB wisselkoersmarkt. De gevonden accuraatheden zijn in lijn met de
bestaande literatuur (46.42%, 70.58%, 85.78%, 86.10% en 86.26% voor de RTR, TR, QR, LR regel
en EMO regel respectievelijk). De meest recente MEMO regel presteert het best met 86.85%.
Verder worden de belangrijkste vertekeningen die in de literatuur naar voor werden gebracht
ook in deze studie gevonden, in het bijzonder een asymmetrie tussen het classificeren van
initiators die kopen en initiators die verkopen. Meer recent hebben Easley, Lopez de Prado and
O’Hara (2013) de Bulk Volume Classification voorgesteld. Dit is een trade classification system
dat de transacties classificeert in bulk, in de plaats van transactie-per-transactie. De resultaten
hier zijn voornamelijk vergelijkbaar met deze van ELO. Voor groepen bestaande uit 250, 500 en
1000 transacties worden accuraatheden van 88.72%, 89.58% en 90.10% respectievelijk
gevonden. Verder blijkt het gebruikmaken van een t-verdeling met 0.25 vrijheidsgraden veel
betere resultaten op te leveren dan de normale verdeling zoals die werd gebruikt door
Chakrabarty, Pascual and Shkilko (2013). Ook blijkt het verwijderen van opbrengsten die
gerealiseerd werden gedurende de nacht niet substantieel beter voor de accuratesse. BVC zorgt
voor aanzienlijke tijdswinsten, maar dit wordt gedeeltelijk tenietgedaan als de beschikbare data
niet reeds gecomprimeerd is. Uiteindelijk presteert BVC niet beter ten opzichte van de huidige
transactie-per-transactie trade classification systems. BVC heeft zeker zijn verdiensten voor
specifieke toepassingen die uitstekend in bulk werken en verdient dus ook een meer
gedetailleerde bestudering. Echter, voor het meeste onderzoek naar microstructuur blijven de
bestaande trade classification systems uitstekende keuzes.
vi
ABSTRACT
This study searches the prevalent literature for existing trade classification systems and
assesses their applicability and accuracy on the USD/RUB currency market. The accuracies
found were in line with existing literature (46.42%, 70.58%, 85.78%, 86.10% and 86.26% for the
RTR, TR, QR, LR rule and EMO rule respectively). The most recent MEMO rule performs best
with 86.85% of the trades classified correctly. Further, the most important biases encountered
in literature were found to be present in this study as well, most notably the strong buy/sell
asymmetry with buyer initiated trades clearly underperforming. Moreover, the Bulk Volume
Classification, a relatively new TCS that handles data in bulk, is studied. For bars comprising
250, 500 and 1000 trades, an accuracy of 88.72%, 89.58% and 90.10% was found respectively,
comparable to those of the original study. However, BVC is not better performing than
aggregating trade-by-trade across the board. Using a Student’s t-distribution with 0.25 degrees
of freedom and not excluding overnight returns was found to be optimal. Time savings when
using BVC are considerable, but less so when the available data is not yet vendor-compressed.
Key words: foreign exchange market, microstructure approach, trade classification systems
vii
1. INTRODUCTION
The Foreign Exchange Market has been very extensively researched in the financial literature. It
allures many researchers as its workings are so interwoven with the everyday lives of many
people without this being very transparent. Its importance cannot be overstated. King, Osler
and Rime (2011, p.2) state that “They affect output and employment through real exchange
rates. They affect inflation through the cost of imports and commodity prices. They affect
international capital flows through the risks and returns of different assets. Exchange rates are
justifiably a major focus for policymakers, the public, and of course the media.” As such, it is not
surprising that trying to understand what really drives exchange rates has been a major goal for
many financial researchers.
It is therefore very intriguing that when Meese and Rogoff (1983a, 1983b) disproved the
reigning macroeconomic models in explaining the exchange rate changes at short horizons,
many researchers were baffled. It was Lyons (2001) who proposed a microstructure approach
which had already been documented in the field of microstructure finance. The focus of the
approach is dispersed information and how information of this type is aggregated in the
marketplace. This is a major difference in regard to the assumption of macro models. Originally,
that information about variables like money demands, risk preferences and inflation was either
available symmetric economy-wide or asymmetrically assigned but to a single player, i.e. the
central bank. This is where order flow and bid/ask spreads step in, the ‘hallmarks’ of the micro
approach.
Order flow is the variable that conveys information in the micro approach. It is defined by Lyons
(2004, p.1) as “the cumulative flow of signed transactions, where each transaction is signed
positively or negatively depending on whether the initiator of the transaction (the non-quoting
counterparty) is buying or selling, respectively.” He sees order flow as the most important driver
in exchange-rate economics. The bid/ask spread is the gap between the bid and the ask prices
of a stock or other security, which is an important indicator of the liquidity in a market (Amihud
and Mendelson, 1986).
1
From the definition of order flow, it is clear that knowing whether the initiator of a transaction
is buying or selling is of crucial importance to the outcome of these studies. For the estimation
of the components of the bid-ask spread, Huang and Stoll (1997) used methods based on a
trade indicator variable. Lightfoot, Martin, Petersen and Sirri (2003) did the same for the
accurate calculation of effective spreads. Other examples are testing for the presence of
informed traders (Easley, Kiefer, O’Hara and Paperman, 1996), measuring the information
content of trades (Hasbrouck, 1991), etc.
Unfortunately, most data sets do not contain the trade direction and inferring who initiated the
trade has always been complicated, even more so in today’s high frequency settings. That is
why many researchers use trade classification systems to determine who is buying and who is
selling. Although a great deal of research has been conducted in the efficacy of trade
classification systems in stock markets, it has not been often applied on the Foreign Exchange
market and if so, not exhaustively.
This thesis tries to fill this gap by searching the prevalent literature for the most important
trade classification systems and assess their applicability and accuracy on the USD/RUB
currency market. Analyzing the accuracy of the trade classification systems is of obvious
importance, as this accuracy determines the validity of the empirical research that relies on it.
The remainder of this thesis is organized as follows. Section 3 concisely explains the workings of
the Foreign Exchange market. For readers familiar with this field, this can easily be bypassed. In
Section 4, a literature study is conducted on the microstructure approach to the Foreign
Exchange market. This approach sparked the need for trade classification systems, which are
then further discussed in detail. Section 5 describes the USD/RUB data used, while Section 6
discusses the followed methodology for the trade classification systems. In Section 7, the
results of the empirical study are presented and discussed. Finally, the thesis is concluded in
Section 8.
2
2. THE FOREIGN EXCHANGE MARKET
The Foreign Exchange Market has been around for a very long time. When people stopped
bartering in favor of money, some occasions occurred wherein people initiated trades with
parties holding a different currency (Davies, 1994). Although very rudimentary in the beginning,
this necessity for some sort of foreign exchange made it the oldest financial market in the
world. It lies at the roots of the globalized world as we know it today. Many countries have
flourished in the past due to their foreign trade1 and more recently, international trade has
doubled in just about 10 years, reaching record levels2. This trend is not likely to diminish, as
technology advances rapidly and people are ever more connected to each other.
It is not my intention to give a full analysis of the Foreign Exchange market, also referred to as
the foreign exchange (FX). For that, referring to Lyons (2001) grants the interested reader a
very detailed overview of the FX market. This will be my reference work3, of which the most
important features will be highlighted.
2.1. OVERVIEW OF THE FOREIGN EXCHANGE MARKET
Market-wide volume data in foreign exchange is very hard to acquire, unlike in equity markets.
Every three years, however, individual central banks survey their financial institutions regarding
FX trading activity. This is done for one month, typically April. Central banks and other
authorities in 53 jurisdictions participated in the 2013 Triennial Survey.
The Bank for International Settlements (2013) reported that trading in FX markets averaged
$5.3 trillion per day in April 2013, continuing the growth pattern as observed in previous years
(up from $4.0 trillion in April 2010 and $3.3 trillion in April 2007). It remains by far the largest
1
The Dutch Golden Age being a prime example. It was a period in Dutch history in which it had one of the
most influential economy in the world. This was largely attributable to the Dutch East India Company,
which was a chartered company. Some say it was the first multinational in the world.
2
Total exports in the world has risen from €6.5 trillion in 2003 to €13.5 trillion euro in 2013, even though
international trade took a large hit due to the financial crisis of 2007-2008.
3
So unless otherwise specified, Lyons (2001) has been used as a reference.
3
financial market in the world. The most traded instruments continue to be spot transactions
and FX swaps, representing 80% of total turnover (see Table 1).
As a side note, our data solely comprises spot transactions, which is the only instrument being
used in the microstructure approach. It seems that spot transactions only make up 38% of
global FX turnover. However, FX swaps have no order flow consequences4 in the FX market.
This stems from the fact that two orders in an FX swap are of equal size but opposite sign, so
the net order flow impact is zero. This contract is a means of locking in an interest differential
(whether to hedge or to speculate) and thus only impacts relative short-term interest rates
instead of the FX market5. This means that the spot market accounts for about 66% of the
transaction activity in the FX market and is thus righteously the main focus of research. One
should nonetheless keep the other relevant instruments in mind.
T A B L E 1 : G L O B A L FO R E I G N E X C H AN G E M A R K E T T U R N O V E R
4
5
For a definition of order flow, refer to the introduction.
For more detailed information on the FX instruments, see Dun and Bradford (2006).
4
The US dollar largely remained the most important currency in the world, being on one side of
87% of all FX trades (see Figure 1). On second place stood the euro, although its share fell to
33% from 39% the last survey, mostly due to the euro area sovereign debt crisis in 2010 (BIS,
2010). If we take a closer look at the ruble, we note that it has increased its share in global FX
trading to 1.6% from 0.9% between 2010 and 2013. The RUB-USD currency pair now accounts
for 1.5% of FX market turnover, ranking 12th in the world (BIS, 2013).
F I G U R E 1 : F O R E I G N E X C H A N G E M AR K E T T U R NO V E R B Y C U R R E NC Y A ND C U R R E N C Y P A I R S
Furthermore, it is noteworthy that 71% of foreign exchange trading was intermediated in the
United Kingdom, the United States, Singapore and Japan, whereas this was 66% in 2010 and
5
following a rising trend. This means that trading is increasingly concentrated in the largest
financial centers, resembling the consolidation in the stock markets (BIS, 2013).
To conclude, the widespread use of electronic trading in FX markets cannot be neglected. It can
reduce the costs of order execution significantly, due to lower operating costs for example, as
well as significant liquidity advantages. The latter arises from the greater transparency of
electronic trading systems when compared with systems relying on human intermediation. As
far back as in 1987, Reuters launched the first electronic system that enabled dealers to trade
via chat messages instead of over the phone or through an intercom system. Later, Electronic
Broking Services (EBS) arrived to compete with the then launched electronic brokerage system
of Reuters. These systems fulfilled the same function as traditional voice brokers, but do so
electronically. Today, these systems are still operational (although updated), together with a
plethora of other electronic communication networks (ECN) (Rime, 2003, pp. 469-501). Not all
trades occur via electronic trading systems as they are not preferable for all investors.
Nevertheless, in the 2013 Triennial Survey conducted in the US by the Federal Reserve Bank of
New York, a 74% market share of spot turnover being conducted via electronic methods was
reported.
2.2. CHARACTERISTICS OF THE FOREIGN EXCHANGE MARKET
Three characteristics have been proposed by Lyons (2001) to describe the distinct character of
the FX market in comparison to the other financial markets. These are:
1) High transaction volume
2) Segmentation: a two-tier structure
3) Low transparency
The high transaction volume has been discussed and illustrated above. One other explanation is
the so called ‘hot potato trading’ illustrated by Lyons (1997). In short, the term refers to the
repeated passing of inventory imbalances between dealers. This is also demonstrated in the
next section with the high amount of inter-dealer trades. The segmentation will be discussed
below, when explaining the difference between the customer market and the interbank market
6
(dealers and brokers). Transparency is the degree to which one has a clear view of the different
transactions that take place between the participants in a market (Lyons, 2001). Transparency
in markets, i.e. how much order flow can be observed, is an important characteristic and is
commonly enforced by law. From a theoretical perspective, order flow is quite important as it
conveys information about the underlying fundamentals. This improves the amount of
information reflected in the prices. The Foreign Exchange market, however, has no disclosure
requirement which implies that not all trades are observable. Furthermore, as it is a
decentralized multiple dealer market (see next section), trades are not executed centrally and
this further restricts the ability to have an overview of all the transactions that take place.
2.3. THE INSTITUTIONAL STRUCTURE OF THE FOREIGN EXCHANGE MARKET
Before delving deeper into the institutional structure of the Foreign Exchange market, it would
be wise to discuss the three basic institutional forms of which market structures are made of.
These forms are:
1) Auction markets
2) Single dealer markets
3) Multiple dealer markets
On an auction market, participants can choose to place both market orders and limit orders.
Placing a market order means to demand immediate execution at the best available price, while
limit orders are only executed if a certain price has been reached. There are no dealers, so the
most competitive limit orders make up the best available bid and ask price. These limit orders
are collected in a limit order book.
In a single dealer market, a lone dealer is present who quotes bid and ask prices for whom he is
willing to trade. These prices are thus consequently the best available prices and only market
orders are considered here. This also implies that the dealer commits himself to accept any
trade at the quote prices.
7
Multiple dealer markets are separated in centralized and decentralized markets. For both
markets, the multiple dealers induce competition, instead of relying on limit orders e.g. in
auction markets. The centralized multiple dealer market consolidates the quoted prices at a
single location or on a single screen (e.g. Nasdaq in the US). Not so in a decentralized multiple
dealer market. Some degree of fragmentation results in not all dealer quotes being observable.
As a very important consequence, trades happening at the same time can be executed at
different prices.
In practice, these basic institutional forms are further refined and combined into hybrid
structures. The often cited example is the New York Stock Exchange (NYSE) (e.g. Huang and
Stoll, 1995). The NYSE combines an auction market with a single dealer market. For each stock
on the NYSE, a sole specialist acts as a market maker in that stock. He collects customer limit
orders in a limit order book. Market orders are matched with these limit orders, indicating that
this corresponds with an auction market. However, he can also “step in front of the limit order
book”, meaning that he can execute the trade himself if he offers a better price, becoming a
single dealer market in this case. In a sense, he competes with the limit order book, severely
limiting the possibility of using monopoly power. This is why pure single dealer markets are
seldom found.
The Foreign Exchange market is a clear example of a decentralized multiple dealer market. It is
not possible to see all market prices on one screen, nor do dealers come together in one
physical place to trade. It is thus very different than aforementioned equity markets. The
reason for this increased complexity can be found in the diffusion of customers all over the
world and banks wanting to offer a local solution. Perhaps even more important is the fact that
the assets being traded on the FX market all relate to currencies, which are by definition
geographically scattered.
2.4. PLAYERS IN THE FOREIGN EXCHANGE MARKET
Before discussing the characteristics of the FX market, it would be useful to give a short
overview of the parties involved in this market. According to Lyons (2001), the parties are
dealers, brokers and customers. Dealers work for banks and provide prices to both customer
8
and other dealers. For the largest spot markets, only a single currency pair is traded per dealer.
Brokers6 provide, as matchmakers, a degree of centralization by gathering prices of different
dealers and communicating these to all dealers. The reason why dealers are willing to pay the
brokers a fee is the offered anonymity before trades are executed, as well as a much larger
exposure when compared to directly contacting other dealers. Customers are all end users of
the products and can be both non-financial institutions (e.g. big importing and exporting
companies) and financial institutions.
If we look at the FX market turnover by specific counterparty as shown in Figure 2 (BIS, 2013), it
is clear how important the ‘other financial institutions’ have become, grabbing a 53% market
share. This category includes the smaller banks that do not act as dealers, hedge funds and
institutional investors, among others. Nevertheless, inter-dealer trading remains very important
with a market share of 39%, in contrast to the relatively limited importance of non-financial
institutions of only 9%.
F I G U R E 2 : F O R E I G N E X C H A NG E M AR K E T T U R NO V E R B Y C O U NT E R P AR T Y
6
Brokers in FX markets do not trade for themselves, in contrast to brokers in equity markets.
9
3. LITERATURE REVIEW
3.1. MICROSTRUCTURE APPROACH
Before discussing the microstructure approach in more detail, it is helpful to first take a look at
the history of earlier approaches that attempted to explain the workings of the Foreign
Exchange market. According to Lyons (2001), there have been three approaches to the FX
market: the goods market approach, the asset market approach and the microstructure
approach. The dominant approach in determining exchange rates up until the 1970s was the
goods market approach7. This was rather intuitive, as the purchases and sales of goods were
seen as the main drivers for the demand in currencies. If a country increased its exports, foreign
demand for domestic currency is increased to pay for these goods. If that country increased its
imports, domestic demand for foreign currency is increased, leading to a greater supply of
domestic currency. This simply implies that countries experiencing trade deficits see their
currency depreciated and vice versa. Despite this approach’s appeal, the data tell another story.
Krugman, Baldwin, Bosworth and Hooper (1987) look at the persistence of the United States’
trade deficit in accordance with the strong appreciation and depreciation of the US dollar from
1975 to 1985. Refer to this paper for more information about the used data in the figures
below. It is clear that the US dollar trade balances8 are virtually uncorrelated with exchange
rate movements. This should come as no surprise, as the trade in goods and services accounts
for only a small share of currency trading.
7
Another approach is the flow approach, which is a variant of this approach. Currency demand is also driven by
capital accounts, in addition to the goods flows. All other hypotheses are similar.
8
The trade balance is simply put the difference between a country’s imports and its exports.
10
F I G U R E 3 : N O N A G R I C U L T U R A L E X P O R T A ND NO NO I L I M P O R T V O L U M E S , U NI T E D ST AT E S , 1 9 8 0 : 1 1986:4
F I G U R E 4 : T H E R E A L E X C H AN G E V AL U E O F T H E U . S . D O L L AR , 1 9 7 5 : 1 - 1 9 8 7 : 1
11
In the 1970s, the asset market approach expanded the earlier approach by recognizing
purchases and sales of assets (together with goods) as the driver for currency demand. This
implied a speculative perspective due to the dependence of the return of the foreign asset on
the currency movements. Exchange rates were then modeled as efficient in that all publicly
available information was incorporated. No excess returns could thus be made with such
information9. Dornbusch (1980, p.202) amalgamated the body of knowledge of the 1950s,
1960s and 1970s and made it clear that “this paper brings a great deal of new understanding
yet leaves many old questions still unanswered as we start the 1980s”. This abruptly changed
when Meese and Rogoff (1983a, 1983b) disproved the empirical standard exchange rate
models which embodied the current knowledge in explaining the exchange rate changes at
short horizons. These models failed to forecast major-currency exchange rates better than a
simple “no change” model, even with the use of macro information that was amassed over the
forecasting period. Ten years later, this analysis was not yet convincingly explained or
overturned as Frankel and Rose (1995) wrote in their survey. Taylor (1995) found that the
macroeconomic fundamentals cannot solely prove the evolution of the exchange rate,
however, they remain important in setting the parameters within which the exchange rate
moves. Here he noted that he emerging literature on Foreign Exchange market microstructure
seemed especially promising.
At that moment, two other alternatives had been researched. The first alternative was that
extraneous variables, typically modeled as rational speculative bubbles, had to be included as
exchange rate determinants (Meese and Evans, 1986, among others). This line of thought was
found unconvincing by Flood and Hodrick (1990). Most of the rejections of the null hypothesis
(no bubbles present) could well be caused by model misspecification and not solely by actual
bubbles. The second alternative was irrationality. This was researched by Dominguez (1986),
Frankel and Froot (1987), Hau (1998) and many others, but was also found unconvincing. Even
if a possible presence of irrationality was found, this does not automatically make it account for
exchange rate variability. Also, not only was there no real conclusive evidence for this second
alternative, many economists were a priori reluctant to accept irrationality.
9
For more information on this efficient market hypothesis, see the pioneering work of Fama (1970).
12
This is when Lyons (2001) proposed a microstructure approach, which had already been
documented in the field of microstructure finance and which is being followed to this date.
Market microstructure is described as the study of how prices of assets are formed by trying to
discover the underlying formation process whilst taking into account trading rules. The
microstructure approach does not compete with the asset market approach. Rather, it
enhances the latter by relaxing three assumptions which are seen as the most stringent and
that affected prices.
1) Information: not all relevant information is publicly available.
2) Players: not all market participants are equal.
3) Institutions: not all trading mechanisms are equal.
The first characteristic is deemed the most important by Lyons. Traders at banks often see
trades who are not visible for other traders. This private information can play an important part
in forecasting subsequent exchange rates. The market players affect rates in different ways by
interpreting the same information differently or by exhibiting different market behavior
depending on the role being played (e.g. speculators versus hedgers). The dependence of the
price evolution on the institutional structure in place is obvious. In markets with a low
transparency (as the FX market), beliefs regarding appropriate prices are generally updated
much slower. Looking at these three characteristics, Lyons describes the microstructure
approach as “taking an in-the-trenches, trading-room approach” (Lyons, 2001, p.3).
Two important elements that are introduced by the microstructure approach are the order flow
and the bid/ask spread10. These variables are seen as the hallmarks and thus help to define
microstructure.
The bid/ask spread receives attention for several reasons. Firstly, b/a spreads are popular in the
scientific public because datasets usually consist of bid and ask prices. This makes it very easy
10
Order flow and b/a roughly resembles quantity and price, so they can be considered as old mainsprings of
economics after all.
13
to calculate the relevant b/a spreads. In contrast, order flow is private information to individual
dealers. Secondly, practitioners are very much focused on the management of trading costs,
which are considered to be covered by b/a spreads. Thirdly, different trading mechanisms were
historically assumed not to affect prices in models based on rational expectations i.e. the
models used in the goods market approach and the asset market approach. This assumption no
longer holds in the microstructure approach and thus the question arises on how trading
mechanisms affect prices and how they influence the b/a spread. The study of b/a spreads is
seen as a subfield in literature.
Order flow is considered as the single most important element by Lyons. It differs from
transaction volume in that it is signed. For example, a dealer receives a buy order in USD for
100 million RUB as well as a sell order in USD for 50 million RUB. Total transaction volume
equals 150 million RUB. However, the order flow equals +50 million RUB. This means that there
is a net buying pressure over this examined period. Buy orders get positive signs, while sell
orders get negative signs. Signing should clearly be considered from the perspective of the
initiating party. Sometimes there are no dealers, making recognition of the initiating party more
difficult. In this case, the initiating side is the party having placed the market order that arrives
to clear the limit orders (see the next section for more detail about trade initiation). The
concept of order flow is extensively used in literature to explain exchange rates. This is referred
to as the ‘order flow model’. To clarify this model, the following Figure 5 can be used to show
the role of order flow as transmission mechanism of information. Non-dealers watch, analyze
and learn about fundamentals from a large variety of sources. They convey this information to
dealers by trading on the Foreign Exchange market and consequently creating order flow.
These dealers will in turn interpret this order flow and determine how to adjust the exchange
rate. It should be noted that this order flow provides the dealers with private information.
14
F I G U R E 5 : T H E T W O S T A G E S O F I N FO R M AT I O N P R O C E S SI NG . SO U R C E : L Y O NS ( 2 0 0 1 )
Of course, some uninformative trades may be mixed with the informative trades. This increases
the difficulty for the dealers to adequately interpret the order flow. The dependency on order
flow is explained by the fact that not all FX information received is publicly known. Thus, the
conclusion is that exchange rates are not wholly determined by public news. This explains the
great value placed upon order flow in literature.
As mentioned in the introduction, it is clear that knowing whether the initiator of a transaction
is buying or selling is of crucial importance to the outcome of these studies. Unfortunately,
most data sets do not contain the trade direction and inferring who initiated the trade has
always been complicated, even more so in today’s high frequency settings. That is why many
researchers use trade classification systems to determine who is buying and who is selling.
Although a great deal of research was conducted in the efficacy of trade classification systems
in stock markets, it has not been applied often on the Foreign Exchange market and if so, not
exhaustively.
15
3.2. TRADE CLASSIFICATION SYSTEMS
The goal of trade classification systems is to correctly determine the initiator of the transaction.
The accuracy is defined as the percentage of correct trade classifications. A formal definition of
the term trade initiator is primordial if one wants to assess the accuracy of trade classification
systems. An explicit definition of the term ‘initiator’ is nonetheless hardly ever given in
literature. Odders-White (2000) distinguishes two types of definitions in her New York Stock
Exchange study with TORQ data.
The immediacy definition sees traders who demand immediate execution as the initiators.
Traders who placed market orders or limit orders at the quotes, which essentially is the same,
are thus tagged as initiators, while traders who placed limit orders are viewed as non-initiators
or passive suppliers of liquidity. This is evidently not possible when crossed market orders are
executed11, when limit orders are matched with other limit orders, and when a market order is
stopped12. Unfortunately, these occur quite frequently13. A possibility here would be to
eliminate these transactions from the study. Lee and Radhakrishna (1996) used the same data
and tried this by only focusing on transactions between ‘clearly active’ traders and ‘clearly
passive traders’. The big issue here is that if we actually knew the active and passive side, using
a TCS would clearly be irrelevant. Moreover, studies that use a TCS apply it to all transactions
and not to a selected subset.
The chronological definition is a broader definition. The trader, both buying or selling, who
placed his or her order last is the initiator. These two definitions are similar in many cases, as
the initiator always causes the transaction to occur. However, the latter can certainly be
applied with crossed market orders, limit order matching limit order and stopped market
orders. The placer of the last placed order is always the initiator who determines the price
and/or timing of the transaction. This definition is often used for markets where no market
maker or specialist is present to provide liquidity.
11
When market buy and sell orders exist at the same time, when there is a bid price above the lowest ask price, or
a combination thereof.
12
The NYSE specialist guarantees execution at prevailing quote, while he attempts to execute the order at a better
price. This can be used to sample the future order flow before making a commitment to trade (see Ready (1999)).
13
For the study by Lee and Radhakrisna (1996), this is respectively 12%, 17% and 29%.
16
The research concerning trade classification algorithms or trade classification systems is not
very wide-ranging, nor is it very old. Lee and Ready (1991) were the first to recognize the
importance of being able to discern whether a trade was a buy order or a sell order. They
noticed that Hasbrouck (1988) and Blume, MacKinlay and Terker (1989) among others used two
different and commonly used TCS to classify trades. The former tested for asymmetric
information and inventory-control theories of specialist behavior, while the latter tested the
relation between order imbalances and stock price movements, both in analyses of time series
and cross-sections. It should be noted that the use of TCS is not restricted solely to
microstructure studies14. However, none of these studies did take into account the efficacy of
the used TCS. Including misclassified transactions in a study possibly causes noise or bias, which
are two different types of problems. Noise occurs when random error is added to the data,
irrespective of type of trade (e.g. a small transaction on a Monday morning and a large
transaction on a Friday evening are equally likely to be misclassified). If the probability of
misclassification of a specific type of trade is higher than others, systematic error is added to
the data which may ultimately lead to a bias in the outcome. This is why the first assessment of
the then prevailing TCS by Lee and Ready (1991) can be seen as pioneering work. In this period
of time, the intraday trade and quote data got more and more accessible to researchers,
revealing new prospects for financial market research. The earliest TCS mentioned were the
Tick rule (TR) and the Quote rule (QR).
The Tick rule is the simplest TCS, as it only requires transaction data. It is based on the price
movements relative to the preceding trades. If the current price is higher (an uptick), then the
trade is classified as a buy. If the current price is lower (a downtick), the trade is classified as a
sell. In the special case that no price change occurs, it is the last prior uptick or downtick that is
taken into consideration. The main disadvantage (or advantage, as it depends on the available
data) of the TR, and the hereafter mentioned Reverse Tick rule, is that they use less information
than the QR as quote-based information is not applied.
14
Lee (1992) used the LR algorithm to investigate the intraday behavior of directional volume surrounding
earnings announcements, while Schultz and Zaman (1994) examined the aftermarket support and underpricing of
initial public offerings, among others.
17
F I G U R E 6 : T I C K R U L E . SO U R C E : O D D E R S - W H I T E ( 2 0 0 0 )
Aitkin and Frino (1996) only find a 75% success rate for the TR on Australian data, much less
than they expected when compared to Lee and Ready (1991)’s study. The automated Australian
Stock Exchange (ASX) is an order-matching system without a prominent role for a marketmaker/specialist. Trades can only occur at bid or ask prices, making it impossible to study the
accuracy of the LR algorithm. Having no true trade initiator available, they use the QR as a
proxy. They mimicked the LR study and expressed doubts about the robustness of their results
in different markets. On a side note, they noted an accuracy in excess of 90% when zero ticks
were excluded. Also, further analysis provided evidence that a volatile or trending market
decreases the accuracy of the TR and that it is less likely to accurately classify seller initiated
trades and small buyer initiated trades.
Omrane and Welch (2013) recently studied the accuracy of the TR on EUR/USD Hotspot data,
which is very similar to our USD/RUB data. They have to deal, however, with asynchronous
trade and quote records and therefore they find a greater allure in solely using the TR. An
accuracy of 66% was found, which falls to 60% for zero ticks with a disturbing asymmetry, the
opposite of Aitkin and Frino (1996), between seller and buyer initiated trades (resp. 70% and
61%). Also, they noticed an excessively low accuracy for buyer initiated trades in down quote
changes.
A variation on the Tick rule is the Reverse Tick rule (RTR). The current price is compared to the
following price, instead of the preceding price. If the following price is higher (lower), the
current trade is classified as a sell (buy). These two rules yield the same results when the price
18
follows a price reversal pattern (see Figure 4). It is when the price moves in the same direction
that an opposite classification happens. They thus only differ during periods of sequential price
movements in the same direction. The effectiveness of this rule is generally questioned and, as
a consequence, seldom used.
The Quote rule (QR) uses more information as it obviously needs quote data. Transactions
above the spread midpoint, entailing those at the ask, are classified as buys. Transactions below
the spread midpoint, entailing those at the bid, are classified as sells. Transactions at the spread
midpoint remain unclassified. This is the main disadvantage of the QR.
FIGURE 7: QUOTE RULE. SOURCE: ODDERS -WHITE (2000)
Lee and Ready also proposed a ‘5 second rule’. In that time, quotes were updated on a
computer inside the specialist’s post, while the trade was typically recorded by the specialist’s
clerk. It could occur that the quotes were updated faster than the transactions that triggered
them. This could lead to an incorrect classification and it is thus unsuitable to compare the
quotes and trades. They demonstrated that if the execution prices are compared to quotes
reported at least 5 seconds before the trade was reported, superior results were achieved.
Lee and Ready further contributed to literature by proposing a combination of these two
methods to be used. Lee and Ready (1991) rule (LR) uses the quote rule to classify all possible
transactions. For the midpoint trades, the tick rule is used. This was based on the observation
19
that the QR was more precise in classifying the trades than the TR. However, the latter
classified 85% of trades on the spread midpoint correctly. This study was methodologically
incredibly valuable for researchers in the field of market microstructure, and financial research
in general. This also explains its widespread use up until now.
Lee and Radhakrishna (2000) assess the accuracy of the LR rule in distinguishing trade direction
using a unique dataset (TORQ) of NYSE stocks. They found that up to 40% of reported trades
could not be unambiguously classified as either buyer or seller initiated due to complexities in
the NYSE auction process. However, an overall 93% agreement between the actual order and
LR's algorithmic inference was found for those that could be classified.
Odders-White (2000) also uses the TORQ database of NYSE stocks to directly test the accuracy
of the LR rule. She finds a 85% accuracy for the LR rule, which is higher than the Tick rule. The
lower accuracy in comparison to Lee and Radhakrishna (2000) is attributed to their omission of
trades that are misclassified more often. Furthermore, she acknowledges a systematic
misclassification of small trades, trades at the midpoint of the b/a spread and trades in large or
frequently traded stocks. She concludes that eliminating these trades at the midpoint of the b/a
spread could be effective in increasing accuracy for many applications. Moreover, she
emphasizes the negative effects of inaccurate trade classifications in various empirical studies,
e.g. studies on order processing costs.
Finucane (2000) uses the TORQ database as well. He compares actual trade direction to the
direction predicted by the TR, RTR and the LR rule and finds near equal accuracies for both TR
and LR (83.0% and 84.0%). The performance of both rules was, however, worse than Finucane
expected based on the results of Lee and Ready (1991), but in line with the findings of OddersWhite and better than the results of Aitken and Frino (1996) for the Australian Stock Exchange
and those of Ellis, Michaely, and O'Hara (2000) for Nasdaq trades. The RTR rule continuously
underperformed (73.0%) and is discouraged for further use. He also found substantial lower
accuracies for zero tick trades in line with the other research. He notes, however, that both TR
and LR perform much less on zero tick trades. Zero ticks were expected to be the reason for the
lower accuracy of the TR. The LR rule should then not be affected as previous prices are only
20
used for midpoint trades. As this is not the case, this leads him to conclude that trades
happening on a zero tick is in fact a proxy for another more fundamental factor. Finally, both
rules are shown to be providing biased estimates of effective spreads and signed volume, with
a higher bias for the LR rule.
Theissen (2001) analyzes the accuracy of the LR rule and the TR for a sample taken from the
Frankfurt Stock Exchange, which is the first use of data sampled from a European market. The
Makler, acting as a specialist, is the passive supplier of liquidity and this is how the true trade
initiator can be classified. The LR rule correctly classifies 72.8% of the transaction, while the TR
performs almost equally well with 72.2%. The accuracy of trades at the midpoint of the b/a
spread is again rather limited, as well as trades happening on zero ticks. As in previous studies,
he also warns for possible systematical biases in the results of empirical microstructure
research.
Ellis, Michaely, and O'Hara (2000) use Nasdaq data, with true trade initiator available, to
examine the validity of multiple TCS. For respectively the QR, TR and LR rule, accuracies of
76.4%, 77.7%, and 81.1% were found. They remark that a bias (i.e. a consistently reduced
accuracy) is observed in the classification of large trades, trades during high volume periods and
ECN trades. This was allocated to classifying trades executed inside the quotes. The first raises a
bias in the classification accuracy of large trades, while the last is important due to its
increasing and widespread use in financial markets and especially FX markets. For the
calculation of effective spreads, a measure of transaction costs, the extant TCSs do a
disappointing job. This is why they propose a new and simple classification algorithm for
Nasdaq data. The Ellis, Michaely, and O'Hara (2000) rule (EMO) differs slightly from the LR rule
as it relies more on the tick test. They wanted to address the reduced accuracy of the
classification of trades inside the quotes. Trades at the quotes are categorized with the quote
rule where asks are buys and bids are sells, while all other trades are categorized with the tick
rule. A minor improvement from 81.1% using the LR rule to 81.9% using the EMO rule is
recorded, with a larger improvement from 55% to 61% for trades inside the quotes. They also
note that the EMO rule is a better TCS for Nasdaq trades than the LR rule, as it offers an
improvement of 10% for the estimate of the effective spread.
21
Chakrabarty et al. (2007) build further upon the paper of Ellis, Michaely, and O'Hara (2000) by
investigating why trades executed inside the quotes have such limited classification successes
as well as testing the EMO rule. They also use Nasdaq ECN data and report accuracies of 74.4%
(LR), 75.4% (Tick), 75.8% (EMO). Again biased estimates of the effective spreads and price
impacts are observed when using the LR rule and the EMO rule. This is why they propose a
modified EMO rule that will provide estimates of effective spreads and price impacts that are
statistically not significantly biased. The Chakrabarty et al. (2007) modified EMO rule (MEMO)
uses the QR for trades at or below the ask and at or above the bid by 30% of the b/a spread and
tags them as buys and sells, respectively. For all other trades above the ask, below the bid and
close to the mid quote, the TR is used (see Figure 8). The MEMO rule correctly classifies 76.6%
of the trades, up from 75.8% with the EMO rule. These generally lower success rates compared
to previous research are attributed to the fact that only 58% of their ECN trades occur at the
quotes. They notice that the other trades are more difficult to classify.
F I G U R E 8 : C H A K R A B A R T Y E T A L . ( 2 0 0 7 ) M O D I FI E D E M O R U L E . S O U R C E : C H AK R A B AR T Y E T AL . ( 2 0 0 7 )
Lu and Wei (2009) are the first give an exhaustive overview of TCS and conducted a study on
the Taiwan Stock Exchange (TWSE). The TWSE is similar to the Australian Stock Exchange which
was studied by Aitkin and Frino (1996). There are no price limits and no designated market
22
maker in the TWSE order matching system. For this reason, they propose a revised LR rule to
find a solution for the ‘no bid or no ask price’ problem occurring due to the occasional low
liquidity on the TWSE. This entails first classifying a trade as a buy if only the bid-side quote is
present and as a sell if only the ask-side quote is present, and then applying the LR rule. Since
the true trade initiator is not known, they use this revised LR rule as an almost perfect true
trade initiator with whom they compare the other TCS. Results show that while the most trades
are classified using the tick rule, its rate of success (74.2%) is worse than that of the QR (92.8%),
LR rule (96.5%), and EMO rule (95.0%).
In Table 2 an overview of all the discussed studies dealing with trade-by-trade TCS is given.
Kolom1
RTR
Aitkin and Frino (1996) - Australian Stock Exchange
TR
QR
LR
MEMO
75,0%
Lee and Radhakrishna (2000) - NYSE (TORQ)
93,0%
Odders-White (2000) - NYSE (TORQ)
85,0%
Finucane (2000) - NYSE (TORQ)
EMO
72,1% 83,0%
84,0%
Ellis, Michaely, and O'Hara (2000) - Nasdaq
77,7% 76,4% 81,1% 81,9%
Theissen (2001) - Frankfurt Stock Exchange
72,2%
72,8%
Chakrabarty et al. (2007) - Nasdaq
75,4%
74,4% 75,8%
Lu and Wei (2009) - Taiwan Stock Exchange
74,2% 92,8% 96,5% 95,0%
Omrane and Welch (2013) - EUR/USD (Hotspot)
66,0%
76,6%
T A B L E 2 : O V E R V I E W O F A L L D I SC U S SE D L I T E R AT U R E O N T R AD E - B Y - T R A D E T C S
Easley, Lopez de Prado and O’Hara (2013) (ELO) regard the rise of big data and the resulting
ever- increasing need to process large data as an important issue, which may seriously strain
the resources (both time and hardware) of researchers. Furthermore, they question the
informative value of knowing the true initiators for every trade as such, especially for inferring
the presence of informed traders. Originally, informed traders were presumed to act quickly on
private information before it became public. As not all trades were initiated by informed
traders, they were at best noisy estimators of new information, and thus future price
adjustments. ELO argue that discerning trading activities from trade date is not that
23
straightforward anymore, but acknowledge that informed traders still only can profit on the
private information by trading.
This is why ELO postulate the Bulk Volume Classification (BVC), a new TCS that replaces the
previous discrete trade-by-trade TCS with a continuous classification of probabilistic nature,
more closely resembling a Bayesian approach by providing the probability of an outcome (i.e.
buys and sells). Namely, BVC allocates a bulk of trades into buy and sell order flow. This is very
different to assigning an individual trade as either a buy or a sell. To do this, they use trade
volume over either fixed time intervals, fixed volume intervals or fixed amount of trades
intervals. Then the standardized price change between the beginning and the end of the
interval is calculated to estimate the share of buy and sell volume. It should be intuitively clear
that the larger (more positive) this price change is, the more probable that the underlying
trades were buys and vice versa. Their conclusion is that BVC is superior to the incumbent TCS
on index and commodity futures data, both in accuracy and resource requirements.
Chakrabarty, Pascual and Shkilko (2013) are the first to analyze BVC for Nasdaq data and
compare it to the TR. Their results contradict those of ELO. Although time savings were
substantial, they noted a significant loss of accuracy with an increase in misclassification of 7.4
to 16.3 percentage points. Moreover, the TR provides more accurate estimations of both order
imbalances and order flow toxicity. These findings are very robust. Excluding small and medium
caps and trades with zero price changes, as well as using non-normal distributions and keeping
in mind different trade reporting latencies typical to present-day markets deliver similar results.
This study will try to add to the current knowledge in two regards. First, we will test the current
trade-by-trade TCS by applying them on USD/RUB data. This is useful as this has been done
extensively for equity markets, but not so for FX markets. Until now, only the TR has been
studied in detail (Omrane and Welch, 2013). Hence, examining all TCS, and particularly the
applicability of the quote-based TCS on FX markets, seems interesting. Furthermore, the BVC
proposed by ELO deserves further exploration. Although researchers agree on the resource
effectiveness and especially time savings of applying BVC, no consensus is found on the
performance. First, the available data is described. This is followed by providing the used
24
methodology and a more in-depth study of the BVC. Further, we discuss the results that should
provide an answer to the mentioned goals of this study. Finally, we offer a conclusion that ends
this thesis.
25
4. DATA
USD/RUB exchange rate data is used in this study. More specifically, these are trades ranging
from the middle of 2011 to the end of 2014. Table 2 shows a sample of the available data. The
variable Date is stored as a Matlab numerical value. In this case, the trades occurred the 7th of
June 2011. Time is stored as a fraction of the day (e.g. the first trade happened at 10:01 a.m.). A
trading day typically starts at 10:00 a.m. and ends at 5:15 p.m. The prices are quoted in RUB for
a single USD. Finally, the Buy/Sell variable indicates whether this trade was buyer initiated (1)
or seller initiated (-1).
Date
Time
Price
Bid
Ask
Buy/Sell
734661
0.41762
27.835
27.8216
27.8340
1
734661
0.41762
27.8361
27.8216
27.8340
1
734661
0.41765
27.8453
27.8280
27.8438
1
734661
0.41766
27.8281
27.8282
27.8475
-1
T A B L E 3 : A S A M P L E O F T H E AV AI L A B L E U SD / R U B D A T A
4.1. DESCRIPTION OF THE DATA
Descriptive statistics show that in the second half of 2011, the amount of trades executed is
nearly 500 000 (which would be around 1 150 000 yearly if trade activity were constant in
2011). A large increase over the years ensues, to almost double this amount in 2014 at just
under 2 000 000 trades. This equals a daily average of about 4500 and 8000 trades respectively,
increasing gradually over the years. During the period 2011-2013, prices know a steady, albeit
small, increase. Volatility is low and even slightly decreasing with no big movements in prices.
This all radically changes in the last quarter of 2014, with volatility soaring and the RUB
depreciating tremendously. This culminates in an enormous spike the 16th of December 201415
15
On that date, Russia’s central bank pushed up interest rates from 10.5% to 17% in one go in an attempt to stop
the free fall of the ruble. This raise was supposed to ‘shock and awe’, despite Russia’s economy being severely hit
by both the plummeting oil prices and the western sanctions for invading Ukraine, in combination with high
inflation.
26
where 80 RUB was necessary to buy one USD, before ending the year lower at 56 RUB. These
findings are reported in Table 3.
Column1
201116
2012
2013
2014
Num
499 779
1 189 595
1 524 877
1 998 651
Max
32.831
34.198
33.504
80.200
Min
27.392
28.834
29.870
33.025
Mean
30.109
31.174
32.009
40.605
Median
30.530
31.180
32.264
36.220
Range
5.440
5.364
3.634
47.175
Std
1.502
1.061
0.946
8.124
T A B L E 4 : D E S C R I P T I V E S T A T I S T I C S O F T H E U SD / R U B E X C H A N G E R AT E O N A N AN NU AL B A SI S
For a more detailed view, quarterly data was used to visualize some important variables below.
This was done for the exchange rates in Figure 9, the standard deviation in Figure 10, the
average b/a spread in Figure 11 and the amount of trades in Figure 12. While all these variables
are relatively constant with only minor increases or decreases during the 2011, 2012, 2013 and
most of 2014, the extraordinary nature of the last quarter of 2014 can clearly be observed.
Exchange rates skyrocketed, as did the amount of trades and the volatility in the market. This
increased volatility was also represented in a much higher cost of trading via the larger b/a
spreads (Copeland and Galai, 1983) in that period. It is very interesting to study possible
consequences (for better or worse) with regard to the performance of the TCS.
16
th
The data of 2011 only cover the last 7 months, starting at June 7 2011.
27
F I G U R E 9 : O V E R V I E W O F T H E M E A N , M AX I M U M AN D M I N I M U M E X C H AN G E R AT E O N A Q U AR T E R L Y
B A SI S
F I G U R E 1 0 : O V E R V I E W O F T H E AM O U NT O F T R AD E S O N A QU AR T E R L Y B A SI S
28
F I G U R E 1 1 : O V E R V I E W O F T H E ST AN D AR D D E V I AT I O N O N A Q U AR T E R L Y B A SI S
F I G U R E 1 2 : O V E R V I E W O F T H E A V E R AG E B I D / A SK SP R E AD O N A Q U AR T E R L Y B A S I S
29
5. METHODOLOGY
It is now time to provide an overview and detailed (algorithmic) description of the TCS that will
be used. These TCS have already been discussed in the literature review and are the most
widely used by researchers. Most more recent TCS are in fact combinations of the TR and the
QR. In this respect, the BVC rule is an exception and needs some more explanation as it is
relatively new and therefore interesting for this study. For the implementation of these TCS in
Matlab, refer to the appendix where the code is provided with additional explanations for the
BVC.
The accuracy of the trade-by-trade TCS are tested as follows: the predicted trade directions are
compared to the true trade directions. If they are equal, there was a successful classification
(1). If they are not equal, classification failed (0). The percentage of correct classifications is the
accuracy of the TCS.
5.1. TICK RULE
For the TR, the current trade price (t) is compared to the previous trade price (t-1). If the
current price is higher, the trade is classified as a buy (+1). If the current price is lower, the
trade is classified as a sell (-1). If no price change occurs, this algorithm is repeated by
comparing to earlier trade prices until a price change is found. The first trade cannot be
classified and is thus erased.
For the RTR, the current trade price (t) is compared to the following trade price (t+1). If the
current price is higher, the trade is classified as a buy (+1). If the current price is lower, the
trade is classified as a sell (-1). If no price change occurs, this algorithm is repeated by
comparing to later trade prices until a price change is found. The last trade cannot be classified
and is thus erased.
5.2. QUOTE RULE
First, the midpoint of the b/a spread is calculated. If the trade price is above this midpoint, the
trade is classified as a buy (+1). If the trade price is below this midpoint, the trade is classified as
30
a sell (-1). Transactions at the midpoint remain unclassified (0). Trades that have no bid and/or
ask prices are erased17.
5.3. LEE AND READY (1991) RULE
First, the midpoint of the b/a spread is calculated. If the trade price is above this midpoint, the
trade is classified as a buy (+1). If the trade price is below this midpoint, the trade is classified as
a sell (-1).
For transactions at the midpoint, the current trade price (t) is compared to the previous trade
price (t-1). If the current price is higher, the trade is classified as a buy (+1). If the current price
is lower, the trade is classified as a sell (-1). If no price change occurs, this algorithm is repeated
by comparing to earlier trade prices until a price change is found. Trades that have no bid
and/or ask prices are erased.
5.4. ELLIS, MICHAELY AND O’HARA (2000) RULE
If the trade price equals the ask price, the trade is classified as a buy (+1). If the trade price
equals the bid price, the trade is classified as a sell (-1).
If a trade is not yet classified, the current trade price (t) is compared to the previous trade price
(t-1). If the current price is higher, the trade is classified as a buy (+1). If the current price is
lower, the trade is classified as a sell (-1). If no price change occurs, this algorithm is repeated
by comparing to earlier trade prices until a price change is found. Trades that have no bid
and/or ask prices are erased.
5.5. CHAKRABARTY ET AL. (2007) MODIFIED EMO RULE
First, the midpoint of the b/a spread is calculated. If the trade price is higher or lower than this
midpoint by 20% of the b/a spread or less, or if the trade price is higher than the ask price or
lower than the bid price, the current trade price (t) is compared to the previous trade price (t-
17
For this study, 4468 trades have no available bid (25) or ask (4468) price. On a total of 5 212 902 trades, this is
about 0.0857%.
31
1). If the current price is higher, the trade is classified as a buy (+1). If the current price is lower,
the trade is classified as a sell (-1). If no price change occurs, this algorithm is repeated by
comparing to earlier trade prices until a price change is found.
If the trade price is equal or lower than the ask price by 30% of the b/a spread or less, the trade
is classified as a buy (+1). If the trade price is equal or higher than the bid price by 30% of the
b/a spread, the trade is classified as a sell (-1). Trades that have no bid and/or ask prices are
erased.
5.6. BULK VOLUME CLASSIFICATION RULE
Comparing BVC with the previous TCS is not straightforward, as earlier TCS classify each trade
as either a buy or a sell trade-by-trade, while BVC allocates a bulk of trades into buy and sell
volume. Suppose, for example, a sequence of 10 trades with true initiator known: BBSSBBSSBB.
A trade-by-trade TCS could classify these trades as BSBBSBBSBS, which would give an accuracy
of only 40%. The Bulk Accuracy Ratio (BAR) is defined as the fraction of overall volume correctly
classified within bars. A bar is a aggregation of trades that occur within a given time period (e.g.
one hour), the volume traded (e.g. 10 000 000 USD) or the amount of trades that occurred (e.g.
1000 trades). The formula to calculate the BAR is as follows:
∑𝜏[min(𝑉𝜏𝐵 , ̅̅̅̅
𝑉𝜏𝐵 ) + min(𝑉𝜏𝑆 , ̅𝑉̅𝜏̅𝑆̅)]
𝐵𝐴𝑅 =
∑𝜏 𝑉𝜏
where
𝑉𝜏 = total volume in interval 𝜏
𝑉𝜏𝐵 = true buy volume
𝑉𝜏𝑆 = true sell volume
̅̅̅̅
𝑉𝜏𝐵 = predicted buy volume
̅𝑉̅𝜏̅̅𝑆 = predicted sell volume.
For our example, we find the following BAR:
32
𝐵𝐴𝑅 =
[min(6, 6̅) + min(4, 4̅)]
= 100%
10
This implies that the BAR is always at least as high as the trade-by-trade accuracy, as the
classification errors can be offset by the aggregation of trades18. If the amount of aggregation
increases, more offsetting happens and thus the BAR increases as well. To calculate ̅̅̅̅
𝑉𝜏𝐵 and ̅𝑉̅𝜏̅̅𝑆 ,
the following formulas are used:
𝑃𝜏 − 𝑃𝜏−1
̅̅̅̅
𝑉𝜏𝐵 = 𝑉𝜏 × 𝑡 (
, 𝑑𝑓)
𝜎∆𝑃
̅𝑉̅𝜏̅̅𝑆 = 𝑉𝜏 × [1 − 𝑡 (𝑃𝜏 − 𝑃𝜏−1 , 𝑑𝑓)] = 𝑉 − ̅̅̅̅
𝑉𝜏𝐵
𝜎∆𝑃
where
t = Cumulative Distribution Function (CDF) of a Student’s t-distribution19
𝑃𝜏 − 𝑃𝜏−1 = price change between consecutive bars calculated as the difference between the
last price of the current bar and the last price of the preceding bar and
𝜎∆𝑃 = standard deviation of the price changes.
Easley, Lopez de Prado and O’Hara (2013) and Chakrabarty, Pascual and Shkilko (2013) found
that aggregating trades in volume bars and trade bars was superior to aggregating in time bars
in most situations. As our data lacks the trade volumes, this study will use trade bars to
examine the accuracy of the BVC rule. There are two options to compare the accuracies of the
TCS. The first option is to select bars only comprising of one trade to calculate the BAR of the
BVC rule, which is then equal to the trade-by-trade accuracy. Even though this is very
straightforward, it rather defeats the purpose of BVC. The second option is to adapt a TCS so
18
Chakrabarty, Moulton and Shkilko (2012) were among the first to address this. They used the LR rule on short to
classify short sales and noted that misclassification almost reached zero on a daily basis. They attributed this to the
offsetting of wrongly classified trades.
19
Chakrabarty, Pascual and Shkilko (2013) used the standard normal distribution instead of Student’s t distribution
as used by ELO (2013). They argued that their results were very robust even when using Student’s t distribution
with different degrees of freedom. However, the distribution of price changes in this study are characterized by
very fat tails with a kurtosis equal to 476.73 (bar size 500 and df 0.25). This can be attributed to the explosion in
volatility at the end of 2014.
33
that it also aggregates the classifications in bars. As this allows for offsetting, the BAR of both
TCS are then comparable.
Another issue that has to be addressed is what to do with overnight returns. As our trade bars
are always of equal sizes, some volume may consist of trades from the previous day. This was
not a big issue for ELO, as the futures contract in their data are traded almost continuously.
However, our trades do not have this characteristic, as a trading day only spans 9 hours and 15
minutes. This means that the effect of these overnight returns should be tested by omitting
these previous day trades out of the trade bars. Of course, the larger the amount of trades in
each trade bar, the more trades will be affected as the amount of trades omitted will increase.
It is therefore important to assess whether overnight returns have a significant impact on the
performance of BVC.
It the next section, these methodologies are implemented and the results are discussed more in
depth.
34
6. RESULTS
We start by looking at the general performance of all aforementioned trade-by-trade TCS. Then
these results will be studied in more detail. In particular, the evolution of the TCS over the years
is investigated. Furthermore, performance of these TCS relative to the location of the trades is
discussed. Finally, we look for biases often reported in literature. In the second part, bulk
classification is assessed. BVC will be applied and scrutinized for its merits, both in performance
and resource efficiency. Some issues are then addressed, involving the choice of the underlying
population for the price differences and the problem of overnight returns.
6.1. TRADE-BY-TRADE CLASSIFICATION
The USD/RUB data in this study comprises of 5 212 902 trades. Before examining the accuracy
of the TCS, it is very useful to have a look at the location of the trades in the whole sample. It is
very informative to know whether trades often occur at the quotes or not. This is important as
these trades are generally seen as more informative (i.e. a better predictor of true trade
direction) and thus should yield better results. For example, Lu and Wei (2009) report very high
accuracies (92.8% - 96.5%) for TCS dependent on quote data on the TWSE, where trades only
can occur at bid or ask due to its specific order matching structure. In contrary, Chakrabarty et
al. (2007) find lower success rates (74.4% - 76.6%) for their Nasdaq data where only 57% of
their ECN trades happen at the quotes. Table 5 gives an overview of the location of the trades
for the data in this study. Three quarters (74.1%) of all trades happened at the quotes with
35.4% at the bid and 38.9% at the ask. Only 16% of trades occurred inside the quotes, of which
just 0.4% at the quote midpoint. Surprisingly, almost 10% of trades were executed outside of
the quotes. The amount of trades that occurred on zero ticks or non-zero ticks is roughly the
same. To conclude, the high amount of transactions at the quotes suggest a good accuracy for
quote-based TCS (QR, LR, EMO and MEMO).
35
Location
Outside quotes
Ask
Bid
Inside quotes
Midpoint20
Total
Zero ticks
Non-zero ticks
Amounts
510790
2025326
1843291
833497
23128
5212904
2553135
2659766
9.80%
38.85%
35.36%
15.99%
0.44%
100.00%
48.98%
51.02%
T A B L E 5 : L O C A T I O N AN D N AT U R E O F T R A D E S I N T H E S AM P L E
It is now time to take a look at the results of applying the TCS on the data. The RTR disturbingly
underperforms, only classifying 46.42% of trades accurately. This clearly supports the fact that
this is an unreliable TCS, as also mentioned in previous studies, and should therefore not be
used by researchers. The TR only uses price information and this is illustrated in the relatively
low accuracy of 70.58%. This is lower than the accuracy generally found on equity markets.
However, in the study done by Omrane and Welch (2013) on EUR/USD data, also a lower than
normal accuracy was reported. They attribute the worse performance of the TR to the specific
nature of the FX market. The TCS using quote data perform rather well, being 85.78%, 86.10%,
86.26% and 86.85% for the QR, LR, EMO and MEMO respectively. These results are in line with
results for NYSE data (Lee and Radhakrishna, 2000; Odders-White, 2000; Finucane , 2000) and
better than Nasdaq data (Ellis, Michaely and O’Hara, 2000; Chakrabarty et al., 2007) and
Frankfurt Stock Exchange data (Theisen, 2001). The limited improvement of the LR rule over the
QR can be explained by the low number of trades that occurred at the midpoint of the b/a
spread. Finally, evidence is found for the superiority of the MEMO rule as proposed by
Chakrabarty et al. (2007).
In Table 6, the performances of the trade-by-trade TCS are summarized.
Kolom1
Trade-by-trade accuracy
RTR
TR
QR
LR
EMO
MEMO
46.42%
70.58%
85.78%
86.10%
86.26%
86.85%
T A B L E 6 : G E N E R A L P E R FO R M A NC E O F T R A D E - B Y - T R A D E T C S
20
The midpoint is a special case of a trade occurring inside the quotes
36
Next, the TCS are again applied but on a yearly basis. Easley, Lopez de Prado and O’Hara (2013)
postulated that the performance of traditional trade-by-trade TCS is decreasing through the
years as electronic and algorithmic trading are winning ground. Some remarkable trends can be
distinguished, although it is important to remain cautionary when generalizing results, keeping
in mind the limits of a small sample. All quote-based TCS perform strikingly better in the years
2011-2012, in contrast with the TR that performed remarkably well in 2014. These results are
summarized in Table 7.
Kolom1
RTR
TR
QR
LR
EMO
MEMO
2011
49.10%
62.32%
78.10%
78.11%
75.49%
75.89%
2012
48.62%
66.17%
89.42%
89.42%
89.07%
89.19%
2013
49.36%
68.58%
90.27%
90.27%
90.16%
90.22%
2014
42.21%
76.79%
82.11%
82.93%
84.32%
85.63%
T A B L E 7 : Y E A R L Y P E R FO R M AN C E O F T R AD E - B Y - T R AD E T C S
For possible explanations, we take a look at the detailed description of the nature of the trades
in those years (see Table 8). There are some remarkable findings. The poor performances in
year 2011 is attributable to the large amount of trades that occurred outside of the quotes21.
Years 2012-2013 are characterized by low volatility and a high amount of trades happening at
the quotes, which explains the high performances. For the year 2014, most trades occurred
inside the quotes and the amount of non-zero ticks was higher than zero ticks. The first explains
the lower accuracy for quote-based TCS, while the latter is due to the increased volatility and is
the reason why the TR seems to perform exceptionally well. This high TR performance in high
volatility directly contradicts the lower performance in volatile and trending markets found by
Aitkin and Frino (1996).
21
A possible explanation for the significant decrease in trades happening outside the quotes over the years is the
substantial improvement in liquidity as observed in the RUB/USD market.
37
Column1
2011
2012
2013
2014
Outside quotes
30.39%
13.33%
11.12%
1.54%
Ask
33.94%
42.38%
47.26%
31.60%
Bid
33.74%
43.84%
41.34%
26.18%
Inside quotes
1.93%
0.45%
0.28%
40.68%
Midpoint
0.03%
0.00%
0.02%
1.13%
Total
100.00%
100.00%
100.00%
100.00%
Zero ticks
52.58%
52.64%
52.41%
43.32%
Non-zero ticks
47.42%
47.36%
47.59%
56.77%
T A B L E 8 : L O C A T I O N A N D N AT U R E O F T H E T R A D E S O N A Y E AR L Y B AS I S
Finally, the accuracy of these TCS are examined in relation with the location of the trades.
There are generally three types of biases found in literature. The most frequent reported bias is
the underperformance of trades occurring on zero ticks, specifically for the TR (Aitkin and Frino,
1996; Theissen, 2001; Chakrabarty et al., 2006; Omrane and Welch, 2013). Next, lower
accuracies were found for trades that were executed inside the quotes when using the LR rule
(Ellis, Michaely and O’Hara, 2000; Chakrabarty et al., 2006). The EMO and MEMO rule were
specifically created to cope with this problem and their superior performance should thus imply
that this bias is also present in this study. Odders-White (2000) and Theissen (2000) also
reported worse performances for trades occurring on the midpoint of the b/a spread, which is a
specific case of trades occurring inside the quotes. Lastly, Aitkin and Frino (1996) and Omrane
and Welch (2013) found a disturbing asymmetry in the classification of seller initiated and
buyer initiated trades. The first reported a lower accuracy for seller initiated trades, while the
latter describe exactly the opposite.
First, there is indeed a large asymmetry in performance of buyer and seller initiated trades,
with seller initiated trades performing remarkably better than buyer initiated trades (average
difference of 7.46% for all TCS). This is in line with the 9.49% found by Omrane and Welch
(2013) who also studied FX data. Second, quote-based TCS do have lower accuracies for trades
38
inside the quotes22, while the TR is unaffected. Here, the merit of the improvements of EMO
and especially MEMO over LR are very clear. Third, the TR clearly underperforms on zero ticks
with 9.33%, while the difference for the quote-based TCS is smaller (an average of 3.67%). To
conclude, all three biases generally found in literature are also present in this study.
Column1
TR
QR
LR
EMO
MEMO
Buy
67,46%
82,91%
83,14%
82,62%
83,55%
Sell
74,78%
89,64%
90,08%
91,17%
91,29%
Inside quotes
69,57%
67,01%
69,00%
69,57%
73,24%
Zero ticks
65,82%
83,80%
84,07%
84,88%
84,74%
Non-zero ticks
75,15%
87,68%
88,04%
87,59%
88,87%
Total
70,58%
85,78%
86,10%
86,26%
86,85%
T A B L E 9 : P E R F O R M A N C E O F T C S R E L AT I V E T O T H E L O C A T I O N O F T H E T R A D E S
6.2. BULK CLASSIFICATION
While the research on traditional trade-by-trade TCS dates back 25 years to the first extensive
study done by Lee and Ready (1991), no real radical changes have occurred ever since. TCS
remained combinations of a quote rule and a tick rule, with research showing better results for
the more recent EMO and MEMO rules. These increases are rather incremental, however, and
explain why the easy-to-use TR is still being used extensively. The proposition of Easley, Lopez
de Prado and O’Hara (2013) (ELO) to rethink the way TCS are used to discern the underlying
information from the data, which is in fact the main concept in market microstructure, can thus
be seen as revolutionary. BVC allocates a bulk of trades into buy and sell order flow, which is
obviously very different to assigning an individual trade as either a buy or a sell. ELO conclude
that BVC is superior to the incumbent TCS on index and commodity futures data, both in
accuracy and resource requirements. This is not straightforward to test. Indeed, the different
nature of classification requires some adaptation to the trade-by-trade TCS to be able to
compare the latter with the newer BVC, as discussed above.
First, the effect of trade bar size on the BVC is given in Table 10. There is not a clear guideline
on how much trades an ideal bar comprises of. Taking into account the average amount of
22
Trades at the midpoint are not individually discussed as there are very few in this study and are thus
incorporated in trades inside quotes.
39
trades per day of around 4500 to 8000 and the decreasing improvements in BVC performance,
bar sizes of 250, 500 and 1000 trades are deemed the most appropriate for further study. The
found accuracies are in line with the 88.97% to 93.57% found by ELO and substantial higher
than the 71.1% to 78.2% of Chakrabarty, Pascual and Shkilko (2013) (CPS).
Trade bar size
10
25
50
100
250
500
1000
2500
5000
10000
20000
BVC
76,50%
81,96%
84,88%
86,97%
88,72%
89,58%
90,10%
90,45%
90,45%
89,87%
89,64%
T A B L E 1 0 : T H E I N F L U E N C E O F T R A D E B A R SI Z E O N B V C W I T H A ST U D E NT ’ S T D I S T R I B U T I O N ( D F = 0 . 2 5 )
Second, accuracy of the BVC hinges upon the supposed underlying population of the price
changes. ELO suggested a Student’s t-distribution with df = 0.25, while CPS used a normal
distribution, noting no significant differences when compared to Student’s t-distribution with
various degrees of freedom. Using the distribution as proposed by ELO yields good results and
will be used in this study, even though these are rather robust to the choice of degrees of
freedom. This is summarized in Table 11. Using a normal distribution leads to substantially
worse performances as seen in Table 12, ranging from 63.11% to 84.12%. This can be
accounted to the fat tails present in the data, as was also mentioned by ELO.
Kolom1
0,05
0,1
0,25
0,5
1
100
10000
250
89,02%
89,03%
88,72%
88,19%
87,60%
86,53%
86,52%
500
90,09%
90,04%
89,58%
88,94%
88,27%
87,07%
87,06%
1000
90,85%
90,72%
90,10%
89,34%
88,55%
87,18%
87,16%
T A B L E 1 1 : R O B U S T N E S S T E S T O F S T U D E NT ' S T D I ST R I B U T I O N FO R D I F FE R E NT V AL U E S O F D F
( H O R I Z O N T A L L Y ) A N D D I F F E R E NT T R AD E B AR S I Z E ( V E R T I C AL L Y )
40
Trade bar size
10
25
50
100
250
500
1000
2500
5000
10000
20000
BVC
63,11%
63,48%
64,97%
67,86%
69,51%
74,22%
77,78%
81,74%
84,12%
81,27%
81,99%
T A B L E 1 2 : T H E I N F L U E N C E O F T R A D E B AR SI Z E O N B V C U SI N G A NO R M AL D I ST R I B U T I O N
Third, CPS expressed concerns regarding the negative effect of overnight returns on the
performance of BVC, which did not arise in the paper by ELO who used quasi-continuous
futures contracts. They omitted overnight returns to exclude possible skewed price changes,
but did not find qualitatively different performances compared to when overnight returns were
included. Table 13 shows the effect of overnight returns on BVC in this study. Leaving them out
increases BVC slightly with 0.08 to 0.11 percentage points, which seems negligible when
considering the disadvantages of increased computational time and loss of data. In this case,
the results of CPS are confirmed and overnight returns will not be omitted in this study.
Trade bar size
BVCw
BVCwo
250
88,72%
88,82%
500
89,58%
89,66%
1000
90,10%
90,21%
T A B L E 1 3 : T H E E F F E C T O F O V E R N I G H T R E T U R N S O N B V C : W I T H ( B V C W ) A ND W I T H O U T ( B V C W O )
O V E R NI G H T R E T U R N S
Fourth, the biggest advantage of BVC as advocated by ELO was its resource efficiency and
especially time savings. Before comparing its performance against extant trade-by-trade TCS, it
is therefore necessary to briefly scrutinize this claim. To fully utilize the power of BVC, it is
necessary to work with vendor-compressed data, i.e. data that has already been aggregated in
bars by the provider, as in the work of ELO. In contrast, when one deals with individual trade
data as in CPS and this study, this aggregation has to be done first before applying BVC. Table
41
14 displays the computational time in seconds when applying different TCS in Matlab. If solely
the application of the TCS for the signing of trades is considered, as would be the case for
vendor-compressed data, we find 0.22s for BVC and an average of 1.07s for trade-by-trade
TCS23. This equals a time efficiency ratio of 20.5%, i.e. BVC is five times faster. However, when
the preparatory work of aggregating trades in bars is also considered, the total computational
time for BVC becomes 0.58s and the efficiency ratio declines to 54.3%. CPS reported an
efficiency ratio of 25% in their study, which is substantially better than the ratio found here. It
can therefore be concluded that although BVC offers quite some time savings, they are not as
extraordinary as was suggested by ELO and further depend on the data available to the
researcher.
Aggregation
Signing
BVC
0,3617
0,2199
TR
QR
LR
EMO
MEMO
1,2864
0,8520
0,8837
1,0159
1,3186
T A B L E 1 4 : C O M P U T A T I O N A L T I M E ( S) O F D I F FE R E NT T C S I N M AT L A B
Finally, it is now time to compare the BVC to the incumbent trade-by-trade TCS. As discussed
before, it is necessary to adapt the trade-by-trade TCS so that they also aggregate the
classifications in bars. As this allows for offsetting, the BAR or the fraction of overall volume
correctly classified within bars of all TCS are then comparable. Table 15 shows the results. The
BVC does not offer an increase in performance over extant trade-by-trade TCS being
aggregated, as the TR offers a small and the quote-based a larger improvement. This is in line
with the findings of ELO. They concluded that, while BVC performed almost equally well, the
other advantages made it superior. CPS reported much larger differences in performance.
Column1
250
500
1000
BVC
88,72%
89,58%
90,10%
TR
89,79%
90,68%
91,22%
QR
92,17%
92,36%
92,48%
LR
92,09%
92,25%
92,34%
EMO
92,41%
92,62%
92,78%
MEMO
92,25%
92,39%
92,48%
T A B L E 1 5 : C O M P AR I SO N O F B V C T O AG G R E G AT E D T C S
23
As a cautionary note, these computational times can be slightly different for different runs. They should
therefore be seen as a rough indications for the sake of comparison.
42
7. CONCLUSION
It was Lyons (2001) who proposed a microstructure approach and introduced order flow as the
most important driver in exchange-rate economics. The focus of this approach is dispersed
information and how information of this type is aggregated in the marketplace. Knowing
whether the initiator of a transaction is buying or selling is of crucial importance to the
outcome of studies in this field. Although a great deal of research was conducted in the efficacy
of trade classification systems in stock markets, it has not been applied often on the Foreign
Exchange market and if so, not exhaustively. This thesis tried to fill this gap by searching the
prevalent literature for the most important trade classification systems and assess their
applicability and accuracy on the USD/RUB currency market.
Traditionally, this trade classification was done trade-by-trade, yielding mixed results
depending on the data used. With Lee and Ready (1991) as a starting point, the five most
important TCS were defined as the TR, QR, LR rule, EMO rule and MEMO rule. The accuracies
found were in line with existing literature with 46.42%, 70.58%, 85.78%, 86.10% and 86.85%
respectively. The MEMO improved on all previous TCS and is currently the best at classifying
trades. When quote data is not present, the TR yields a considerably lower accuracy. Its easeof-use makes it nonetheless very useful for many researchers. The yearly variations in these
accuracies were shown to be attributable to the difference in location where trades occurred.
Not surprisingly, trades executed at the quotes are the most informative for buy/sell intention.
Further, the most important biases encountered in literature were found to be present in this
study as well. Seller initiated trades perform remarkably better than buyer initiated trades with
an average of 7.46% for all TCS. The EMO rule, and especially the MEMO rule, offer substantial
improvements over LR as they have far more power for classifying trades that occurred at the
midpoint of the b/a spread. The biggest disadvantage of the TR is that it clearly underperforms
on zero ticks with 9.33%, while the difference for the quote-based TCS is smaller with an
average of 3.67%.
More recently, Easley, Lopez de Prado and O’Hara (2013) proposed BVC, a TCS that uses bulk
classification instead of trade-by-trade classification. The findings were mostly in line with those
of ELO. For bars comprising 250, 500 and 1000 trades, an accuracy of 88.72%, 89.58% and
90.10% was found respectively. Further, using a Student’s t distribution with 0.25 degrees of
43
freedom delivered much better results than using a normal distribution as used by Chakrabarty,
Pascual and Shkilko (2013). This is a result of the fat tails present in the distribution
characterizing the price changes between bars. With regard to resource efficiency, time savings
when using BVC are considerable, but less so when the available data is not yet vendorcompressed and thus aggregation has to be done by the researcher. Also, excluding overnight
returns was not found to be substantially more beneficial for accuracy. On the contrary, it
conflicts with the time efficiency of BVC due to the additional computational effort needed.
Finally, BVC is not better performing than aggregating trade-by-trade across the board as even
the TR performs slightly better. Nevertheless, BVC certainly has its merits for specific
applications that benefit by handling in bulk as proposed by ELO and remains a very interesting
TCS to study in much more detail. However, for most microstructure research, the extant TCS
remain safe and sound solutions.
This thesis assesses the accuracy of the most important trade-by-trade TCS, as well as the more
recent BVC, on FX data. As such, the results cannot be unquestionably generalized for all
markets. It would be valuable to repeat this study for stock markets in future research as these
are often the focus of microstructure research. Further, while the MEMO rule performs best at
this moment and improves considerably over the LR, further research should be done in order
to improve the TCS even more. It is by striving relentlessly for zero errors in classifying trades
that the intriguing world of microstructure is being unraveled even further.
44
BIBLIOGRAPHY
Aitken, M., & Frino, A. (1996). The accuracy of the tick test: Evidence from the Australian stock
exchange. The Journal of Banking & Finance, 20, 1715-1729.
Amihud, Y., & Mendelson, H. (1986). Asset pricing and the bid-ask spread. Journal of Financial
Economics, 17, 223-249.
Bank for International Settlements [BIS]. (2010). Triennial Central Bank Survey, Foreign
Exchange and Derivatives Market Activity in April 2010. Basel: Bank for International
Settlements, Publications.
Bank for International Settlements [BIS]. (2013). Triennial Central Bank Survey, Foreign
Exchange and Derivatives Market Activity in April 2013. Basel: Bank for International
Settlements, Publications.
Blume, M., MacKinlay, C., & Terker, B. (1989). Order imbalances and stock price movements on
October 19 and 20, 1987. The Journal of Finance, 19(4), 827-848.
Chakrabarty, B., Li, B., Nguyen, V., & Van Ness, R. (2007). Journal of Banking & Finance, 31(12),
3806-3821.
Chakrabarty, B., Moulton, P., and Shkilko, A. (2012). Short sales, long sales, and the Lee-Ready
algorithm revisited. Journal of Financial Markets, 15(4), 467-491.
Chakrabarty, B., Pascual, R., & Shkilko, A. (2013). Trade Classification Algorithms: A Horse Race
between the Bulk-based and the Tick-based Rules. SSRN, March 2013.
Copeland, T., & Galai, D. (1983). Information Effects on the Bid-Ask Spread. The Journal of
Finance, 38(5), 1457-1469.
Davies, G. (1992). A history of money. Cardiff: University of Wales Press
Dun & Bradstreet. (2006). Financial Risk Management. New York: McGraw-Hill Education.
Dominguez, K. (1986). Are foreign exchange forecasts rational? New evidence from survey data.
Economic Letters, 21, 277-281.
viii
Dornbusch, R. (1980). Exchange Rate Economics: Where Do We Stand? Brookings Papers on
Economic Activity, 1, 143-205.
Easley, D., Kiefer, N., O’Hara, M., & Paperman, J. (1996). Liquidity, information and infrequently
traded stocks. The Journal of Finance, 51(4), 1405–1436.
Easley, D., Lopez de Prado, M., & O’Hara, M. (2013). Bulk classification of trading activity. SSRN,
March 2013.
Ellis, K., Michaely, R., & O’Hara, M. (2000). The Journal of Financial and Quantitative Analysis,
35(4), 529-551.
Elliot, L. (2013). Russia has just lost the economic war with the west. Consulted on April 5th
2016, via http://www.theguardian.com/business/2014/dec/16/russia-has-lost-economic-warwith-west-rouble-currency.
Evans, G. (1986). A test for speculative bubbles in the sterling-dollar exchange rate. American
Economic Review, 76, 621-636.
Evans, M. D. D., & Lyons, R. K. (1999). Order Flow and Exchange Rate Dynamics. Massachusetts:
National Bureau of Economic Research.
Fama, F. (1970). Efficient capital markets: a review of theory and empirical work. The journal of
Finance, 25(2), 383-417.
Federal Reserve Bank of New York. (2013). The Foreign Exchange and Interest Rate Derivatives
Markets: Turnover in the United States, April 2013. New York: Federal Reserve Bank of New
York, Publications.
Flood, R., & Hodrick, R. (1990). On Testing for Speculative Bubbles. Journal of Economic
Perspectives, 4(2), 85-101.
Finucane, T. (2000). A Direct Test of Methods for Inferring Trade Direction from Intra-Day Data.
The Journal of Financial and Quantitative Analysis, 35(4), 553-576.
Frankel, J., & Froot, K. (1987). Using survey data to test standard propositions regarding
exchange rate expectations. American Economic Review, 77(1), 133-153.
ix
Frankel, J., & Rose, A. (1995). A survey of empirical research on nominal exchange rates.
Cambridge, Massachusetts: National Bureau of Economic Research.
Hasbrouk, J. (1988). Trades, Quotes, Inventories and Information. Journal of Financial
Economics, 22, 229-252.
Hasbrouck, J. (1991). Measuring the Information Content of Stock Trades. The Journal of
Finance, 156(1), 179-207.
Hau, H. (1998). Competitive Entry and Endogenous Risk in the Foreign Exchange Market. Review
of Financial Studies, 11, 757-788.
Huang, R., & Stoll, H. (1995). Dealer versus auction markets: A paired comparison of execution
costs on NASDAQ and the NYSE
Huang, R., & Stoll, H. (1997). The components of the bid–ask spread: a general approach. The
Review of Financial Studies, 10(4), 995–1034.
International Trade Centre [ITC], Trade Map - International Trade Statistics. (2015). Consulted
on March 14th 2015 via http://www.trademap.org/open_access/Index.aspx.
King, M.R., Osler, C., & Rime, D. (2011). Foreign Exchange Market-Structure, Players and
Evolution. Oslo: Norges Bank Working Paper 2011/10.
Krugman, P., Baldwin, R., Bosworth, B., & Hooper, P. (1987). The Persistence of the U.S. Trade
Deficit. Brookings Papers on Economic Activity, 1, 1-55.
Lee, C., & Ready, M. (1991). Inferring Trade Direction from Intraday Data. The Journal of
Finance, 46(2), 733-746.
Lee, C. (1992). Earnings news and small traders. Journal of Accounting and Economics, 15, 265302.
Lee, C., & Radhakrishna, B. (2000). Inferring investor behavior: Evidence from TORQ data.
Journal of Financial Markets, 3, 83-111.
Lightfoot, L., Martin, P., Petersen M., & Sirri, E. (2003). Order preferencing and market quality
on United States equity exchanges. The Review of Financial Studies, 16(2), 385-415.
x
Lu, Y., & Wei, Y. (2009). Classification of trade direction for an equity market with price limit
and order match: evidence from the Taiwan stock market. Investment Management and
Financial Innovations, 6(3), 135-147.
Lyons, R. K. (1995). Tests of microstructural hypotheses in the foreign exchange market. Journal
of Financial Economics, 39(2), 321-351.
Lyons, R. K. (1997a). Frequently Asked Questions About the Micro Approach to FX. California:
Haas School of Business.
Lyons, R. K. (199,b). A simultaneous trade model of the foreign exchange hot potato. The
Journal of International Economics, 42, 275-298.
Lyons, R. K. (2001). The Microstructure Approach to Exchange Rates (Vol.1). Massachusetts: The
MIT Press.
Meese, R., & Rogoff, K. (1983a). Empirical exchange rate models of the seventies. Journal of
International Economics, 14, 3-24.
Meese, R., & Rogoff, K. (1983b). The out-of-sample failure of empirical exchange rate models:
Sampling Error or Misspecification?. Chicago: University of Chicago Press.
Meese, R. (1986). Testing for Bubbles in Exchange Markets: A Case of Sparkling Rates? Journal
of Political Economy, 94(2), 345-373.
Odders-White, E. (2000). On the Occurrence and Consequences of Inaccurate Trade
Classification. Journal of Financial Markets, 3, 259-286.
Omrane, W.D., & Welch, A. (2013). Tick Test Accuracy in Foreign Exchange ECN Markets.
Ontario: Goodman School of Business
Ready, M. (1999). The Specialist’s Discretion: Stopped Orders and Price Improvement. The
Review of Financial Studies, 12(5), 1075-1112.
Rime, D. (2003). New Economy Handbook. USA: Elsevier Science
Schultz, P., & Zaman, M. (1994). Aftermarket support and underpricing of initial public
offerings. Journal of Financial Economics, 35, 199-219.
xi
Theissen, E. (2001). A test of the accuracy of the Lee/Ready trade classification algorithm.
Journal of International Financial Markets, Institutions and Money, 11, 147-165.
xii
APPENDIX
TRADE-BY-TRADE CLASSIFICATION
TICK RULE
function [ predictedInitiator ] = Tickrule( alltrades )
prices = alltrades(:,3);
predictedInitiator = zeros(length(alltrades),1);
for i = 2:length(prices)
if prices(i) > prices(i-1)
predictedInitiator(i) = 1;
elseif prices(i) == prices(i-1)
for j = i:-1:1
if prices(i) == prices (j)
continue;
end
if prices(i) > prices(j)
predictedInitiator(i) = 1;
break;
else
predictedInitiator (i) = -1;
break;
end
end
else
predictedInitiator(i) = -1;
end
end
end
xiii
QUOTE RULE
function [ predictedInitiator ] = Quoterule( alltrades )
allprices = alltrades(:,3:5);
predictedInitiator = zeros(length(alltrades),1);
for i = 1:(length(allprices))
if (isnan(alltrades(i,4)))||(isnan(alltrades(i,5)))
continue;
end
if allprices(i,1) > ((allprices(i,2) + allprices(i,3))/2)
predictedInitiator(i) = 1;
continue;
elseif allprices(i,1) < ((allprices(i,2) + allprices(i,3))/2)
predictedInitiator(i) = -1;
end
end
end
xiv
LEE AND READY (1991) RULE
function [ predictedInitiator ] = LRrule( alltrades )
allprices = alltrades(:,3:5);
predictedInitiator = zeros(length(alltrades),1);
for i = 1:(length(allprices))
if (isnan(alltrades(i,4)))||(isnan(alltrades(i,5)))
continue;
end
if allprices(i,1) > ((allprices(i,2) + allprices(i,3))/2)
predictedInitiator(i) = 1;
continue;
elseif allprices(i,1) < ((allprices(i,2) + allprices(i,3))/2)
predictedInitiator (i) = -1;
continue;
else
if allprices(i,1) > allprices(i-1,1)
predictedInitiator(i) = 1;
elseif allprices(i,1) == allprices(i-1,1)
for j = i:-1:1
if allprices(i,1) == allprices(j,1)
continue;
end
if allprices(i,1) > allprices(j,1)
predictedInitiator(i) = 1;
break;
else
predictedInitiator(i) = -1;
break;
end
end
else
predictedInitiator(i) = -1;
end
end
end
end
xv
ELLIS, MICHAELY AND O’HARA (2000) RULE
function [ predictedInitiator ] = EMOrule( alltrades )
allprices = alltrades(:,3:5);
predictedInitiator = zeros(length(alltrades),1);
for i = 1:(length(allprices))
if (isnan(alltrades(i,4)))||(isnan(alltrades(i,5)))
continue;
end
if allprices(i,1) == allprices(i,3)
predictedInitiator(i) = 1;
continue;
elseif allprices(i,1) == allprices(i,2)
predictedInitiator (i) = -1;
continue;
else
if allprices(i,1) > allprices(i-1,1)
predictedInitiator(i) = 1;
elseif allprices(i,1) == allprices(i-1,1)
for j = i:-1:1
if allprices(i,1) == allprices(j,1)
continue;
end
if allprices(i,1) > allprices(j,1)
predictedInitiator(i) = 1;
break;
else
predictedInitiator (i) = -1;
break;
end
end
else
predictedInitiator(i) = -1;
end
end
end
end
xvi
CHAKRABARTY ET AL. (2007) MODIFIED EMO RULE
function [ predictedInitiator ] = MEMOrule( alltrades )
allprices = alltrades(:,3:5);
predictedInitiator = zeros(length(alltrades),1);
for i = 1:(length(allprices))
if (isnan(alltrades(i,4)))||(isnan(alltrades(i,5)))
continue;
end
if allprices(i,1) == allprices (i,3)
predictedInitiator(i) = 1;
continue;
elseif allprices(i,1) < allprices (i,3) && allprices (i,1) >
(allprices (i,3) - 0.3*(allprices (i,3) - allprices (i,2)))
predictedInitiator(i) = 1;
continue;
elseif allprices(i,1) == allprices(i,2)
predictedInitiator (i) = -1;
continue;
elseif allprices(i,1) > allprices (i,2) && allprices (i,1) <
(allprices (i,2) + 0.3*(allprices (i,3) - allprices (i,2)))
predictedInitiator(i) = -1;
continue;
else
if allprices(i,1) > allprices(i-1,1)
predictedInitiator(i) = 1;
elseif allprices(i,1) == allprices(i-1,1)
for j = i:-1:1
if allprices(i,1) == allprices(j,1)
continue
end
if allprices(i,1) > allprices(j,1)
predictedInitiator(i) = 1;
break;
else
predictedInitiator (i) = -1;
break;
end
end
else
predictedInitiator(i) = -1;
end
end
end
end
xvii
TRADE-BY-TRADE CLASSIFICATION ACCURACY
function [ accuracy ] = Accuracy( predictedInitiator, alltrades)
trueInitiator = alltrades(:,6);
performance = zeros(length(alltrades),1);
for i = 1:length(predictedInitiator)
if predictedInitiator(i) == trueInitiator(i)
performance(i)= 1;
end
end
accuracy = mean(performance)*100;
toc;
end
xviii
BULK CLASSIFICATION
BULK VOLUME CLASSIFICATION
function [ bvc ] = BVC( barsize, alltrades )
%Delete last incomplete bar
amountofbars = ceil((length(alltrades)-1)/barsize)-1;
amountoftrades = amountofbars*barsize;
%Initialize vectors
allprices = zeros(amountoftrades,1);
alldays = zeros(amountoftrades,1);
pricediff = zeros(amountofbars,1);
bvc = zeros(amountofbars,1);
%Extract all prices and all days and skip first price
allprices(1:amountoftrades) = alltrades(2:amountoftrades+1,3);
alldays(1:amountoftrades) = alltrades(1:amountoftrades,1);
%Get firstprice
firstprice = alltrades(1,3);
%Create bars
bars = reshape(allprices,barsize,amountofbars);
for i = 1:amountofbars
%For first bar use firstprice
if i == 1
pricediff(i) = bars(end,i)-firstprice;
continue;
end
%OVERNIGHT RETURNS
specificbar = alldays((i-1)*barsize:i*barsize);
%
%
%
%
%
%
%
%
%
%
%
%
%
%To find if there are overnight price changes
days = unique(specificbar);
if length(days) > 1
%If so, find start location of trades in last day
newday = find(alltrades(:,1) == days(end));
%Use first price of this last day
pricediff(i) = bars(end,i) - alltrades(newday(end),3);
continue;
end
% NO OVERNIGHT RETURNS
pricediff(i) = bars(end,i)- bars(end,i-1);
end
xix
% APPLY
stdev =
distr =
for
BVC
std(pricediff);
tcdf(pricediff/stdev,0.25);
i = 1:amountofbars
bvc(i) = barsize*distr(i);
end
end
%NORMAL DISTRIBUTION
%stdev = std(pricediff);
%mu = mean(pricediff);
%distr = normcdf(pricediff/stdev,mu,stdev);
%
for i = 1:amountofbars
%
bvc(i) = barsize*distr(i) ;
%
end
%end
xx
BULK ACCURACY RATIO
function [ bar ] = BAR( bvc, barsize, alltrades )
%Delete the first bar
amountofbars = ceil((length(alltrades)-1)/barsize)-1;
%Initialize vectors
alltrueinitiators = zeros(amountofbars*barsize,1);
truebvc = zeros(amountofbars,1);
accuracy = zeros(amountofbars,1);
%Extract true trade initiators
alltrueinitiators(1:(length(alltrueinitiators)-1)) = alltrades
(2:amountofbars*barsize,6);
alltrueinitiators(end) = alltrades(end,6);
%Create bars to be able to compare
bars = reshape(alltrueinitiators,barsize,amountofbars);
%Count buys per bar
for i = 1:amountofbars
truebvc(i) = sum(bars(:,i) == 1);
end
%Apply BAR
for i = 1:amountofbars
accuracy(i) = ((min(truebvc(i), bvc(i))) + min(barsizetruebvc(i),barsize-bvc(i)))/barsize;
end
bar = mean(accuracy);
end
xxi