Fully automated futures trading

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

  1. djames

    djames

    Hi Rob,
    Inspired by your position in the Mothers Index as revealed on a recent podcast I got the dynamic optimisation running locally. My dataset is a bit rough in places, the code to robustly download hourly prices for 120 markets using IBs API is a test of nerve and patience. These are my recent positions, the data for BBCOMM is stale.

    Code:
                BBCOMM  BITCOIN  CORN  CRUDE_W_mini  V2X  VIX
    index                                                  
    2022-01-06     3.0      0.0   0.0           0.0 -2.0 -1.0
    2022-01-07     3.0      0.0   0.0           0.0 -2.0 -1.0
    2022-01-10     3.0     -1.0   0.0           0.0 -2.0 -1.0
    2022-01-11     3.0     -1.0   0.0           0.0 -2.0 -1.0
    2022-01-12     3.0     -1.0   1.0           0.0 -2.0 -1.0
    2022-01-13     3.0     -1.0   1.0           0.0 -2.0 -1.0
    2022-01-14     3.0     -1.0   1.0           0.0 -2.0 -1.0
    2022-01-17     0.0     -1.0   1.0           0.0 -2.0 -1.0
    2022-01-18     0.0     -1.0   1.0           1.0 -2.0 -1.0
    2022-01-19     0.0     -1.0   1.0           1.0 -2.0 -1.0
    
    Looking at the equity curve there are some strange spikes which need investigating, again it's probably my underlying data (data is bootstrapped from various places).
    It is interesting that given this broad universe this is what DO chooses to allocate risk to.
    Given your experience with DO so far, where do you think you would focus further research? On my TODO is to dig deeper and pull out the covariance clusters from which we've picked the above. Nice!

    How are you collecting data for these 100+ markets? Do you batch download hourly, or do you just grad daily prices? I guess you have a realtime thing running to monitor moves?
     
    Last edited: Jan 21, 2022
    #3181     Jan 21, 2022
  2. Interesting. You obviously have quite a small portfolio, cash wise (sorry if that sounds patronising!). The spikes might be real, reflecting a relatively undiversified set of instruments. Obviously there's more concentration risk here than I'd be happy with, but then I suppose you'd probably get the same with a static portfolio for the same capital.

    My positions in those instruments are the same sign as yours, if that gives you any comfort. Interestingly I don't really have much going on with equities and bonds right now, so it could be that this tiny portfolio gives you a fairly accurate representation of the unrounded portfolio.

    Code:
                 daily_price_stdev  annual_price_stdev     price  daily_perc_stdev  annual_perc_stdev  point_size_base  contract_exposure  daily_risk_per_contract  annual_risk_per_contract  position    capital  exposure_held_perc_capital  annual_risk_perc_capital
    VIX                        0.76               12.11     23.60              3.21              51.33           730.84           17247.74                   553.37                   8853.89      -2.0  353337.46                       -9.76                     -5.01
    JPY                        0.00                0.00      0.01              0.36               5.80       9135456.90           80145.36                   290.53                   4648.54      -1.0  353337.46                      -22.68                     -1.32
    GAS_US_mini                0.15                2.47      4.06              3.80              60.83          1827.09            7408.86                   281.66                   4506.51      -1.0  353337.46                       -2.10                     -1.28
    V2X                        0.91               14.55     24.35              3.73              59.76            83.56            2034.67                    75.99                   1215.91      -3.0  353337.46                       -1.73                     -1.03
    MUMMY                     21.89              350.22    841.00              2.60              41.64             6.42            5401.57                   140.59                   2249.40      -1.0  353337.46                       -1.53                     -0.64
    BITCOIN                 1532.87            24525.86  42990.00              3.57              57.05             0.07            3141.87                   112.03                   1792.44      -1.0  353337.46                       -0.89                     -0.51
    GOLD_micro                14.93              238.92   1815.10              0.82              13.16             7.31           13265.41                   109.13                   1746.08       1.0  353337.46                        3.75                      0.49
    EU-DIV30                  17.46              279.31   1995.00              0.88              14.00             8.36           16670.11                   145.87                   2333.88       1.0  353337.46                        4.72                      0.66
    DOW                      296.50             4744.06  35575.00              0.83              13.34             0.37           12999.76                   108.35                   1733.57       2.0  353337.46                        7.36                      0.98
    IRON                       3.41               54.62    125.10              2.73              43.66            73.08            9142.77                   249.48                   3991.72       1.0  353337.46                        2.59                      1.13
    CORN                       4.61               73.75    557.50              0.83              13.23            36.54           20372.07                   168.44                   2694.96       2.0  353337.46                       11.53                      1.53
    SOYBEAN                   10.55              168.84   1294.00              0.82              13.05            36.54           47285.12                   385.60                   6169.54       1.0  353337.46                       13.38                      1.75
    CRUDE_W_mini               1.38               22.02     82.38              1.67              26.73           365.42           30101.33                   502.92                   8046.76       1.0  353337.46                        8.52                      2.28
    COPPER                     0.06                0.93      4.42              1.32              21.07         18270.91           80730.03                  1063.28                  17012.41       1.0  353337.46                       22.85                      4.81
    HEATOIL                    0.03                0.56      2.53              1.38              22.12         30695.14           77514.42                  1071.46                  17143.37       1.0  353337.46                       21.94                      4.85
    GASOILINE                  0.04                0.59      2.54              1.46              23.34         30695.14           77861.28                  1135.83                  18173.25       1.0  353337.46                       22.04                      5.14
    AEX                        7.80              124.77    785.15              0.99              15.89           167.12          131213.43                  1303.19                  20851.05       1.0  353337.46                       37.14                      5.90
    For me at least we definitely need some better diagonstics on this fascinating process. I'm thinking maybe something along the lines of a factor decomposition of the raw unrounded portfolio and then of the rounded optimised portfolio.

    Rob
     
    #3182     Jan 21, 2022
    Kernfusion likes this.
  3. djames

    djames

    The above backtest was run with a 150k notional, I'm double checking the universe of instruments as perhaps there was missing data which caused a lack of position.
     
    #3183     Jan 21, 2022
  4. djames

    djames

    Interesting how you don't have BBCOM, rolling up your risk from broader commodities exposure perhaps.
     
    #3184     Jan 21, 2022
  5. Try plotting the number of positions over time.

    Rob
     
    #3185     Jan 21, 2022
  6. Kernfusion

    Kernfusion

    Not related to trading but to long-term investing., what are the general theoretical\scientific views on these new(or not so new?) covered call-selling ETFs, do they have a place in a long-term investment portfolio or they're expected underperform the market because of fees and general upward movement of stocks ?

    Btw, futures-trading-wise - the last couple of days, and the last night specifically were kind of.. not good :) probably lost 3% or so..
     
    Last edited: Jan 21, 2022
    #3186     Jan 21, 2022
  7. Anyone trading IBKR LME OTC Futures?
    Aluminum has a much tighter spread than the NYMEX contract. Besides the higher trading fee and IB counterparty risk, are there any other drawbacks? Unlike IB CFDs, there are no swap fees, right? Thanks
     
    #3187     Jan 22, 2022
  8. djames

    djames

    I wonder how you have setup TSEMOTHR, I'm not seeing any prices for the June expiry which should be being used as the carry contract
     
    #3188     Jan 23, 2022
  9. djames

    djames

    Sorry ignore that, seems the IB data API is still booting up on Sunday afternoon :confused:
     
    #3189     Jan 23, 2022
  10. yad110

    yad110

    Hi Rob,

    You have reported the following return on your Systematic Trading:

    2014 >>> 124.0%
    2015 >>> 23.0%
    2016 >>> -14.0%
    2017 >>> -3.7%
    2018 >>> 1.0%
    2019 >>> 7.0%
    2020 >>> 0.3%

    Could you please explain the following chart? is this the growth rate of your capital? or it is your profit in million GBP?
    [​IMG]

    you mentioned you started with 300K Gbp. Did you add any money? how much you withdrawn from your profit?

    Thanks a lot
    YAD
     
    #3190     Jan 24, 2022