Fully automated futures trading

Discussion in 'Journals' started by globalarbtrader, Feb 11, 2015.

  1. blink18

    blink18

    #3601     Dec 17, 2022
    Kernfusion likes this.
  2. OK.

    First thing to note is that I have two types of portfolio: a futures trading account which is indeed run in the way you say (withdrawing profits over a HWM and not compounding), but also long only stock and ETF investments where I have a more conventional approach: I earn dividends, and mark to market returns, and that's effectively compounded except for when I use some of the returns to live off.

    Considered holistically adding them up, I have this big pot of money that if I didn't need to take any income would just grow every year. Some of that growth would be futures profits, some MTM on stocks and ETFs, some dividends. The only effect of the non compounding of my futures account is that my futures account would become a progressively smaller part of my portfolio over time (assuming I made profits) - and indeed this is what has happened.

    But do I live off the returns from my investing? Partly I do, yes. Taking last year as an example I made about 8% total return on my portfolio (versus 9.1% historical average, so not atypical), and earned about 1.2% from other income after taxes. But I only spent 4.3% of my starting portfolio value. These figures will fluctuate from year to year, but what won't change is that I will only need to earn between 3% and 4.5% or so from my portfolio every year (depending on my other income and expenses), plus a bit extra to maintain the real purchasing power of my income after inflation.

    The key point here is that I don't need to earn 9% a year from my investments; about half that will do.
    I could probably earn that with a much lower risk target, but my realised standard deviation of 11% isn't that agressive and certainly well below the Kelly optimimum. The reason I need less than 9% is partly because I have other income, but mainly because the ratio [expenses / portfolio size] is relatively small.

    In fact this is really a variant on the classic question 'How much money do I need to become a professional trader', which I've answered a few times on ET before though not on this thread.

    • Work out a realistic figure for likely expenses. Let's just say $100K year just to use a number.
    • Have a realistic idea of what SR and return you could get from your portfolio. I discuss this in Smart Portfolios, but it would be super optimistic to assume you could get a SR of 1 with long term long only investments. Let's pull a figure out of the air, and say 0.25. That's equivalent to the S&P earning about 7% a year with a 3% interest rate so doesn't seem too bad a guess. A trader could go a little higher.
    • If you were trading with leverage, you could work out the appropriate Kelly risk target and find out what mean that implies. Long run investing without leverage, let's stick to the 7% figure.
    • To maintain your purchasing power, knock of inflation to get a real expected return; let's say 5%.
    • That implies you'd need $2 million quid as a long run investor.
    • BUT there will be many years when you earn less than your long run average or zero. So you need a buffer to cover you for fallow years. For example, if you thought you could could have five flat years in a row when there was nothing coming out of the imaginary ATM, that's another $500K you would need for a total of $2.5m.
    • Another way of thinking about that is your required rate of return is 100/2.5 = 4% rather than 5%. That's the way I think, since having five years of expenses sitting in cash is very inefficient.
    • If you have other income, then that will also reduce the figures. If like me you can earn 1% of your portfolio value from a part time job or passive income, then you might only need to earn 3% rather than 4%.
    The upshoot of doing this exercise is that for many people they'd need to be already objectively rich before they can make a living from trading, or live passively off investment income.

    The only possible exception would be for someone who is relatively young but has highly marketable skills, and is in a position where they could try and trade for say a couple of years and still be able to get a job if it doesn't work out. But generally I advise against this: people make better decisions when they're not suffering from the pressure of having to make money. Even as a systematic trader it's a lot easier to let the system run if you don't need it to make $1000 to make your mortage payment by Friday.

    Rob
     
    #3602     Dec 18, 2022
    wopr, newwurldmn, Kernfusion and 3 others like this.
  3. Near the end of the year, and I'll shortly be knocking off 'work', so seems like a good time for an update. My last one was only a few months ago as it happens, but it might be amusing to look at the one I did in June and the other one I did a year ago.

    First performance, the story of the year is unchanged, a few stellar weeks followed by a meandering journey through the valleys of drawdown and the peaks of high water marks, and currently below the HWM I got in September just before my last update. All in all I'm currently up ~21% (non compounded) for the calendar year, and my current drawdown is ~13%. For the UK tax year I actually track properly, I'm down about 5%. Non compunded annual figures for the last few years look like this:

    Code:
    >>> x.resample("1Y").sum().round(3)*100
    index
    2014-12-31    38.4
    2015-12-31    26.2
    2016-12-31    16.4
    2017-12-31     7.7
    2018-12-31    -5.5
    2019-12-31    22.8
    2020-12-31    20.0
    2021-12-31    -2.4
    2022-12-31    21.3
    Freq: A-DEC, dtype: float64
    
    (the figures for 2014 are roughly half what I actually got, since for comparision purposes I've changed the figures to fit a consistent risk target of 25%)

    When working in the city I'd have these year end performance review one to ones with my manager at this time of year, which was basically about sussing out what sort of bonus you deserved. I was very unlucky to be saddled for a couple of years with a manager who didn't appreciate my outgoing personality. He very much disapproved of the humour I deployed annually when I was working as Santa for the office secret santa (given I lack the natural girth for such a role, I'm assuming my sense of humour is what got me the gig, including the time I did the entire set as Jimmy Saville shortly after he'd been exposed as a very naughty man), nor my regular drunken antics at the annual christmas party which followed later that day (nothing #metoo I hasten to add, but there was a reason why one of my 'jokey' leaving presents was a pair of boxing gloves, and another a pair of running shoes in case things went badly) which invariably fell shortly before the review meeting.

    My bonus was noticeably lower in those years, and although there were some confounding factors like the overall performance of the fund and the USD/GBP rate, I do wonder if my high spirits cost me a fair chunk of change.

    Anyway, in the absence of such a meeting I find it useful to review what I thought I'd do against what I actually did in 2022. Since I've had a moveable feast in terms of updates, here are the goals listed with their outcome, throughout the year.

    2021 end of year post:
    - adding a few more instruments. Done and probably finished this project, barring any new markets that pop up. I'll be letting my barchart subscription lapse, since that is only useful for backfilling and not for genuinely new instruments.
    - teaching. Done with a messy hybrid of in person and students on zoom, and contract renewed for next year
    - finishing the book. Done - it's at the indexing stage and my work is basically completed. Due out in April.
    - pysystemtrade: dependency on arctic, and therefore an old version of pandas (discussion here). If I'm forced to I might have to do something with this, but ideally I'd like to put it off until Q3 or next year. Didn't get round to this, but Arctic has been deprecated and the new version isn't open source, so this is potentially more urgent.
    - pysystemtrade: there are few little features on my to do list did them.
    - monthly TTU podcasts. I do enjoy teasing the 'pure' trend followers :) Still going, and there is a year end special coming up, but you may have noticed that the pure TF people aren't around as much. Moritz is doing his own podcast, Jerry prefers doing his Twitter spaces of Friday, so it's just Rich 'Outlier' Brennan
    - in person conferences. Did a couple of these, and also back to my usual Uni guest lecture slots. I expect to do a lot fewer of these than prior to 2019, as except for very sales driven events people are embracing Zoom et al more. E.g. I got invited to the US next year, but they weren't willing to cover my airfare!
    - editing, and creating the web page for the book along with spreadsheets and python code. Done a '1st draft' of this, but I need to go through everything and do some tidying up and bug fixing.
    - implement the new strategies I will have developed for the book. Didn't happen as discussed at length in previous updates.

    June post (new tasks only)
    - refurbishing an old bike done
    - trying to get a bit more exercise did pretty well until the UK got very cold and snowy; it's now just wet so will hopefully do at least a bit of running over Christmas.
    - baiting crypto people on twitter this mission will never be complete. I did actually get banned from twitter for about 24 hours, thus joining an illustrious list of people.

    October post (new tasks only)

    - It looks like then, for the forseeable future, that I will be sticking with a single system. I will probably add some new trading rules at some point No progress here
    - go through all my markets, checking costs and slippage assumptions, and getting a set of instrument weights that I expect I will be sticking with for a while to come. Not done yet
    - After the book comes out in April I expect to spend most of my time on pysystemtrade, doing a proper tidy up of code conventions, documentation and generally doing a long overdue clean up. Not started yet

    So then, looking forward to next year, how is the plan looking? Dates are very approximate.

    Q1:
    - Teaching. I've updated my slides to make them more current, for example including FTX as an example of counterparty risk :)
    - finish spreadsheets and code for book

    Q2:
    - As part of my annual go through all my markets, checking costs and slippage assumptions, and getting a set of instrument weights that I expect I will be sticking with for a while to come

    Q2, Q3 and Q4:
    - pysystemtrade: arctic dependency, doing a proper tidy up of code conventions, documentation and generally doing a long overdue clean up.
    - Research (see below)

    Q4:
    - Start thinking about another book

    Regular gigs:
    - Exercise
    - A few in person conferences, and a lot more online ones
    - TTU: there's quite a few new faces on the rota now so I won't be on quite as much.
    - Consulting. I did quite a bit more than usual last year (still not very much!), with a whole four days worth (yes I'm a lazy f*****). I'm going to be doing a bit more this year since I'm on a monthly retainer for a fund, which guarantees me a few hours a month.

    What about research then? After initially throwing the idea of trading relative value (RV) and fast mean reversion (MR) (the novel strategies from my new book) under a bus, I am coming round to the idea that they could work quite well in DO without being traded in an explicit fashion. For RV, we can create 'synthetic instruments' which we form forecasts for, but don't actually trade. This could actually be extended to non obvious synthetic instruments, for example artifical instruments formed by cointegration, mini portfolios selected to have good out of sample trend behaviour, high/low beta, hig/low vol within asset classes, or the so called macro trends discussed by AQR. For MR it seems possible that the use of buffering and cost penalties allows very fast signals to affect our positioning at the margin without increasing costs. There are a few other random blog post ideas I have that are less likely to result in changes to my system, but still cool to think about.

    OK let's address the elephant, ... another book? A while ago (two years ago!) I posted a list of book ideas and asked for feedback;

    1- a sort of Talebian style treatsie on uncertainty in financial markets, but with more formulas and practical advice
    2- a book on ETF investing, factor investing for dummies. You know how my 3rd book is a simpler version of my 1st book? This would be a simpler version of my 2nd book, 'Smart Portfolios'. Love the symettery.
    3- a book on quantitative futures trading. Think Schwager with more equations, and a bit of 'the global futures almanac' thrown in.
    4- a book on writing and backtesting trading strategies in python. The differentation here is it won't use a predefined package, like Andreas' book uses zipline. Just pandas and the normal numpy/scipy stack. With a heavy focus on uncertainty and doing things properly.
    5- a textbook for my university course
    6- a sort of popular book on human and computer trading, and doing both

    Obviousy I've just written (3). I'm thinking that my next book will be a combination of 1,4 and 5. Basically a book on backtesting but also uncertainty more generally, developing a lot of the themes in Systematic Trading and Smart Portfolios to a higher level. I won't put any python in the book as it will eventually get deprecated as has happened to Andreas, but this will definitely be a book where you will need to code so there will be examples available online.

    I also have an idea for a popular book that would incorporate elements of 2 and 6 as well as being a popular version of the putative book #5, but I think I work better if I do the hard theoretical book then write the dumbed down version (cf Systematic Trading and Leveraged Trading).

    Anyway, I'm off now, not to the office christmas party sadly... though I suppose I could drink 12 pints of cider and punch myself in the face to recreate those halycon days.

    Rob
     
    #3603     Dec 19, 2022
    Kernfusion, greejan, Elder and 2 others like this.
  4. #3604     Dec 19, 2022
  5. #3605     Dec 19, 2022
  6. tgibson11

    tgibson11

    I see Rob has provided the authoritative response, but if you're still curious what kind of crazy s**t I'm doing, here are some more details.

    25%

    Cash

    Another 50 years, if I'm lucky. Ideally I'd like one of my kids, or even a niece or nephew to take over, but I'm disappointed to say that no one has shown any interest so far.

    I do rely on withdrawals to cover living expenses. Actually, I keep a generous buffer in the checking account, and top it up when there are trading profits. I try not to withdraw during drawdowns if I can avoid it.

    Coming back to this one, it's actually worse than you think! When I said 60%, I meant 60% of net worth, not just investments. It's closer to 85% of what I think of as investments. The rest of my investments are some ETFs in retirement accounts that I would gladly move to futures trading if I could without incurring penalties.

    My (controversial!) opinion (not advice!) is that systematic futures trading is objectively superior to buying and holding financial assets. The catch is that it takes work, and most people just don't seem to have an interest and/or the temperament for it. But it's FUN work for the right kind of person.

    I've been trading futures for 14 years. For 12 of those years, I worked as a software developer (24 years total), which allowed me to accumulate a decent nest-egg, and work paid the bills while I made my mistakes and learned my lessons. Rob wasn't writing books then, unfortunately.

    Now for the advice (in the general sense, not "financial advice", as I obviously know nothing about your situation!). First, you should not just take someone else's allocation and run with it. Not even Rob's, and especially not mine! Spend some time (years, probably) with a small (whatever small means to you) allocation and get a feel for it. If it feels good so far, let your allocation increase naturally via compounding, or adding incremental savings. If you ever find yourself wondering if your allocation is too high, you're probably right!
     
    Last edited: Dec 19, 2022
    #3606     Dec 19, 2022
    wopr, Kernfusion, greejan and 2 others like this.
  7. So just upgraded to 10.20 and (touches huge piece of wood) so far seems okay, because:

    "Dear Trader,

    On January 4, 2023, complimentary real-time non-consolidated market data from CBOE One will be disabled for the version of the desktop trading platform that you previously logged in to.

    In order to maintain access market data from CBOE One, you must download and install the latest version of the application before January 4, 2023.

    Failure to update will result in loss of access to your real-time non-consolidate market data feed on the platform."

    Also, apropos of nothing, I'm speaking in London at this thing. The talk is probably a bit basic for you guys and it's mostly horrifically awful trading guru types (I'm going to try and spread some intelligent ideas....), but if anyone wants to come along and chat afterwards, I think tickets are free in advance.

    Rob
     
    #3607     Dec 22, 2022
  8. I didn't get such notification, probably because I don't use CBOE One.
    If you received that notification recently then I would consider that very short notice, given that they use January 4th as deadline. Gives you hardly any time to determine whether the new TWS version runs without issues for you.
     
    #3608     Dec 22, 2022
  9. About macro trends, I incorporate them as a signal in my trading strategy. I think the signals are intuitive, make economic sense, out of sample performance is quite good (see QGMIX good track record despite fees eating almost 0.20 of Sharpe ratio) and long term correlation with TF is high but not extreme. Also, signals are probably as slow as trend ones, even it depends on the actual implementation.
    The downside is that the process is quite cumbersome as you need to scrape data from the web to generate signals.
    Why don't you plan to trade them explicitly?
     
    #3609     Dec 22, 2022
  10. Kernfusion

    Kernfusion

    I've already spent several evenings moving to the new gateway version (10.19i or whatever) (and the API, as the helper classes also change with each new version and I neglected to update them for a number of years)., Because I just know that sooner or later I'll also get such an email and will be forced to migrate from my old AND PERFECTLY WORKING setup.. ohh..
    I figured out the first problem with the date-format in the reqHistoricalData call (we now have 2 choices for the parameter "endDateTime" - either provide the time zone of each particular instrument, which is obviously a pain, or just use '-' between date and time to indicate UTC "yyyyMMdd-HH:mm:ss") thanks HobbyTrading for pointing to that.
    The second issue is harder: during the day I reconnect to the same instance of the gateway multiple times (to refresh historical prices, for the actual trading, etc.), and before it was fine, but from a recent version update the subsequent reconnects to the same instance can't initiate streaming of real-time prices, for some FX instruments usually the first one I'm requesting (I use them to get accurate FX-rates) i.e. I call reqMktData, no errors, but the bid\ask\last\lastClose just don't start coming. After restarting the gateway all is good, but I can't restart it easily anymore, because IB recently forced me to turn on the 2 factor authentication, which I'm trying to do only once a week.. It looks like re-subscribing to the same contracts but with different tickerIds helps to get them 'unstuck', so maybe I'd have to write some hacky code to try to reconnect with different tickerIds and "reset" the stuck instruments., although I'm liking it less and less.. I was thinking maybe it's some kind of a pacing violation, but there are no errors in the logs and I think IB implemented it internally at some point..


    On the bright-side, this looks promising, hopefully something cool comes out of it in the new year :)
     
    Last edited: Dec 23, 2022
    #3610     Dec 23, 2022