Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

On March 11th, 2014, Virtu Financial Inc., the high frequency market maker, who had just one day of trading losses in 1238 days, filed for an initial public offering. Many people were astonished by their near-perfect record as a market maker, while others argued that the profit is becoming unsustainable due to competitions. In this paper we address two questions: what kind of market making strategy helps to increase HFTs’ profit, and how this strategy performances under competition environments?

The Securities and Exchange Commission (SEC) generalized four types of trading strategies that often utilized by HFTs [1]. Among them, market making is the most transparent one and constitutes more than 60 % of HFT volume [2]. Menkveld carefully studied the profits and net position of a large HFT who acts as a modern market maker [3]. But the strategies under the performance of this HFT, as well as the relationship between strategy and market condition, remains unrevealed.

The formidable challenge for better revealing HFT activities, is obtaining comprehensive and detailed data. Agent-based simulation provides an effective way to solve this problem, and has already been used to design trading strategies. Kendall and Su use an agent-based model to evolve successful trading strategies by integrating individual learning and social learning [4]. Nevmyvaka et al. use a simple class of non-predictive trading strategies to test electronic market making, and examine the impact of various parameters on the market maker’s performance [5]. Wang et al. implement a learning algorithm for market makers to search the optimal trading frequency, and they study how different trading frequencies of market makers affect the market [6]. Wah and Wellman employ simulation based methods to evaluate heuristic strategies for market makers and find the presence of the market maker is benefit to both impatient investors and overall market [7]. Comparing with their approaches, our agent-based simulation focuses on testing the combinations of different classes of market making strategies for HFTs, and further examining the performance in competitive environments. Our main contributions are as follows:

  • We build an artificial transaction system to represent HFTs’ activities in stock market when they act as market makers. This system fits with main statistical properties of financial markets and is used to compare the performance of different market making strategies.

  • We find one market making strategy which increases daily return and decreases end-of-day inventory, is offering prices around last trading price, as well as take advantage of order imbalance, together using adaptive order size based on previous order execution rate and a net threshold based on average trading volume.

  • We further introducing the environment of increased competitors and decreased latency, in order to test the strategy under different market conditions.

2 Modelling of High Frequency Trading

In this section, we propose an artificial stock market in which agents trade through a limit-order book (LOB). Agents are classified into two categories according to their goals and strategies. The one is Low Frequency Traders (LFTs), who concern the value of the asset and try to earn the profit using an integrated strategy of fundamentalist and chartist. The other is High Frequency Traders (HFTs), who ignore the value of the asset but only pay attention to the trading environment itself, and they mainly try to accumulate the profit on the spread using the market making strategy. We stimulate the intra-day transaction scenario where both agents trade on one single asset. The framework of the model are presented first, following by details.

2.1 Framework

The model is an extension of the one presented by Leal et al. [8]. There are totally T sessions in each of which both HFTs and LFTs trade. The trading procedure is as follows:

  1. 1.

    Active LFTs decide whether to enter the market according to their expected returns. If enter, they submit either a sell or a buy order with size and price based on their expectations.

  2. 2.

    Knowing the orders submitted by LFTs, HFTs decide whether to enter the market. If enter, they usually submit both a sell and a buy order with size and price in order to absorb the orders of LFTs and earn the profit on the spread.

  3. 3.

    LFTs and HFTs’ orders are matched and executed according to their price and arrival time. the last trading price is determined then and unexecuted orders rest in the LOB for the next trading session.

  4. 4.

    After each session, LFTs and HFTs decide whether to update their trading parameters according to their performances.

2.2 Low Frequency Traders Activity

For each trading session, LFT i acts as following:

  1. 1.

    Decides whether to be active according to its active possibility \(LF^{i}{\_}ap\).

    \(LF^{i}{\_}ap\) is drawn from a uniform distribution with support \([\alpha _{min}^{L},\alpha _{max}^{L}]\) and may be changed according to individual profit.

  2. 2.

    If being active, LFT i first calculates the expected price of the asset \(LF^{i}{\_}EP\) based on its expected return \(LF^{i}{\_}ER\), then generates the ask price \(LF^{i}{\_}AP_{t}\) and bid price \(LF^{i}{\_}BP_{t}\) at time t based on last trading price p t .

    The return at time t are defined as

    $$\displaystyle{ R_{t} = log( \frac{p_{t}} {p_{t-1}})\, }$$
    (6.1)

    Utilizing the idea of LeBaron and Yamamoto [9]. LFTs form their weighted forecasts on the future returns by combining fundamental-, chart-, and noise-based forecasts as follows:

    $$\displaystyle{ LF^{i}{\_}ER = n_{ 1}^{i} \times log(\frac{p^{f}} {p_{t}} ) + n_{2}^{i} \times \frac{1} {l_{i}}\sum _{j=1}^{l_{i} }log( \frac{p_{t-1}} {p_{t-j-1}}) + n_{3}^{i} \times N(0,1)\, }$$
    (6.2)

    and the expected price \(LF^{i}{\_}EP\) is calculated as \(p_{t} \times e^{LF^{i}{\_}ER }\).

    l i represents the memory length of LFT i, and \(l_{i} \sim U(1,l_{max})\). \(n_{1}^{i}\), \(n_{2}^{i}\), \(n_{3}^{i}\) are weights for fundamentalist, chartist, and noise-induced components for LFT i, respectively, and randomly assigned according to normal distributions: \(n_{1}^{i} \sim \vert N(0,\sigma _{1})\vert \), n 2 i ∼ N(0, σ 2), and \(n_{3}^{i} \sim N(0,\sigma _{3})\).

    And price for sell/buy orders at time t are formed as follows:

    $$\displaystyle\begin{array}{rcl} LF^{i}{\_}AP_{ t} = p_{t-1} \times (1 -\kappa _{i}^{L})& & \\ LF^{i}{\_}BP_{ t} = p_{t-1} \times (1 +\kappa _{ i}^{L})& & {}\end{array}$$
    (6.3)

    where \(\kappa _{i} \sim U(\kappa _{min},\kappa _{max})\) represents the price fluctuation parameter.

  3. 3.

    If the ask price of LFT i is higher than its expected future price, LFT i will submit a sell order at price \(LF^{i}{\_}AP_{t}\) with size \(LF^{i}{\_}AS\); if the bid price of LFT i is lower than its expected future price, it will submit a buy order at price \(LF^{i}{\_}BP_{t}\) with size \(LF^{i}{\_}BS\). The valid time of the order is \(\gamma ^{L}\).

    The size of the orders are proportional to expected returns and are formed as:

    $$\displaystyle\begin{array}{rcl} LF^{i}{\_}AS = LF^{i}{\_}ER \times \eta _{ i}^{L}& & \\ LF^{i}{\_}BS = -LF^{i}{\_}ER \times \eta _{ i}^{L}& & {}\end{array}$$
    (6.4)

    where \(\eta _{i}^{L}\) represents the size fluctuation parameter of LFTs and \(\eta _{i}^{L} \sim U(\eta _{min}^{L},\eta _{max}^{L})\), it can be changed according to individual profit. And if the order has not been fully executed within γ L, the rest of it will be removed from the LOB.

  4. 4.

    After τ sessions, LFT i decide whether to update its trading parameters based on its profit \(LF^{i}{\_}P_{t}\).

    if \(LF^{i}{\_}P_{t} > 0\), LFT i will update some of its parameters as:

    \(LF^{i}{\_}ap \sim U(LF^{i}{\_}ap,\alpha _{max})\) \(\eta _{i}^{L} \sim U(\eta _{i}^{L},\eta _{max}^{L})\)

    if \(LF^{i}{\_}P_{t}\leqslant 0\), it becomes:

    \(LF^{i}{\_}ap \sim U(\alpha _{min},LF^{i}{\_}ap)\) \(\eta _{i}^{L} \sim U(\eta _{min}^{L},\eta _{i}^{L})\)

    if \(LF^{i}{\_}P_{t}\leqslant 0\) and a random number \(\sim U[0,1] <\lambda\), then the component-weighted parameters and memory length will be renewed based on the distributions:

    \(n_{1}^{i} \sim \vert N(0,\sigma _{1})\vert \), \(n_{2}^{i} \sim N(0,\sigma _{2})\), \(n_{3}^{i} \sim N(0,\sigma _{3})\), and \(l_{i} \sim U(1,l_{max})\).

2.3 High Frequency Traders Activity

For each trading session, HFT j acts as follows:

  1. 1.

    HFT j decides whether to be active based on the price fluctuation \(P_{t}^{flu}\) (bps) at time t and its action threshold \(HF^{j}{\_}at\).

    Since evidence suggests HFT activities prefer higher volatility. We calculate

    $$\displaystyle{ P_{t}^{flu} = \vert \frac{p_{t-1} - p_{t-2}} {p_{t-1}} \vert \times 10,000\, }$$
    (6.5)

    and \(HF^{j}{\_}at \sim U(\alpha _{min}^{H},\alpha _{max}^{H})\). If \(P_{t}^{flu} > HF^{j}{\_}at\), then HFT j becomes active.

  2. 2.

    If being active, it submits both a sell order at price \(HF^{j}{\_}AP\) with size \(HF^{j}{\_}AS\) and a buy order at price \(HF^{j}{\_}BP\) with size \(HF^{j}{\_}BS\). All orders from HFTs are submitted in a random order, and the valid time of the orders is γ H.

    Under the defaulted setting, \(HF^{j}{\_}AP = p_{t} +\kappa _{ j}^{H}\), \(HF^{j}{\_}BP = p_{t} -\kappa _{j}^{H}\), κ H refers to price fluctuation. While HFTs decide the order quantity based on the quotes in the LOB. \(HF^{j}{\_}AS = HF^{j}{\_}BS = 0.5 \times (q_{b} + q_{s}) \times \eta _{j}^{H}\). Where q b (q s ) refers to the total size of buy (sell) orders in the LOB at this session, and η H refers to order absorption rate.

  3. 3.

    Like LFTs, after τ sessions, HFT j decide whether to update \(\eta _{j}^{H}\) based on its performance.

2.4 Model Validation

Table 6.1 lists the defaulted value of all the parameters. The number of sessions is set as 400 for intra-day trading. There are 441 traders, and 2 % (9) of them are HFTs [2]. Price and volume related parameters are calibrated to fit with market volatility and liquidity condition respectively, while keeping the diversity of agents.

Table 6.1 Parameters in initial simulation

We check whether the model is able to account for the main stylized facts of financial markets. The price movement generated by the model is in line with the empirical evidence as absence of autocorrelation, see as Fig. 6.1. In contrast, the autocorrelation function of absolute return display a slow decaying pattern, see as Fig. 6.2. In addition, the existence of fat tails in the distribution of price is shown in Fig. 6.3.

Fig. 6.1
figure 1

Autocorrelation of return in HFT simulations

Fig. 6.2
figure 2

Volatility clustering in HFT simulations

Fig. 6.3
figure 3

Return distribution in HFT simulations

3 Exploration of Market Making Strategy

In this section, we design experiments concerning HFT order price, order quantity respectively, trying to find what kind of order price and order quantity help HFTs increasing profits and decreasing risks.

Based on [3], our model assumes HFTs usually utilize passive market making and try to earn the spread. But when they speculated order imbalance by detecting the transaction trends of LFTs, they may utilize aggressive market making. In this case they trade on quickly to get the profit from price movement, or close their position. In the model, we consider HFT’s profit as the daily return, and the risk as the end-of-day inventory. All transaction fees are ignored for simplicity.

3.1 Strategies for Order Price

HFTs switch between passive and aggressive market making. In usual case, HFT use passive market making as a liquidity maker, and they quote either based on last trading price or best ask/bid price to earn the spread. But when the volume difference between ask and bid quoting becomes significant, i.e. when \(\vert q_{b} - q_{s}\vert /(q_{b} + q_{s})\) is over a threshold, they will adopt aggressive market making. In this case HFTs will either quoting along with temporary trend to earn the profit based on the price movement, or against it to take liquidity in order to adjust their position. Shown as Fig. 6.4.

Fig. 6.4
figure 4

Passive and aggressive market making

When HFTs adopt passive market making and offer price around the last trading price, the ask order is offered at p t + 0. 5 × k 1 and bid order at p t − 0. 5 × k 1, where k 1 refers to the ask-bid spread in passive market making condition and its default value is twice the tick size. While offering price around the best ask/bid, they offer ask order at best ask and bid order at best bid in the LOB.

While setting the threshold as 0.5, we suppose when \(\vert q_{b} - q_{s}\vert /(q_{b} + q_{s}) > 0.5\), HFTs will adopt aggressive market making. If sell orders is much more than buy orders, quoting along with the temporary trend means offering ask price at last trading price p t and bid price at p t k 2, where k 2 refers to the ask/bid spread in aggressive market making condition. And quoting against with temporary trend means offering ask price at p t + k 2 and bid price at p t .

3.2 Strategy for Order Quantity

Another question need to be discussed for the strategy is order quantity. In order to gain more profits and fewer risks, HFTs will consider two aspects, increasing the chance of order fulfillment and keeping flat position accordingly.

For the first aspect, When HFTs utilizes passive market making, they are aiming to absorb the orders submitted by LFTs and earn the spread. And when HFTs use aggressive market making, they try to make profits base on the excess liquidity. All HFTs will adaptively adjust their order quantity by calculating the average order execution rate in past few sessions. Suppose r m and r h refer to the market order execution rate and self order execution rate in past τ sessions, so the order quantity Q is decide by:

$$\displaystyle\begin{array}{rcl} Passive: Q = min(q_{b},q_{s}) \times 0.5 \times (r_{m} + r_{h})& & \\ Aggressive: Q = \vert q_{b} - q_{s}\vert \times 0.5 \times (r_{m} + r_{h})& &{}\end{array}$$
(6.6)

For the second aspect, based on the previous work by Menkveld and Hendershott [3, 10], we introduce a parameter named net threshold, denoted as NT to supervise the net position of HFTs, denoted as np. Suppose V i represents the trading volume in session i and NT is proportional to average trading volume in first τ periods, so after τ periods, NT is calculated and works as follows:

$$\displaystyle{ NT = \frac{1} {\tau } \sum _{i=1}^{\tau }V _{ i}\, }$$
(6.7)
  • When | np |  < 0. 5 × NT, it trades as usual.

  • \(0.5 \times NT\leqslant \vert np\vert < NT\), it applies price pressure and adjusts its quotes by one tick size.

  • When \(\vert np\vert \geqslant NT\), it stops one side (buy or sell) trading.

  • a HFT’s max order size equals NT.

3.3 Comparison of Strategies

In last two sections, we mentioned the strategies used for passive and aggressive market making, as well as the method to control end-of-day inventory. We suppose HFTs can use either single or combination of market making, so totally eight types of quoting methods are list in Table 6.2.

Table 6.2 List of quoting strategies

Supposing 2 % of the traders are HFTs, all of them use a same quoting strategy, selected from the list, together with adaptive order quantity and net threshold for controlling inventory, and their orders are submitted in a random order. We test the performance of these strategies focused on the daily return and end-of-day inventory, denoted as EDI. After testing each strategy for 250 simulations, Fig. 6.5 shows the average return and inventory of these strategies.

$$\displaystyle{ EDI\% = \frac{\vert np\vert } {NT} \times 100\,\%\, }$$
(6.8)
Fig. 6.5
figure 5

Comparison of different market making strategies

According to the graph, we see that quoting based on best ask/bid price has its advantage on inventory, which indicate this strategy has the lowest risk. While quoting based on last trading price together using a temporary trend along strategy, lead to the highest return for HFTs. Here, we choose the last+along strategy as the benchmark for further experiments.

4 Experiments on Competition

In following simulations, we change the percentage of HFTs (2 % in previous experiments) to see its influence. On the other hand, all HFTs submit their orders in a random order in past experiments, which means they have similar latencies. Considering HFTs are pursuing lower latency in order to run in front of their competitors nowadays, we arrange different latencies for HFTs. In this case HFTs submit their orders one after another in a fixed order, thus a HFT with lower latency submits its orders earlier and is likely to have higher order execution probabilities.

4.1 Total Return of HFTs

We first consider the total return of HFTs. We concern how HFTs’ profit will be affected by increased competitors and decreased latency. While all HFTs using the last+along strategy, we adjust the number of HFTs, and run the simulation 250 times for each different HFT percentage (0.5 %, 1 %, 1.5 %, …5 %) first in similar then in different latency settings. The total return of HFTs is calculated and shown in Fig. 6.6:

Fig. 6.6
figure 6

Total return of HFTs

There are two things interesting according to this result. On one hand, in both latency conditions, the total return of HFTs first went up and then down. This may because when the number of HFTs is small, HFTs do not fully absorb LFTs’ orders and there are still surplus profit on the spread. But when this number becomes larger, HFTs suffer from position imbalance and need to pay the price to trade out of their positions, thus causes a decline in their total return. On the other hand, the red curve shows the condition that HFTs compete with each other on speed and have different latencies. Comparing to the blue one, it indicates this competition actually decreases HFTs’ total return when the number of HFTs is small but increases their total return when the number is larger.

4.2 Individual Return of HFTs

We then turn to the individual return of HFT and concern the value of low-latency. Supposing HFTs have different latencies, Fig. 6.7 depicts the return difference among LFTs, normal HFTs and the fastest HFT.

Fig. 6.7
figure 7

Individual return of HFTs

In the result, the red curve shows the average individual return of HFTs, it decreases with the increase of HFTs percentage and can be seen as the return of a normal HFT. Since LFTs’ population is much more than HFTs’ and their average return can be seen as zero, the red curve also illustrates the return difference between a normal HFT and a LFT approximately, and can be taken as a reference for a LFT to decide whether it is worth taking part in HFT. The green curve, on the other hand, is calculated as the difference between the average and the highest return (return of the HFT with the lowest latency). It can be interpreted as how much potential profit can be earned for a normal HFT to become the fastest one by renewing its devices or using co-location method. This chart may suggest that although the profit for becoming a HFT decreases with the increase of HFTs, it is always profitable for a HFT to pursue lower latency.

5 Conclusions

This paper focuses on exploring market making strategy for High Frequency Trading and consists of three parts. First we combine previous work and build an intra-day transaction model based on limit order book to simulate the trading activities of HFTs and LFTs. In addition, by analyzing both passive and aggressive market making, we try to figure out what kind of order price and order quantity help HFTs increasing their profits and decreasing their risks. Finally, we test the strategy in competition environments including increased competitors and decreased latency, in order to see its performance.