Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 16:55:58 +0000



Post From: Teton Routing service and appropriate VPS wit lowest Ping!

[2022-03-11 15:23:41]
1+1=10 - Posts: 270
Hi Tonkadad,

I'm going to answer the questions in reverse order:

---------------------------------------
Have you ever done any testing from your entry data to see if entering 100 or 200 millis, etc... later gave any appreciable price improvement?

First, let me give the general rule and then give the evidence to support the rule. The rule is that the impact of latency is directly related to how far your take profit is from your entry price. If your take profit is 1 tick, then latency is the #1 factor. At 10 ticks latency might be the difference between profitability and loss. At >= 20 ticks, it is unlikely to make much of a difference.

Now as to the evidence to support this rule:

1. According to the CFTC in 2019 fully 50%-90% of trades were automated — the number is likely even slightly higher now. Source: See page 7’s “Exhibit 2: Share Of Automated Futures & Options Transactions”: https://www.cftc.gov/sites/default/files/2019-03/automatedordersreport032719.pdf

It is because the majority of trades are automated that latency matters for short-term strategies.

2. The effect of latency on profitability has been the subject of many academic papers. (One of the things I enjoy doing to increase my trading knowledge is reading papers written by Masters/PhD authors, some of whom go on to work as professional traders.) For example, there's a 2014 version of an paper entitled "Risk and Return in High-Frequency Trading": https://www.cftc.gov/sites/default/files/idc/groups/public/@economicanalysis/documents/file/oce_riskandreturn0414.pdf

The abstract says: "This paper studies high frequency trading (HFT) in the E-mini S&P 500 futures contract over a two-year period and finds that revenue is concentrated among a small number of HFT firms who achieve greater investment performance through liquidity-taking activity and higher speed. While the median HFT firm realizes an annualized Sharpe ratio of 4.3 and a four-factor annualized alpha of 22.02%, revenues persistently and disproportionally accumulate to top performing HFTs, consistent with winner-takes-all industry structure. New entrants are less profitable and more likely to exit. Our results imply that HFT firms have strong incentives to take liquidity and compete over small increases in speed."

In 2018, the same authors submitted a new version of the same paper: https://www.cb.cityu.edu.hk/ef/doc/GRU/WPS/GRU%232017-018%20Baron%20et%20al.pdf

The abstract says: "We study performance and competition among firms engaging in high-frequency trading (HFT). We construct measures of latency and find that differences in relative latency account for large differences in HFT firms’ trading performance. HFT firms that improve their latency rank due to colocation upgrades see improved trading performance. The stronger performance associated with speed comes through both the short-lived information channel and the risk management channel, and speed is useful for various strategies, including market making and cross-market arbitrage. We find empirical support for many predictions regarding relative latency competition."

----------------------------

The quest for low latency assumes that once a setup is recognized either by human or computer and an order is initiated that it goes in your direction, would you basically agree? If not, please expound upon that.

A good way to explain when latency matters is by describing a short-term strategy. This is probably not a profitable strategy, to be clear. I should also add this type of strategy is typically done via an automated fashion -- although some claim to do similar things manually: https://www.nobsdaytrading.com/videos/

I will describe the logic of the strategy when making a decision to enter long (but all of this could be reversed in a decision to enter short). Let's say one of my decision making filters is the ratio of buy to sell limit orders and the limit order book looks like this:

990 -- L2 ask size
550 -- L1 ask size
-------
690 -- L1 bid size
1200 -- L2 bid size

Let's say more trades are made and the offers are being depleted faster than the bids so now our book looks like this:

860 -- L2 Ask size; this number became smaller due to cancellations
50 -- L1 Ask size
------
500 -- L1 Bid size
1300 -- L2 Bid size

And let's say the strategy thinks this is an advantageous time to place a buy limit order at the L1 Ask price because:

1. 50:500 = 1:10 -- L1 Ask is more likely to be depleted than L1 Bid meaning price is more likely to tick up.

2. (860+50) : (500+1300) = 910:1800 ~= 1:2 -- There's 2x as many immediate buyers as sellers so perhaps there will be follow-through at least for a few ticks.

So here is an example where the round trip time between getting new market data and submitting an order is crucial for 2 reasons:

1. Latency answers the question of how delayed is my algorithm's view of the limit order book from the actual state of the limit order book at the exchange. The shorter the latency, the less likely a change has occurred which could result in the invalidation of our reason for sending the order.

2. Latency is what determines our ability to recognize that situation and get our order in at L1 Ask before the other buyers can either move their orders up or enter new orders at L1 Ask. If we're right and price ticks up, but we're too late, then we won't get to trade. Unfortunately, if price ticks down after we get an order in, no matter how late we were, we will get to trade, but it is in a situation where our prediction was wrong! Thus, low latency is what allows a short-term trader to take advantage of their short-term price predictions.

Now continuing with the trade let's say we got in long at L1 Ask and we're going to exit the trade for loss at L2 Bid.

860 -- L2 Ask size
50 -- L1 Ask size -- our ENTRY
------
500 -- L1 Bid size
1300 -- L2 Bid size -- our SL

There's 3 situations:

1. We have a stop loss which is simulated by your trading platform and not actually at the exchange or order routing servers. An example of this situation is when on SC you submit a bracket order using some order routers like CQG, or as I mentioned before when you have a trailing stop in SC. If you're a short-term trader in this situation then latency determines slippage. It can be the difference between getting out at your SL price OR getting out 2 ticks worse than your SL price.

2. We have a stop loss at the exchange or order routing servers. Here there's very little about latency we can control other than inquiring about the latency of our order router to the exchange (Teton, CQG, Rithmic, TT, etc.)

3. Let's consider our order book right before a normal stop loss would be triggered:
860 -- L3 Ask size
710 -- L2 Ask size -- our ENTRY
400 -- L1 Ask size
------
1300 -- L1 Bid size -- our SL

The way a stop loss works, for long trades, is when the first trade hits the L1 Bid, then a sell market order gets submitted which should also hopefully hit the L1 Bid. But let's consider the situation where the average trade is much smaller than the L1 Bid size. Let's say the average trade size (from any market participant) is 10 contracts. Then our order book would look like this:

860 -- L3 Ask size
710 -- L2 Ask size -- our ENTRY
400 -- L1 Ask size
------
1290 -- L1 Bid size -- our SL

Now according to a normal stop loss, instantly it would become a market order and get us out of the trade. But this may not be ideal because the probability of price actually going to L2 Bid is not very high as 1290 / 10 == 129 more trades would have to occur for price to go to L2 Bid.

Instead, let's wait till L1 Bid size gets depleted before we actually activate our stop loss. Perhaps we wait till L1 Bid size is 300 and then we send our market order to exit the trade. In short-term trading this adjustment can turn losing trades into winners.

For this type of stop loss strategy, latency is critical, especially since for a retail trader the decision-making and order sending happens on your computer. (If you pay TT, Rithmic, & CQG $500-$1000 a month you can put your algos on their order routing servers as I mentioned in the previous post.)

SC actually has a version of this type of order: Order Types: Bid Ask Quantity Triggered Stop (For exiting a long trade, you'd use the Sell Bid Ask Quantity Triggered Stop.)

--------------------------------------------

There's a different type of strategy that is not limit order book orientated that is affected by latency that is simpler to explain: short-term pairs trading.

Let's say the front contract for Corn is March 22 and the next contract is May 22. Let's say we're convinced that for this portion of the year there's no significant seasonal differences between the value of March Corn compared to May Corn. So we think we can employ a short-term mean reversion strategy based on Bollinger Bands (Standard Deviation Bands). In short, when the price spread is >= 2 deviations above the spread's 60 minute average price, then we're going to short the spread, and vice-versa for longs.

The reason why latency may matter is for two reasons:

1. If other traders are employing the same strategy, and they are faster, then they may enter orders which cause the spread to retract from the extreme before your algo can react.

2. This type of strategy will calculate the spread's price based on the difference between the March bid - May ask or the difference between the March ask - May bid. And one's latency determines how often one samples those differences. If your round trip latency is 100 millis but the spread is only above >= 2 deviations for 20 millis then you may miss a profitable trade. (And again, just like stop losses if the spread >= 2 deviations for longer periods of time, the chance of hitting your stop loss which might be at 2.5 deviations increases.)

-------------------------

I know that was a lot but trading is complicated! By the way, I tried to develop a short-term strategy and I abandoned it. Instead, I've been focusing more on longer-term strategies. I actually am about to launch one where I hold trades for weeks based on spread seasonality. For instance, if your entry date is Dec 1 2022 and your exit date is Jan 10 2022, you'd expect Natural Gas Jan 2022 to go up more than Natural Gas Mar 2022, due to the extreme demand for NG in winter. I can explain more about this type of trading if you'd like.

Hope this all helps!