Fully automated futures trading

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

  1. Discussed here https://qoppac.blogspot.com/2015/05/systems-building-futures-rolling.html

    Or you can wait for my next book which will also discuss this.

    GAT
     
    #2971     Nov 20, 2021
    blink18 likes this.
  2. djames

    djames

    Exciting! What's the working title?
     
    #2972     Nov 21, 2021
  3. djames

    djames

    I look forward to it, I've managed to poke around and get the optimization running. I look at how instruments are differing thought time. With the 'chapter15' provided system I find Sharpe .7, is your blog post system very different to this?
     
    #2973     Nov 21, 2021
  4. "Advanced futures trading strategies"

    GAT
     
    #2974     Nov 21, 2021
  5. Kernfusion

    Kernfusion

    Awesome! :)
    So in the end you just used Shadow cost 250 and Buffer size 0.0125 based on common sense, checked that the results weren't crazy (higher turnover but lower costs) and didn't optimize these values any further..
    So just to confirm, trading costs used in the objective function are calculated as (commissions + Bid-Ask-spread of this contract)*number of contracts to trade, where the Bid-Ask spread is I guess averaged over some time period per contract(actually per instrument using one of it's contract's bid-ask prices) once and isn't dynamically updated ?

    Also, regarding Correlation matrix shrinkage, is it something related to pandas only? I actually never checked in any way my correlation matrixes, I mean I just put the pairwise correlations into the off-diagonal elements and then use it to compute portfolio standard deviation, I'm not using pandas, just some regular matrix multiplication library in C#., Does is make sense maybe to add a sanity check before taking square root that the variance is positive, and if it isn't discard this attempt., or it's still advisable to implement shrinkage routine ? Is this the shrinkage implementation in pysystemtrade: "https://github.com/robcarver17/pysy...e66b0/sysquant/estimators/correlations.py#L78" ?
     
    Last edited: Nov 22, 2021
    #2975     Nov 22, 2021
  6. Well I do periodically check my bid/ask are good; but then once I have a value for cost per trade I adjust it historically according to price volatility in the past.

    Yes that's the shrinkage function.

    I'd definitely advise a sanity check for positive variance, unless it's going to be very obvious that you've done sqrt(-x); my problem is I originally had a try: except: which caught this so didn't realise what was going on (schoolboy error; always keep your code brittle when in the research phase; then in production only build in exception handling which logs loudly if it's ignoring an error). Then if you're seeing a lot of negative variances you know you have a problem to solve, eithier through shrinkage or finding the nearest psd matrix.

    GAT
     
    #2976     Nov 22, 2021
    wopr and Kernfusion like this.
  7. Kernfusion

    Kernfusion

    ohh, another one of these ouchy days :(
     
    #2977     Nov 26, 2021
    HobbyTrading and newbunch like this.
  8. Elder

    Elder

    Time dilation, a day equal to 6 months.
     
    #2978     Nov 26, 2021
    newbunch likes this.
  9. daily loss is ~1.8% D/D is ~6.2%. Could be worse...

    GAT
     
    #2979     Nov 26, 2021
    newbunch and Kernfusion like this.
  10. Elder

    Elder

    by worse if you mean my -5% day the yes :banghead:
     
    #2980     Nov 26, 2021
    newbunch likes this.