Fully automated futures trading

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

  1. The normalisation is by a position with a forecast of +10 (the most accurate way) will depend (inversely) on the volatility. So on a particular day the position with a forecast of +10 might be 7 contracts. But if volatility halves it would be 14 contracts.

    To put it another way, if I am trading 1 contract a day with a +10 forecast position of 7 contracts, then all other things being equal I should be trading 2 contracts a day if volatility halves.

    Using the average absolute position (or a moving average of it) is an approximate for using the position with a +10 forecast. Over long periods of time, if volatility is stable, it should be correct (since everything should be scaled so that you average absolute position is the same as it would be with a fixed forecast of +10). Again your average absolute position will depend inversely on volatility.

    The advantages of using a standardised approach are:

    - you can subtract the cost estimate directly from the sharpe ratio. This means you can say instantly what proportion of your raw sharpe is being eaten by costs.
    - you can compare costs across instruments and across trading rule variations
    - you can pool turnover estimates from different estimates in deciding how fast a particular variation is trading
    - you can compare costs across time.

    GAT
     
    #181     Oct 14, 2015
  2. Raphael

    Raphael

    I think I understand where my confusion is coming from. I've been calculating the normalized trading cost (standardized cost * turnover) for each instrument, and then adding it up across the instruments in the portfolio.

    Now I'm thinking that since the instrument trading cost is normalized it is independent of the position for that instrument, that is if we double the position the turnover does not change. So in order to compute the cost for the entire portfolio one should actually take the weighted sum of the normalized trading costs (standardized cost * turnover), using the portfolio weights. Is that correct?
     
    Last edited: Oct 14, 2015
    #182     Oct 14, 2015
  3. Exactly right - but you also need the Instrument diversification multiplier (IDM)

    So suppose you have costs in SR units of 0.05 and 0.02 for two instruments with instrument weights of 40% and 60%, and an IDM of 1.2

    Then your portfolio cost is

    .4*0.05*1.2 + .6*.02*1.2 = whatever

    GAT
     
    #183     Oct 14, 2015
  4. Raphael

    Raphael

    Thanks. That's much clearer now.

    So if I understand correctly more diversification means lower volatility, so to maintain the same level of volatility (e.g. to stay at half-Kelly) we will have to trade more contracts. This in turns means higher trading costs.
     
    Last edited: Oct 14, 2015
    #184     Oct 14, 2015
  5. Yes more diversification means a lower portfolio level volatility, unless you leverage things up to compensate. A more leveraged portfolio costs more to trade. One of the few disadvantages of volatility :)

    GAT
     
    #185     Oct 14, 2015
  6. Raphael

    Raphael

    Would you consider doing this when computing the combined forecast i.e. making a long only rule and then including that in the portfolio of rules?
     
    #186     Oct 18, 2015
  7. That's exactly what I would do.

    GAT
     
    #187     Oct 18, 2015
  8. Raphael

    Raphael

    Thanks! Do you have any thoughts on arithmetic vs. geometric means and standard deviations when computing Sharpe ratios and for position sizing?

    If a geometric standard deviation is preferred how is this used together with an exponentially weighted moving standard deviation for position sizing?
     
    #188     Oct 18, 2015
  9. For Sharpe Ratios I use the arithmetic mean of % returns.

    For position sizing vol calculation I use an ewma (arithmetic means).

    To be honest I've never considered using geometric returns. I think over the relatively short time periods we're talking about it wouldn't make much difference; but I understand the properties of arithmetic returns pretty well so I probably won't change.

    GAT
     
    #189     Oct 19, 2015
  10. Monthly update (last one was 5th October).

    Down about 8.8% of capital, or £35K. So no new HWM.

    This is line with CTA performance across the board; eg Man AHL diversity GBP is down 4% on roughly half the volatility target.
    [​IMG]
    (picture is a few days old but not much has happened)

    Drawdown: 12.6%

    Gainers:

    Gas £12400
    BTP £2600
    SP500 £2500
    NASDAQ £1100

    Loser:

    Platinum £5000
    Crude £4400
    Leanhog £4200
    Livecow £3800
    GBP £3200
    Eurodollar £2900
    MXP £2300
    NZD £1700
    US2 £1200
    AUD £1100
    US10 £1100

    plus £17K down in 'hedged' equity long only portfolio

    "The big short" in Gas; my largest position, helped stem the bleeding that occured elsewhere.

    Positions:
    Code:
           code contractid  positions   Lock WrongContract InFwdNotRoll
    16      AEX     201511          1  False         False        False
    4      BOBL     201512          2  False         False        False
    26      BTP     201512          2  False         False        False
    11      CAC     201511          1  False         False        False
    18   COPPER     201512         -2  False         False        False
    17     CORN     201612         -3  False         False        False
    13  CRUDE_W     201612         -2  False         False        False
    15  EDOLLAR     201903          3  False         False        False
    24  EDOLLAR     201812          9  False         False        False
    19      EUR     201512         -2  False         False        False
    25  EUROSTX     201512        -13  False         False        False
    5    GAS_US     201601         -5  False         False        False
    8      GOLD     201512         -1  False         False        False
    10      JPY     201512         -3  False         False        False
    23    KOSPI     201512          1  False         False        False
    14     KR10     201512          2  False         False        False
    12      KR3     201512         10  False         False        False
    20  LIVECOW     201610         -1  False         False        False
    7       MXP     201512         -3  False         False        False
    21   NASDAQ     201512          1  False         False        False
    27     PLAT     201601         -1  False         False        False
    0       SMI     201512          1  False         False        False
    3   SOYBEAN     201611         -2  False         False        False
    9     SP500     201512          1  False         False        False
    1       US2     201512          3  False         False        False
    22      US5     201512          1  False         False        False
    2       V2X     201512          4  False         False        False
    28      VIX     201512         -1  False         False        False
    6     WHEAT     201612         -2  False         False        False
    

    Risk:
    Code:
    Expected annual risk more than GBP6400 per year, GBP400 per day
           code  multisignal  expected_annual_risk  expected_annual_risk_per_contract  position  expected_annual_risk_rounded_pos
    20      CAC          9.9                  6431                               7448         1                              7448
    18    KOSPI         12.4                  8057                               8015         1                              8015
    23    SP500         16.8                 10947                              10017         1                             10017
    21      SMI         10.1                  6543                              10308         1                             10308
    19      AEX         12.6                  8221                              13423         1                             13423
    8       BTP         23.3                 15129                               7657         2                             15314
    36  EDOLLAR         26.6                 17274                               1512        12                             18141
    
    22   NASDAQ         14.9                  9715                              10361         1                             10361
    2   LIVECOW        -10.2                  6612                               5001        -1                              5001
    33     PLAT        -12.5                  8145                               7236        -1                              7236
    3   SOYBEAN        -16.7                 10878                               4017        -2                              8033
    27      JPY        -16.4                 10677                               4563        -2                              9127
    25      EUR        -25.7                 16749                              10817        -1                             10817
    31     GOLD        -17.0                 11041                              11581        -1                             11581
    30   COPPER        -24.4                 15896                               8730        -2                             17460
    34  CRUDE_W        -27.8                 18090                              11206        -2                             22412
    35   GAS_US        -33.8                 21998                               4771        -5                             23857
    
    
    
    As noted above Gas is still my largest position, though I'm also short Crude.

    Trades:
    Code:
             code contractid     filled_datetime  filledtrade  filledprice
    7258      AEX     201511 2015-11-03 08:03:33            1   463.800000
    5920      AUD     201512 2015-10-09 11:37:46            1     0.731800
    5998      AUD     201512 2015-10-22 06:47:16           -1     0.717900
    6004     BOBL     201512 2015-10-22 14:46:40           -1   129.460000
    7219     BOBL     201512 2015-11-02 08:33:42           -1   129.340000
    7222      BTP     201512 2015-11-02 08:36:03           -1   138.260000
    6016      CAC     201511 2015-10-27 08:00:26            1  4886.000000
    5944   COPPER     201512 2015-10-14 18:14:14            1     2.414500
    6529   COPPER     201512 2015-10-27 17:15:21           -1     2.361000
    7270     CORN     201612 2015-11-03 15:19:35           -1   404.750000
    5908  CRUDE_W     201512 2015-10-07 12:12:48            1    50.090000
    5956  CRUDE_W     201512 2015-10-19 12:02:24            1    47.240000
    5959  CRUDE_W     201612 2015-10-19 12:02:24           -1    52.200000
    5995  CRUDE_W     201612 2015-10-21 16:10:31           -1    51.020000
    7237  EDOLLAR     201812 2015-11-02 12:24:19           -1    98.015000
    5911      EUR     201512 2015-10-08 08:52:51            1     1.130000
    6010      EUR     201512 2015-10-23 06:15:13           -1     1.110500
    7276      EUR     201512 2015-11-04 01:38:19           -1     1.095300
    7225   GAS_US     201512 2015-11-02 12:09:19            4     2.252000
    7228   GAS_US     201601 2015-11-02 12:09:19           -4     2.428000
    7231   GAS_US     201512 2015-11-02 12:12:09            1     2.252000
    7234   GAS_US     201601 2015-11-02 12:12:09           -1     2.427000
    5905      GBP     201512 2015-10-07 06:39:49            1     1.523900
    5917      GBP     201512 2015-10-09 02:13:50            1     1.535500
    5941      GBP     201512 2015-10-14 18:07:20            1     1.545200
    7135      GBP     201512 2015-10-29 02:06:17           -1     1.526100
    7207      GBP     201512 2015-11-02 01:30:39            1     1.542700
    7264     GOLD     201512 2015-11-03 12:06:42           -1  1131.600000
    5902      JPY     201512 2015-10-07 04:59:31            1     0.008349
    6007      JPY     201512 2015-10-22 17:30:22           -1     0.008289
    6013      JPY     201512 2015-11-01 18:37:04           -1     0.008257
    7279      JPY     201512 2015-11-04 13:43:21           -1     0.008241
    5980    KOSPI     201512 2015-10-20 02:42:56            1   249.100000
    7204     KR10     201512 2015-10-29 03:05:27            1   126.580000
    7216     KR10     201512 2015-11-02 01:43:36           -1   125.960000
    6706      KR3     201512 2015-10-28 01:55:52            1   109.730000
    5935  LEANHOG     201606 2015-10-13 14:10:50            1    81.400000
    5989  LEANHOG     201606 2015-10-20 14:27:43           -1    79.525000
    6370  LEANHOG     201606 2015-10-27 14:18:46           -1    77.000000
    7249  LEANHOG     201606 2015-11-02 15:05:23           -1    76.150000
    7285  LEANHOG     201606 2015-11-04 14:21:48           -1    74.775000
    5977  LIVECOW     201610 2015-10-19 16:09:13            1   132.575000
    5914      MXP     201512 2015-10-08 16:34:46            1     0.060230
    5947      MXP     201512 2015-10-15 02:19:14            1     0.060580
    6343   NASDAQ     201512 2015-10-27 14:00:41            1  4623.500000
    5899      NZD     201512 2015-10-07 02:04:24            1     0.651000
    5938      NZD     201512 2015-10-14 08:47:01            1     0.669800
    5992      OAT     201512 2015-10-21 07:35:44           -1   151.630000
    6001      OAT     201512 2015-10-22 07:32:45            1   152.370000
    7240      OAT     201512 2015-11-02 12:39:52           -1   152.520000
    5923     PLAT     201601 2015-10-12 13:55:40            1   995.900000
    7252      SMI     201512 2015-11-02 15:03:00            1  8939.000000
    5929  SOYBEAN     201611 2015-10-13 12:02:12            1   899.250000
    6241  SOYBEAN     201611 2015-10-27 12:28:54           -2   891.000000
    7132  SOYBEAN     201611 2015-10-28 17:05:52           -1   887.000000
    7255  SOYBEAN     201611 2015-11-02 15:59:59           -1   887.000000
    5983    SP500     201512 2015-10-20 14:08:39            1  2023.250000
    7273     US10     201512 2015-11-03 17:32:53           -1   127.109375
    5926      US2     201512 2015-10-12 14:18:50            1   109.539062
    6337      US5     201512 2015-10-27 13:59:50           -1   120.578125
    5950      V2X     201511 2015-10-19 09:39:44           -3    23.250000
    5953      V2X     201512 2015-10-19 09:39:44            3    21.550000
    7129      VIX     201512 2015-10-28 16:31:53           -1    17.100000
    7267    WHEAT     201612 2015-11-03 13:12:23           -1   537.000000
    Slippage £146 vs £320 expectations. I'm seriously considering running my execution algo as a standalone scalping system (on a small number of markets with very limited risk). It will be interesting to see if this cruddy slow thing can really still make money in the world of HFT when it isn't attached to a much slower trading system. That little project will have to wait until I've refactored my code; something I am putting off for as long as possible.

    GAT
     
    #190     Nov 4, 2015
    Raphael, callmepaul and Iwilldoit like this.