Fully automated futures trading

Hi All,
I run the system once a day and enter trades manually, based on its output. I also have been manually rolling contracts when I judge it to be necessary.

To make my life easier I am thinking of automating these two elements in the following way. First, I will automate my daily trades by having an autoit script place market orders around 10am each day for any position that needs to change. Second, I will add code to automatically roll my full position in a given instrument, by using market orders at around 10am. I will have the system roll a given instrument based on its historical roll schedule; so if instrument x rolled on 3.10.19 from the march contract to the june, I will have the system do the same on 3.10.20 (or the next nonholiday weekday). If I have 10 contracts on, the script will simply sell all 10 at market, then buy 10 of the next contract (plus or minus any change needed to that instrument's position as a result of the most recent forecast).

Does anyone see any issues with this plan? Thanks.

So you'll have no "soft-roll" period when you opportunistically sell old and buy new contract, all "hard-roll" in one day. I guess it's simpler and simple is good.. I also found it quite tedious to pre-populate all these roll dates for 30+ instruments for the next 100 years (automated it of course, but still a lot of work).. and now I 'm still not sure that I choose the right dates and that the optimal dates will not change in the future (do liquidity patterns around roll dates change over time for the same instrument? how normal that is?). I mostly looked at historical volumes and last allowed trading days around the times I wanted to roll.. Seems to be working so far, but I feel that I'm not monitoring it enough..
 
So you'll have no "soft-roll" period when you opportunistically sell old and buy new contract, all "hard-roll" in one day. I guess it's simpler and simple is good.. I also found it quite tedious to pre-populate all these roll dates for 30+ instruments for the next 100 years (automated it of course, but still a lot of work).. and now I 'm still not sure that I choose the right dates and that the optimal dates will not change in the future. I mostly looked at historical volumes and last allowed trading days around the times I wanted to roll.. Seems to be working so far, but I feel that I'm not monitoring it enough..
For this reason (uncertainty about the best roll date) have I not automated it. Once per day my software checks the expiry dates, or first notice dates, for the instruments which I'm monitoring. When a contract is 14 days or less from its expiry date I will receive a warning message. I then manually decide which next contract I want to use for that instrument, and monitor the daily volume for a couple of days. Based on that do I decide when I roll over. Having done this for about 2 years I now know the usual behavior of most instruments I monitor. I could automate those. But there are some which always cause me doubt about the best way of handling it.
 
Sooo, who's short oil? :D
It didn't fit my budget, but I'm short natural gas, so got some benefits from the dip just now, but oil is 30+%. :caution:
 
Sooo, who's short oil? :D
It didn't fit my budget, but I'm short natural gas, so got some benefits from the dip just now, but oil is 30+%. :caution:
I'm only trading oil in my paper system, but even there the position is flat right now. In PROD I switched oil to gas after the discussions here and it made 3.8k to date. Though v2x and mxp are huge losers so overall I'm still negative since start.
 
Last edited:
Sooo, who's short oil? :D
It didn't fit my budget, but I'm short natural gas, so got some benefits from the dip just now, but oil is 30+%. :caution:
I don't have a position in oil. But some other positions moved strongly in my favor. The current account value (Monday) has jumped up considerably compared to the ending value last Friday night.
 
Sooo, who's short oil? :D
It didn't fit my budget, but I'm short natural gas, so got some benefits from the dip just now, but oil is 30+%. :caution:
Small short in oil and portfolio up 5% today. Crisis alpha? I am not celebrating because it is tiny consolation for the real crisis.
 
Small short in oil and portfolio up 5% today. Crisis alpha? I am not celebrating because it is tiny consolation for the real crisis.

The speed of this turnaround has been too quick for trend following to get out of the lift doors before they closed.

Vol scaling will reduce the damage, and a diversified set of futures will allow you to make some money back.

But I agree, it's very small beer compared to the losses in my long only portfolio. I suppose for the tax year my futures account will show a healthy profit compared to the long only, so on that basis the diversification will be there.

A more expensive insurance policy, buying OTM Puts, would have done much better at the risk of a negative return the rest of the time.

Positions (with the caveat that they haven't yet been adjusted for this mornings price movements):

Code:
       code  position  oposition    buffer status
19      AEX         0  -0.016107  0.021236       
24      AUD        -1  -0.623743  0.234469       
7      BOBL         1   1.077663  0.180126       
8       BTP         0  -0.105802  0.075446       
9      BUND         1   0.862600  0.050115       
20      CAC         0  -0.187319  0.045197       
30   COPPER         0   0.000000  0.172683       
0      CORN        -5  -5.122853  0.731263       
34  CRUDE_W        -1  -0.652118  0.116562       
36  EDOLLAR         7   7.605948  0.638246       
25      EUR         0   0.617059  0.146754       
37  EUROSTX        -6  -5.999994  0.000001       
35   GAS_US        -3  -3.144918  0.264056       
26      GBP         0   0.000000  0.212271       
31     GOLD         0   0.249252  0.044106       
27      JPY         1   0.628077  0.101809       
18    KOSPI         0   0.000000  0.024298       
6       KR3         2   1.590575  0.297469       
1   LEANHOG        -1  -1.412098  0.207769       
2   LIVECOW        -2  -1.962844  0.223676       
28      MXP         2   1.840526  0.244053       
22   NASDAQ         0  -0.034487  0.015397       
29      NZD        -1  -0.882707  0.257750       
10      OAT         1   1.478340  0.176718       
32   PALLAD         0   0.134898  0.012485       
33     PLAT         0   0.000000  0.140230       
11    SHATZ         0   0.000000  0.000006       
21      SMI         0   0.000000  0.000000       
3   SOYBEAN        -4  -5.205597  0.753328       
23    SP500         0  -0.038516  0.019509       
12     US10         0   0.444730  0.035001       
13      US2         0   0.294433  0.087687       
14     US20         0   0.178093  0.012199       
15      US5         0   0.176675  0.060326       
16      V2X        -4  -4.841148  0.433072       
17      VIX         0  -0.370172  0.026204       
4     WHEAT        -3  -3.202628  0.459900       
5      KR10         0   0.649723  0.092453

GAT
 
The speed of this turnaround has been too quick for trend following to get out of the lift doors before they closed.

Vol scaling will reduce the damage, and a diversified set of futures will allow you to make some money back.

But I agree, it's very small beer compared to the losses in my long only portfolio. I suppose for the tax year my futures account will show a healthy profit compared to the long only, so on that basis the diversification will be there.

A more expensive insurance policy, buying OTM Puts, would have done much better at the risk of a negative return the rest of the time.

Positions (with the caveat that they haven't yet been adjusted for this mornings price movements):

Code:
       code  position  oposition    buffer status
19      AEX         0  -0.016107  0.021236    
24      AUD        -1  -0.623743  0.234469    
7      BOBL         1   1.077663  0.180126    
8       BTP         0  -0.105802  0.075446    
9      BUND         1   0.862600  0.050115    
20      CAC         0  -0.187319  0.045197    
30   COPPER         0   0.000000  0.172683    
0      CORN        -5  -5.122853  0.731263    
34  CRUDE_W        -1  -0.652118  0.116562    
36  EDOLLAR         7   7.605948  0.638246    
25      EUR         0   0.617059  0.146754    
37  EUROSTX        -6  -5.999994  0.000001    
35   GAS_US        -3  -3.144918  0.264056    
26      GBP         0   0.000000  0.212271    
31     GOLD         0   0.249252  0.044106    
27      JPY         1   0.628077  0.101809    
18    KOSPI         0   0.000000  0.024298    
6       KR3         2   1.590575  0.297469    
1   LEANHOG        -1  -1.412098  0.207769    
2   LIVECOW        -2  -1.962844  0.223676    
28      MXP         2   1.840526  0.244053    
22   NASDAQ         0  -0.034487  0.015397    
29      NZD        -1  -0.882707  0.257750    
10      OAT         1   1.478340  0.176718    
32   PALLAD         0   0.134898  0.012485    
33     PLAT         0   0.000000  0.140230    
11    SHATZ         0   0.000000  0.000006    
21      SMI         0   0.000000  0.000000    
3   SOYBEAN        -4  -5.205597  0.753328    
23    SP500         0  -0.038516  0.019509    
12     US10         0   0.444730  0.035001    
13      US2         0   0.294433  0.087687    
14     US20         0   0.178093  0.012199    
15      US5         0   0.176675  0.060326    
16      V2X        -4  -4.841148  0.433072    
17      VIX         0  -0.370172  0.026204    
4     WHEAT        -3  -3.202628  0.459900    
5      KR10         0   0.649723  0.092453

GAT
100% agree. I actually have a small synthetic put in place (equity short + risk reversal) but of course not nearly enough. This is wild, hourly portfolio vol in the system heading to 100% (annualised)
 
I'm up 7% for the day (was 12% at some point) on the trading alone, and am running some math to see if my risk management and position sizing has a bug, or is this expected. First look says it's normal, I was just lucky to be short NG, ESTX and Corn, and long Eurodollar, 5-year and VSTOXX.

I didn't write a detailed post of what I'm doing (in the making, I really like Kernfusion's a few pages back), but basically, it's literally what's described in Leveraged Trading, 8 instruments. Execution algo from Rob's blog. Only modification I've done is to turn off carry for ZF, ESTX and MXP as of last week, and trying with that.

Overall (combined with long only portfolio, for me that's more of investment than trading, I don't touch that) I'm down big time too, but I don't look at that as anything negative, I know that's long term, and eventually that will go back up. I'm just happy that I have something that (so far) seems to be uncorrelated (or maybe negatively correlated, not sure on the right wording) with the overall market.
 
@wopr I seem to be in the same boat as you. I have a long only "buy and hold" investment portfolio, which is down big time. And run a futures trading system, based on Rob's book "Systematic Trading". However, I did not use his software, but wrote it myself. That futures account was on Monday up about 10% for the day, compared to last Friday's closing point. At one point is was about 14% up. But now (Tuesday) it seems to come down to about +7%. Also I notice low correlation between the ETF investments and the futures trading account.
I would not have been surprised if certain position sizes were reduced, due to the increase in value volatility. However, IB seems to have had major issues and TWS could not connect to their servers. So no trades were executed.
 
Back
Top