Algorithmic Trading Strategies

After concluding my exchange studies at the National University of Singapore, I returned to Sweden with the goal of finishing my master’s degree. I decided to embark on a thesis within then realm of automated trading algorithms. It was conducted in collaboration with a Swedish hedge fund that specializes in high latency automated trading, mainly in commodity and FX futures markets. My efforts gave rise to a quantitative cost model that could predict the cost of placing a fill or kill limit order. My model of the market dynamics offered significatly enhanced performance compared to the existing one - and laid the foundation for an enhanced trading algorithm to be constructed. A brief summary of the constituents of this thesis can be found below. A link to the full thesis can be found at the bottom of this document.

Fill or kill limit orders

The fill or kill limit order is a variation of the standard limit order. It comes with the additional feature of being executed immediately upon its arrival at the exchange. If a counterparty can be found at the stipulated limit price or better, the order will be filled. If such a counterparty cannot be found, the order is cancelled (killed) with immediate effect. This means that a fill or kill limit order, unlike a standard limit order, will never be placed in a queue - and consequently, it’s behavior is largely agnostic to the exchange’s queuing algorithm. Thanks to this scope restriction, the results of my thesis can be generalized to a large number of exchanges.  

Predicting the cost of placing an order

An explicit definition for the cost of placing fill or kill limit orders in currency markets is naturally of essential importance to the thesis. In loose terms, the cost can be thought of as the price we pay for placing an order, minus the fair value of the asset we receive by doing so. An essential problem is that, at the time of placing the order, neither these quantities can be directly observed. Instead they have to be estimated, which in my case was done through a model of the order book. 

The order book

Information about the market price of an asset, which is traded on a secondary market, can be found in the order book. It contains a record of the current limit orders that are active for a particular asset and exchange. An illustration of an order book can be seen below. The price is on the x-axis and the number of queued orders for a particular price are depicted along the y-axis. The blue rectangles represents buy limit orders and the red boxes represent sell limit orders. 

The model at a glance

On a very high level, the model can be decomposed into two sub-models: A model describing the frequency of new market events - and a model describing how new markets event impact the order book state. 

Modelling the frequency of market events

The frequency of incoming market events was assumed to depend on the time of day, as well as the time since the last market event.

Time of day dependence: 
Although a significant portion of daily trading is now performed by automated trading algorithms - the time of day still plays a significant role in the overall activity of the markets. This can be observed in the following graph over the daily trading activity for futures contract on Japanese Yen (on the CME exchange). The x-axis displays the time of day in hours (EST). The market activity can be seen on the y-axis.  

Note that there are three distinct peaks in the activity. These correspond to an increase in trading activity in the European, American and Asian markets respectively. 

Time since last market event: 
Every order place in the market conveys some information about market participants expectations of future price moves. Market participants are constantly trying to predict future price expectations of an asset - and the information provided by a new market event might be enough to convince other market participants into making trades of their own. Moreover, due to a large number of algorithmic traders in the markets, these responses can be quite fast. One therefore observes that the frequency of incoming market events tends to be high shortly after another market event has occurred. 

Modelling how new markets event impact the order book state

 The other part of the puzzle is determining how, given a number of market events, the order book is likely to evolve. This was modeled with the help of a Markov chain.

Conclusion 

 

In conclusion, I found that the developed cost model significantly outperformed a common reference metric. Hence, there is utility in implementing a algorithmic trading strategy based on my findings. 

If you found the introduction above interesting, I recommend you have a look at the paper in it’s entirety. It is accessible via the following link:

Acknowledgements

I want to express my sincere gratitude to Simone Calogero, who was my supervisor during the project. Thanks to his generosity, my thesis could be conducted between June and September 2020 - a time period which is normally unheard of. During the project he also provided me with continuous guidance and support.