Fully automated futures trading

What are folks doing with US 5-year note (situation is similar with 2- and 10- year) right now, I rolled to hold June (March contract is past first notice) but there's no liquidity for September, how do you compute carry?

I just checked I already have 17 EOD prices for each of the June ZF and ZT in my database (downloaded automatically daily), maybe there's no liquidity, but there's still somehow an EOD price coming from IB (every contract should have an official closing price I guess?), also, I'm smoothing carry signal, so in any case I need longer time series to do it than usually available form the current pair, so the system stitches together older pairs of price-carry contracts from the previous periods when there's not enough data in the current pair and then computes the signal on that longer historical time-series which only ends with the latest pair..

The September contract for US5 (ZF) does have historical data. There have been trades in the past. However, from Feb 18th (or earlier) until today there have been no trades in this September contract. So any price data on this contract is stale. You would not be able to use that for a carry trading rule.

To calculate carry you need matching prices in the two contracts. Do these have to be trades? Not neccessarily. In fact it might be worse, if for example you took the last trade in two contracts; but one of those trades occured just before the close, and the other in an illiquid contract.

I use quoted prices at the close. What if a contract isn't trading? There will nearly always be a quote at the close. Usuually this will be 'marked to model'. The spread will therefore be accurate even if no trades have actually taken place.

Here for example are the prices I have for Sep and June:

Code:
Sep
2020-02-26 23:00:00  121.703125  27467
2020-02-27 23:00:00  121.796875  27475
2020-02-28 23:00:00  122.750000  27483

June
2020-02-26 18:22:18  121.566406  27456
2020-02-26 23:00:00  121.585938  27457
2020-02-27 14:06:55  121.933594  27460
2020-02-27 15:16:28  122.042969  27461
2020-02-27 16:24:20  121.886719  27462
2020-02-27 17:24:45  121.792969  27463
2020-02-27 18:25:10  121.753906  27464
2020-02-27 23:00:00  121.937500  27465
2020-02-28 14:20:03  122.503906  27468
2020-02-28 15:27:17  122.550781  27469
2020-02-28 16:36:04  122.558594  27470
2020-02-28 17:36:28  122.535156  27471
2020-02-28 18:36:59  122.597656  27472
2020-02-28 23:00:00  122.570312  27473
2020-03-02 14:10:54  123.050781  27476
2020-03-02 15:11:19  123.207031  27477
2020-03-02 16:11:33  123.121094  27478
2020-03-02 17:12:11  123.003906  27479
2020-03-02 18:12:24  122.996094  27480
2020-03-02 23:00:00  122.601562  27481

23:00 is the pseudo timestamp for a closing price. I don't sample the forward contract intraday. There are matched prices for 26,27,28 February.

Sometimes the quote is stale and there is a jump in the carry signal. Big deal. Because I'm trading carry with a smooth that doesn't impact the signal so much. Sometimes you don't even get a quote, like for yesterday. Big deal. At the extreme end, as long as I got a pair of matched prices every time I rolled (the minimum required for the backadjustment to work) I could calculate carry.

If you want to get very anal about this and say you won't use carry at all then I respect your decision, but there is no evidence that having a 'poorer quality' carry signal leads to poorer Sharpe; quite the opposite since the problem is endemic in bond futures which have very high carry returns (could be Beta... see below), whereas in commodities with long series of traded contracts carry doesn't work so well.

We're trying to forecast roughly what a price is doing based on an imperfect indicator. We're not doing cash-futures arbitrage. We're not trading the Jun-Sep spread. We don't have to be anal about this.

Carry is different for different futures, right? For bond futures, you can get the "spot futures price" by using the CTD bond and it's conversion factor. The difference between the futures price and this "implied spot" scaled by time to expiration is your carry (a.k.a. implied repo).

Correct, but this is a pain that needs quite a bit more data (at AHL we used to use the underlying govvie interest rate curve to calculate carry

I don't use the carry rule, because of this very reason. Others use the carry rule only for those instruments for which future contracts are available. So they set a parameter for each instrument to indicate whether the carry rule should be used or not.

Others, like me, use the carry rule on every single instrument :-)


In my experience, the carry factor has a higher beta to the stock markets than momentum, so it is less effective as a diversifier if you are including the strategy as part of a balanced portfolio of long-only equity indicies and systematic strategy. When markets go into risk-off mode (e.g. during a market crash), carry factor also suffers. On the other hand, during a crisis, the momentum factor tends to do well so it could be better at offsetting stocks.

For this reason, personally I only use the momentum factor without the carry in the systematic portion of my portfolio.

That's a perfectly valid stance to take. Just bear in mind one point: do you calculate momentum based on a total return series? (like a back adjusted futures price series) Then you will have an implicit allocation to carry and the carry factor. So I would be surprised if removing it had a huge effect. I don't optimise in the presence of my long only portfolio so I haven't checked this myself. My long only has a momentum overlay anyway so I'm more likely to want a bit less momentum.

(This also means that if you have carry and total return momentum, your allocation to carry is higher than you think)

GAT
 
I could trade without IB data (for example using a source like barchart for daily prices) but then I'd have to trade 'blind' on market orders since I need the live data for my execution algo.

IB also offers snapshot quotes that could be used to work around this problem. They charge a few cents per quote depending on the market, and will automatically upgrade you to a subscription in any month that you spend more than the subscription fee would have been.

I don't know if a bit more diversification would justify even this cost, but it's certainly cheaper than paying for full market data, especially for anyone who has to pay the exorbitant "professional" rates.

https://ibkr.info/article/2830
 
Well, I'd imagine that your strategies are exploiting a very specific feature, so it's hard for me to comment. In general, however, liquidity and efficiency go hand in hand. Something like the spooz are very liquid and extremely efficient, while something like SET50 futures have all sorts of quirks you can exploit.

PS. Actually, this make me wonder if that's a sign that your primary source of alpha is cross-sectional risk premia rather than market inefficiencies.
I’m intrigued by the ‘quirks in the SET50’ comment. What does this mean?
 
Interesting. I was thinking about that, but quickly discarded it as I think Rob said in Leveraged Trading (perhaps in Systematic trading as well if I recall correctly) that that's not a good idea.
I think it's worth a backtest at least :) Thanks!



Did you mean June or September? I see that June has a bunch of prices, September is my problem :)
If you query reqHistoricalData, you'll get a closing price even for September as you mentioned, but I also don't know where is that coming from if there hasn't been a single trade yet. Cursory looks shows that it's the same as the Jun price, so it might be that they just copy it? :shrug:
yes, I meant September, sorry
 
Correct, but this is a pain that needs quite a bit more data (at AHL we used to use the underlying govvie interest rate curve to calculate carry
Yeah, you can make it arbitrarily complex depending on how anal you are.

I’m intrigued by the ‘quirks in the SET50’ comment. What does this mean?
quirks - Plural form of quirk, kwûrk, n. A peculiarity of behavior; an idiosyncrasy.
In a lot of smaller index futures, there are various specific captive flows or product details. Sometimes it's possible to find ways to make some money in a low-risk way, if you know where to look. The problem with these strategies (for someone like myself) is capacity.
 
Yeah, you can make it arbitrarily complex depending on how anal you are.



In a lot of smaller index futures, there are various specific captive flows or product details. Sometimes it's possible to find ways to make some money in a low-risk way, if you know where to look. The problem with these strategies (for someone like myself) is capacity.

What are captive flows?
 
What are captive flows?
What is this, a vocabulary night? :D
captive, adj. Restrained by circumstances that prevent free choice.
A lot of institutions are forced to trade things - hedge, cover their positions, show lower risk for the books. All of these trades are done not because they love to sell futures specifically if it rains at 2pm, but because they have no choice. If you know that people like these are coming to trade, you can make a little cash for yourself.
 
What is this, a vocabulary night? :D

A lot of institutions are forced to trade things - hedge, cover their positions, show lower risk for the books. All of these trades are done not because they love to sell futures specifically if it rains at 2pm, but because they have no choice. If you know that people like these are coming to trade, you can make a little cash for yourself.
Thanks - interesting!
 
Back
Top