Fully automated futures trading

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

  1. I am currently doing some fine tuning of my security master to make sure that everything is correct. I stumbled upon this pearl: UK natural gas on ICE which has this very special multiplier: 1,000 therms per day per delivery period (i.e. month, quarter, season or year).

    I started out with Rob's multiplier of 30.000 but received a warning in paper trading that the June multiplier is 31.000. Actually the multiplier is dependant on the delivery month. What a great idea! I tend to blacklist the whole instrument because my software is designed for static multipliers. How do you cope with this? Are there other instruments with such shenanigans?
     
    Last edited: May 30, 2024
    #4161     May 30, 2024
  2. newbunch

    newbunch

    I store all my instrument information in a csv file which contains the correct multiplier. But my system needs to calculate the correct multiplier when it rolls and generates the next contract. So I have the following inelegant code for that:
    Code:
                if InstrumentsIBSymbol[i] == 'NGF':
                    Month = str(RollReportNextContract[i])[-2:]
                    ThirtyDays = ['04', '06', '09', '11']
                    ThirtyOneDays = ['01', '03', '05', '07', '08', '10', '12']
                    if Month in ThirtyDays:
                        InstrumentsMultiplier[i] = 30000
                    elif Month in ThirtyOneDays:
                        InstrumentsMultiplier[i] = 31000
                    elif int(str(RollReportNextContract[i])[0:4]) % 4 == 0:
                        InstrumentsMultiplier[i] = 29000
                    else:
                        InstrumentsMultiplier[i] = 28000
    There may be a way to get the multiplier from IB, but the above code has worked for me.
     
    #4162     May 30, 2024
    handelsmeisterei likes this.
  3. Aussie rates.

    Nightmare- either manually update the multipliers or don't trade.

    Rob
     
    #4163     May 30, 2024
    handelsmeisterei likes this.
  4. Getting the correct current multiplier should be doable by retrieving it from IB. But these dynamic multipliers make things nasty in the backtest.

    For now I will blacklist these instruments. But I want to change my backtest from instrument level to contract level in the future. When doing that I will incorporate dynamic multipliers. A contract-level backtest can answer a question I am interested in: How do different (passive) roll strategies impact performance? Is it all about saving transaction costs and how do these compare to trading on a "dirty" signal (buy forward instead of current).
     
    #4164     May 30, 2024
  5. I changed my backtest to cope with contracts that do not trade anymore. That way I may sneak in some more data. In total I have 4 delisted instruments (GOLD-ICE, SILVER-ICE, LUMBER and soon CADBOND). As gold and silver trade on other exchanges I analysed these double listings in more detail with some results worthwhile discussing.

    Gold on ICE is an interesting example: The daily correlation with comex gold was 99.3% over its lifetime. The 1-year rolling correlation went down to 87% in 2002. Silver on the other hand always had a high correlation.

    I see such behaviour in quite some markets that are deemed "double listings". COCOA in London has had years with a correlation below 70% against its New York counterpart.

    On the other hand there are instruments like US20 and US30 that never dropped below 96%.

    I guess my question is: What's a duplicate instrument? I would consider micros/minis and full contract sizes as duplicates. For everything else it seems that the correlation may break down due to blocking of shipping routes, regulatory or whatever reasons. But if you keep such instruments, you will overweight them as long as correlation is high (I use Rob's handcrafting method to get instrument weights).

    How do you think about that? Do you exclude instruments with too high of a correlation? Is perhaps my analysis wrong due to the use of daily returns?
     
    Last edited: Jun 1, 2024
    #4165     Jun 1, 2024
  6. Correlation is a linear measure. So I don't mind holding things that are 99% correlated if there is a good reason one of them will do something weird. 20yr and 30yr bonds are an example. Happy to have both of these. But an instrument trading on different exchanges; the correlation there will only drop if there is a weird issue with the markets, which I'm less keen on.

    If you're using handcrafting then you can very easily ensure you don't overweight with duplicate instruments.

    Rob
     
    #4166     Jun 1, 2024
  7. How would you think about something that has the same underlying but different structuring? For example, would you consider excess return and total return futures separately?
     
    #4167     Jun 2, 2024
  8. Favian

    Favian

    Noob with a book related question.

    Forecast weights are discussed in Chapter 8, and bootstrapping is referenced there. However, it seems like in order to properly determine a forecast's returns one would need to incorporate position sizing as discussed in Chapter 10.

    Meaning I should hold of on coding bootstrapped forecast weights, and by proxy the formula-based forecast diversification multiplier (Appendix D p297), until I soak up what is in Chapter 10. I could use Table 18 and 19 without this though, as I think Table 19 is based on the forecast correlation not the forecast performance correlation.

    Is this correct, or is this too deep and something simpler such as just using the sign of the forecast should be preferred?
     
    Last edited: Jun 3, 2024
    #4168     Jun 3, 2024
  9. Which one of the books is this about?
     
    #4169     Jun 3, 2024
  10. After 2 months of intensive programming I today finished the implementation of Rob's strategies. Paper trading also already hums along. I have just some more reportings/dashboards to go. The last 2 months have been really a nice learning experience especially due to this thread. So thank you very much!

    I intend to go live in September after the summer vacation. As I was faster than expected I am thinking about integrating csidata into my stack.

    Has anybody experience with them? Their software looks dated and is windows-only, which is a big minus. FTP access seems to be available only for the corporate license which is very pricey. And their software supports only 150 futures to download. How much additional sharpe can be expected when going from 100 to 250 (don't know if so many can even be traded on IB)?
     
    #4170     Jun 3, 2024
    greejan and newbunch like this.