Fully automated futures trading

Just an update for you guys. Trading wise the last few months have continued to be profitable, and I've made another 20% or so since I last posted so I'm currently at 30% for the calendar year; in fact I'm currently at a 6.6% drawdown so the gains were even more impressive until quite recently.

I've put the finishing touches to my new book, and actually just got the printed copies delivered today (although the main release isn't until the end of October, and I still have to proof read the kindle version). There is now quite a bit of detail here: https://www.systematicmoney.org/leveraged-trading Incidentally there are quite a few references to this site in the book; including a nice quote about trading costs I stole from @comagnum (does he read this thread?).

Over the summer as well as holidays I've been busy working on another project, building myself a 'writing room' in the garden that will also be a bit of a chill out zone for my kids. I'm going to write a blog post about the book, and another about the 'writing room' if you're interested in more details. My plan is to finish the building work before turning my attention to other projects.

The first priority will be some serious sorting out of my technology stack; my NAS failed a few months ago, and I need to setup a new one with proper cloud backup this time. I've also got myself a new laptop (Lenovo ThinkPad T480 Core i7-8550U 16GB 512GB SSD 14 Inch, if you're curious) which I need to set up before ceremoniously burning the old one. I plan to keep windows as dual bootable, since the publishing world still refuses to use proper OS independent solutions like LaTeX (for my current book I actually had to buy a cheap desktop with windoze, plus an office licence that actually cost more than the machine!).

I'm teaching again in January, although the course has now bedded in to the point where I just need to tweak the lecture notes a little and write some exam papers.

The 'pysystemtrade' project has been on the furthest back of back burners. I have a large stack of issues with the project plus an even larger stack of unfinished business. So, what to do with it? One of my motivations for that project was to replace my existing futures trading platform, which is a big bunch of spaghetti code I wrote over 5 years ago now. However I'm debating with myself whether I really want to keep trading that system. As a source of exposure to alternative risk premia it's been fine, but intellectually it no longer excites me to think of refining that to the n'th degree. Instead I'd like to research and build something in a new strategy space.

I don't have the time or inclination to deal with other asset classes, but I have several ideas about a new system that combines elements of longer term momentum and carry with shorter term mean reversion and intra-asset class action, and also introduces an element of optimisation to get the best possible factor exposure in the presence of integer futures contract sizes. Such a system should be more profitable than what I currently do, as well as being much more fun and exciting.

Although parts of such a system would be broadly based on pysystemtrade, it would be sufficiently different to need a whole new architecture. Like all coders I think it's more fun to write new code than to maintain old code. Due to the vagaries of IB and the poor state of my existing code it's also difficult to test a system whilst running another in parallel. Another issue is that I'm wary of releasing the new system into the public domain; partly as it's a source of hassle, and also because it could be genuinely new IP that I might want to exploit one day.

So one vague plan is:

  • find a new BDFL for pysystemtrade to remove that source of hassle and guilt
  • turn off my current futures system (probably at the end of the tax year as that's neater)
  • take a sabbatical from trading, during which I develop my new system
  • blog about the new system as I develop it, but don't release the entire code base.
  • Start trading the new system
I will at some point be writing another book. I have current ideas, one is essentially 'Smart Portfolios for dummies' in the sense that the new book is effectively 'Systematic Trading for Dummies'. That will give me two books, two in investing, two in trading, two for beginners, two which are more advanced. I like the symmetry of that. The other option, which will probably be book five, will be a grand tour de force on the subject of uncertainty in finance. It will probably be self indulgently long and have very few potential readers. As a result, I may have to self publish that if no reputable publisher is willing!

Any thoughts on the above ideas are welcome. And best of luck in your own trading.

GAT

Hi Rob,
As I understood, one of the big reasons for running your system was to protect your long-term stock/bond portfolio from market crashes like 2008 (one of the good properties of TF), shutting it down would remove that protection.. I actually find it very easy to run 2 systems in paralell on the same computer, one connected to live the other to paper-account(the EOD data-collection process is independend and puts the new data into a shared db that both systems use..), i.e. I'm running 2 IB gateways one logged in to paper another to live and the 2 fully-independend systems each connected to it's own gateway. Works just fine..
Regarding the other thoughts, the 2 great things about your material was that first you gave enough information that a geeky+hard-working individual could always reproduce your system and secondly you were doing yourself what you were preaching (eat your own turtles)., is your intention to keep thinds generally in the same vein in the future?
(If you were asking me - I would actually prefer a more difficult/technical next book with more trading rules or a general approach on how to discover them. But of course I don't represent the full audience of interested people.)

In any case, thanks a lot for all the materials you've been sharing.
 
Regarding the other thoughts, the 2 great things about your material was that first you gave enough information that a geeky+hard-working individual could always reproduce your system and secondly you were doing yourself what you were preaching (eat your own turtles)., is your intention to keep things generally in the same vein in the future?

Yes, definitely

GAT
 
Hi all. I was missing some excitement in my life and I installed pysystemtrade recently. Now I try to understand the software. So I ask what the measurement units for those calls are:

system.portfolio.get_notional_position(...)
system.portfolio.get_buffers_for_position(...)
system.accounts.get_buffered_position(...)


Do those calls return lots or dollars or something else?
 
Hi all. I was missing some excitement in my life and I installed pysystemtrade recently. Now I try to understand the software. So I ask what the measurement units for those calls are:

system.portfolio.get_notional_position(...)
system.portfolio.get_buffers_for_position(...)
system.accounts.get_buffered_position(...)


Do those calls return lots or dollars or something else?
These must be lots.
 
Another day, another question. I have observed that if I run the call system.portfolio.get_notional_position(my_instrument) repeatedly, then the result is, let's say, volatile.

# Run #1:
2019-09-17 -3.895486
2019-09-18 -4.237389
2019-09-19 -4.626678
2019-09-20 -5.781315
2019-09-23 -6.879856


# Rerun:
2019-09-17 -5.182776 # E.g. see here, from -3.9 to -5.2!
2019-09-18 -5.557151
2019-09-19 -5.732063
2019-09-20 -6.822700
2019-09-23 -7.951821


I also would say that the volatility tends to vary across instruments. I appreciate that related simulations involve some degree of randomness, but would be such extent something to worry about?
 
Is autocorrelation necessary for trend following to work. or might there be markets without any significant autocorrelation in returns where CTA still make money?
 
Is autocorrelation necessary for trend following to work. or might there be markets without any significant autocorrelation in returns where CTA still make money?
My thoughts, others might correct:
1. I think some autocorrelation is necessary for trend following to work;
2. Answer to the second part depends on the strategy that any particular CTA employs. Low (or negative) autocorrelation inhibits trend following strategy.
 
GAT,

I have your new book on order. I was wondering if you would be interested, as a demonstration of the ideas presented there, in starting a futures account based on its contents of leveraging up over time? Maybe it could start at first with the micro e-minis and then move to e-minis, etc.?

It's certainly small potatoes for you but I think it would be highly educational as well as something to center Q&A on from the book.

Thanks for your consideration!
 
Back
Top