Fully automated futures trading

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

  1. No good point in that case you should use a % difference.

    Best compromise is to measure the 10 year vol as a % then convert it into a $ difference before weighting it with current vol as a $ difference. Over 10 years you're unlikely to have significant periods of very low prices and weird % vol.

    Rob
     
    #4561     May 15, 2025
  2. Er no, because market on close is still a market order which means it will be executed at an offer price if you're buying and vice versa, whereas the official close price* has a 50/50 chance of being eithier a bid or an offer and hence has no slippage.

    Of course if you do find after say a year that your market on close order is actually being executed at mid then feel free to put this in your simulation but for now I would be conservative.

    Personally I don't even trade near the close as the price is quite volatile in many markets.

    Rob
     
    #4562     May 15, 2025
    corsair likes this.
  3. corsair

    corsair

    Thanks Rob. I guess what you are saying is that execute at close could mean that I have crossing a massive bid-ask spread as opposed to the 'mid'.

    I have zero experience in execution and now that I have some trade data from IBKR I have begin to analyse it. See below an example IBKRs TCA report from the last month or so:
    upload_2025-5-15_16-47-23.png


    The report (assuming IBKR is accurate) says that on average I am beating the 'close' by 2.9 bps. All I am doing is sending out market orders via IBKRs adaptive algo on the normal priority setting. For simulation purposes I assume I pay 5 bps slippage + comms. This TCA report seems to indicate that IBs algos are doing a good job and I could fly closer to the sun?
     
    #4563     May 15, 2025
  4. It may well be that the IB algo is doing a good job, versus just a naive submission of a market order at close.

    Personally, I don't use the IB TCA reports, I don't think I ever looked at one. I know I can trust my own analysis, IB are probably trustworthy, but I'd rather not take the risk. I can also do more complex analysis than they can as I capture more bespoke information. For example, I can calculate the distribution of slippage and work out a t-statistic to see if my improvement is statistically significant. I can look at more than 3 months. I can compare my price to the previous days close, thus checking to see if my backtest assumption is correct. I can look at slippage normalised by standard deviation. And so on.

    OK now I have just done the analysis for the last 3 months, here it is FWIW

    https://ibb.co/6cyz6Qbb
    [​IMG]

    Rob
     
    #4564     May 15, 2025
    corsair likes this.
  5. Free like for anyone that can tell me how to get images working on this flipping site:

    just pasted in: https://ibb.co/6cyz6Qbb
    As a link: https://ibb.co/6cyz6Qbb
    As an added image: [​IMG]

    Just pasted in:
    [​IMG]

    OK, the latter works, what is the point of the tag???

    Rob
     
    #4565     May 15, 2025
  6. @globalarbtrader Hi Rob,
    I came across https://qoppac.blogspot.com/2015/10/a-little-demonstration-of-portfolio.html and https://github.com/robcarver17/systematictradingexamples/blob/master/optimisation.py .
    In content of AFTS Chapter 4 onwards, all strategies have the same target risk on, so rolling std on average they will be close to target volatility. So the substrategy returns are already volatility normalised(equalised right)?
    Also block bootstrapping will be done on the substrategy returns and not the asset returns since substrategy returns are themselves like assets in the portfolio optimization process?


    Also here https://qoppac.blogspot.com/2016/01/correlations-weights-multipliers.html,
    You write -
    "One very significant factor in making this decision is actually costs. However I haven't yet included the code to calculate the effect of these. For the time being then we'll ignore this; though it does have a significant effect. Because of the choice of three slower EWMAC rule variations this omission isn't as serious as it would be with faster trading rules."

    Now in my backtest of Strat 8 of a Agri and a Metal future, I am losing my entire capital for the EWMAC(16,64),EWMAC(64,256)(basically the slower trading rules). But EWMAC(8,32) almost 4x my start capital for the same instruments. So in this case how do I incorporate costs if I want to dynamically estimate forecasts weights using bootstrapping?
    Or should I use static equal weights for those instruments and give 0 weight to slower trading rules?

    Best Regards.
     
    #4566     May 15, 2025
  7. Also block bootstrapping will be done on the substrategy returns and not the asset returns since substrategy returns are themselves like assets in the portfolio optimization process?

    The answer to this is yes.

    Can you please help on this question below?
    In content of AFTS Chapter 4 onwards, all strategies have the same target risk on, so rolling std on average they will be close to target volatility. So the substrategy returns are already volatility normalised(equalised right)?



    Can you please help on this question below?
    Also here https://qoppac.blogspot.com/2016/01/correlations-weights-multipliers.html,
    You write -
    "One very significant factor in making this decision is actually costs. However I haven't yet included the code to calculate the effect of these. For the time being then we'll ignore this; though it does have a significant effect. Because of the choice of three slower EWMAC rule variations this omission isn't as serious as it would be with faster trading rules."

    Now in my backtest of Strat 8 of a Agri and a Metal future, I am losing my entire capital for the EWMAC(16,64),EWMAC(64,256)(basically the slower trading rules). But EWMAC(8,32) almost 4x my start capital for the same instruments. So in this case how do I incorporate costs if I want to dynamically estimate forecasts weights using bootstrapping?
    Or should I use static equal weights for those instruments and give 0 weight to slower trading rules?




    Also in this blog https://qoppac.blogspot.com/2016/01/correlations-weights-multipliers.html
    upload_2025-5-16_9-35-9.png

    This means that the sum of weights for every day in the backtest is always one right, and cleaning is just a way to smoothly decrease weights for existing instruments and increasing weights for new instruments?
     
    Last edited: May 16, 2025
    #4567     May 16, 2025
  8. corsair

    corsair

    I have always just pasted any images in....

    Thanks for sharing these stats. I will keep monitoring using IBs TCA for now as I dont have the real time feeds. Maybe one day when you are really bored you can try and sense check IBKRs calcs vs your own :)

    Curious what your average holding period is at the portfolio level? My turnover ratio in weights space (average abs trade/avg gross leverage) implies a roughly 1 month holding period.
     
    #4568     May 16, 2025
  9. Yes I guess about 1 month

    Rob
     
    #4569     May 16, 2025
    corsair likes this.
  10. I do have other things to do than answer your questions :)

    I don't understand, are you losing your entire capital because of costs?

    Simplest thing to do is exclude anything that breaks the speed limit, say costs higher than SR 0.1 on a given instrument.

    yes

    Rob
     
    #4570     May 16, 2025
    cryptocaptainx3 likes this.