Fully automated futures trading

Same story and solution for me. IBCalpha couldn't restart my gateway, so I upgraded both the gateway and IBCalpha; IBCalpha now doesn't work at all. But I'm using the new 'built in' once a week option. Not ideal as I inevitably forget to do the restart. On the upside it's one less dependency on a hobby project which is subject to the whims of the IB developers.

I've been reading the threads on here but I can't seem to find a workaround whereby IBCalpha will work as it used to, or do the Sunday restart.

GAT
Indeed. It is no longer possible to find a way around the "Sunday restart". IB has made this impossible, and they did so on purpose.
Previously I could go on a multi-week holiday and have IBCalpha take care of the restarts. Now I am no longer able to do that. Either I have to find software which lets me remotely log on to my trading server at home. Or I would need to put my software at a VPS which I can access via an internet browser. Both solutions come at a cost.
 
40%
I must note that I don't use this futures trading system as a "stand-alone system". To me it provides diversification to my other investments (stocks, ETFs, bonds). I want to minimize the allocated capital but at the same time provide the desired amount of diversification. This led me to increase the volatility target to this level. If I were to set it higher it would more often "bump its head" against the margin requirements and require tweaking from my side. I try to get to the sweet spot where as little interference as possible is obtained.

I'm curious as to what your margin usage typically is.

GAT
 
Same story and solution for me. IBCalpha couldn't restart my gateway, so I upgraded both the gateway and IBCalpha; IBCalpha now doesn't work at all. But I'm using the new 'built in' once a week option. Not ideal as I inevitably forget to do the restart. On the upside it's one less dependency on a hobby project which is subject to the whims of the IB developers.

I've been reading the threads on here but I can't seem to find a workaround whereby IBCalpha will work as it used to, or do the Sunday restart.

GAT

How exactly was working before? I login&logout daily automatically on schedule (ib gateway & ibcalpha) and have no problems (paper account without 2FA).
 
I'm curious as to what your margin usage typically is.
I'm storing NLV, maintenance margin and initial margin on an hourly basis in a spreadsheet. In November there was this sudden spike in volatility. The resulting graph therefore shows clearly the percent usage before and after this spike. The percentage is the margin usage as percentage of NLV (net liquidation value).
gr2.png


Making a graph for the entire year 2021 would take some more time as the number of hourly data points is a bit too large. However, this November graph is pretty representative. With one exception: during mid November the position sizes got a bit too big and IB refused a few trades due to insufficient margin. That's the period where the initial margin is touching 100%. I then dialed back a little bit to avoid this from happening.
 
Last edited:
How exactly was working before? I login&logout daily automatically on schedule (ib gateway & ibcalpha) and have no problems (paper account without 2FA).
The procedure I used was: start IBCalpha. This automatically starts Gateway (or TWS, whatever you want) and provides username and password. Gateway asks you for the 2FA authentication. And then you're set: you can let it run for days/weeks/months without intervention.
 
The procedure I used was: start IBCalpha. This automatically starts Gateway (or TWS, whatever you want) and provides username and password. Gateway asks you for the 2FA authentication. And then you're set: you can let it run for days/weeks/months without intervention.
Ok, I see. Do you see opt-out of 2FA a big drawback? I was thinking of opt-out with secondary username (trading access only) and using IP filter, so only my machine with static IP can login. Primary username will still have 2FA.
 
I'm storing NLV, maintenance margin and initial margin on an hourly basis in a spreadsheet. In November there was this sudden spike in volatility. The resulting graph therefore shows clearly the percent usage before and after this spike. The percentage is the margin usage as percentage of NLV (net liquidation value).
View attachment 274469

Making a graph for the entire year 2021 would take some more time as the number of hourly data points is a bit too large. However, this November graph is pretty representative. With one exception: during mid November the position sizes got a bit too big and IB refused a few trades due to insufficient margin. That's the period where the initial margin is touching 100%. I then dialed back a little bit to avoid this from happening.
Interesting. I've always monitored margin, but, for my account, as margin as a percentage of NLV was always so low, I had never thought of recording those figures for posterity.

Now implemented. Thanks for the idea.

KH
 
Interesting. I've always monitored margin, but, for my account, as margin as a percentage of NLV was always so low, I had never thought of recording those figures for posterity.

Now implemented. Thanks for the idea.

KH
It wasn't really meant to "record for posterity". I initially created this check once per hour to see whether my software can get data from IB (i.e. account data), or whether access to the server was somehow down. Implicitly it also serves to verify internet connectivity. Not only does the software store NLV and margins, it also verifies that the account's SMA parameter is positive. If it gets negative you will receive a margin call from IB. It is one of those checkpoints you implement but hopefully never receive a warning from (unless there is something really wrong).
Later on, when I started to increase volatility settings, and started experimenting with the IDM parameter, I bumped my head a few times, not being able to get a trade executed. What also happened a few times is that IB increased the margin requirements for certain contracts and you don't have a way of knowing if you don't track your margin usage. Then this data became useful to see whether I had pushed the pedal a bit too deep.
I don't know why, but instead of deleting this data I kept it in a spreadsheet. Every now and then I can use this data.
 
Same story and solution for me. IBCalpha couldn't restart my gateway, so I upgraded both the gateway and IBCalpha; IBCalpha now doesn't work at all. But I'm using the new 'built in' once a week option. Not ideal as I inevitably forget to do the restart. On the upside it's one less dependency on a hobby project which is subject to the whims of the IB developers.

I've been reading the threads on here but I can't seem to find a workaround whereby IBCalpha will work as it used to, or do the Sunday restart.

GAT
I haven’t upgraded to the latest version (still using gateway 9.74 without issue - I think IB patched the log4j vulnerability) and IBC restarts work fine for me. Shooting in the dark because not sure which version you have upgraded to but in case it’s the latest one, here is some advice from Richard which apparently helped others:

“The TWS_PATH variable never includes the version number part - that is specified in the TWS_MAJOR_VRSN variable. So you should just have:

set TWS_MAJOR_VRSN=1012
set TWS_PATH=%SYSTEMDRIVE%\Jts

I would advise you to use IBC 3.12.0, not the beta.2 version.”
 
Back
Top