Fully automated futures trading

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

  1. H2O

    H2O

    #311     Mar 2, 2016
  2. Yes, I'll post a link when I get it

    GAT
     
    #312     Mar 2, 2016
  3. #313     Mar 3, 2016
  4. H2O

    H2O

    #314     Mar 4, 2016
  5. Monthly review (last one was Feb 5th)

    [​IMG]
    [​IMG]
    P&L: 0.4% (graph is slightly out of date)
    Since inception: 93.1%
    Drawdown (new HWM): 8.5%

    A flat month after the excitement of January, though I set a new HWM a couple of times and broke the 100% barrier for p&l since inception (using my preferred calculation method which assumes constant maximum capital - in reality it's a lot more in cash terms based on the initial cash of 300K)

    One more month of the financial year left to go, and my YTD fiscal is around 36%; not as good as last years stellar 57%, but still higher than my backtested average of around 22%. A lot can happen in a few weeks though!

    Reports:

    P&L

    Up:
    Gas 10.6K
    Gold 3.6K
    Corn 3.1K
    Wheat 2.1K

    down:
    Crude -3.8K
    Soy -2.3K
    Nasdaq -2.2K
    Palladium -2.1K


    The Crude / Gas and Gold / Palladium difference again highlights the importance of diversification, even within asset classes. This will be the subject of a blog post I'm currently working on (can we adequately diversify with less capital?).

    Positions

    Code:
           code contractid  positions   Lock WrongContract InFwdNotRoll
    3       AUD     201603          1  False         False        False
    8      BOBL     201606          3  False         False        False
    19      BTP     201606          3  False         False        False
    16     BUND     201606          1  False         False        False
    0      CORN     201612         -9  False         False        False
    11  CRUDE_W     201612         -2  False         False        False
    4   EDOLLAR     201906         11  False         False        False
    6   EDOLLAR     201909          1  False         False        False
    7       EUR     201603         -1  False         False        False
    2   EUROSTX     201603        -13  False         False        False
    12   GAS_US     201605         -4  False         False        False
    17      GBP     201603         -1  False         False        False
    15     KR10     201603          3  False         False        False
    23      KR3     201603          9  False         False        False
    18  LEANHOG     201606          2  False         False        False
    20  LIVECOW     201610         -1  False         False        False
    1       MXP     201603         -2  False         False        False
    10      OAT     201606          1  False         False        False
    21  SOYBEAN     201611         -4  False         False        False
    14     US10     201606          1  False         False        False
    22      US2     201606          2  False         False        False
    13      US5     201606          1  False         False        False
    5       V2X     201604          5  False         False        False
    9     WHEAT     201612         -7  False         False        False
    
    Risk

    Code:
           code  multisignal  expected_annual_risk  expected_annual_risk_per_contract  position  expected_annual_risk_rounded_pos
    
    Longs
    
    15      US5          2.6                  1882                               2784         1                              2784
    13      US2          4.6                  3242                               1739         2                              3478
    16      V2X          4.8                  3431                                933         5                              4663
    12     US10          4.2                  3010                               4857         1                              4857
    1   LEANHOG          7.7                  5481                               2665         2                              5331
    10      OAT          7.5                  5341                               5844         1                              5844
    7      BOBL          8.8                  6254                               1964         3                              5892
    24      AUD         13.8                  9808                               6627         1                              6627
    9      BUND          9.8                  6937                               6706         1                              6706
    6       KR3          9.2                  6515                                779         9                              7007
    5      KR10         12.2                  8653                               3339         3                             10017
    36  EDOLLAR         25.7                 18288                               1627        12                             19530
    8       BTP         27.2                 19316                               6635         3                             19905
    
    
    Shorts
    
    32   PALLAD         -2.5                  1793                              12720         0                                 0
    2   LIVECOW         -7.4                  5236                               4326        -1                              4326
    28      MXP         -4.8                  3450                               2988        -2                              5975
    26      GBP         -3.4                  2437                               6650        -1                              6650
    25      EUR        -11.3                  8023                               9099        -1                              9099
    3   SOYBEAN        -18.6                 13253                               3494        -4                             13977
    0      CORN        -21.6                 15342                               1587        -9                             14282
    4     WHEAT        -27.4                 19463                               2852        -7                             19966
    34  CRUDE_W        -32.9                 23378                              10606        -2                             21213
    35   GAS_US        -32.8                 23356                               5421        -4                             21685
    
    Trades

    Code:
             code contractid     filled_datetime  filledtrade  filledprice
    8683      AUD     201603 2016-02-22 17:25:45            1     0.724000
    8782      AUD     201603 2016-02-29 02:07:01           -1     0.711600
    8806      AUD     201603 2016-03-02 02:13:05            1     0.723100
    8632     BOBL     201603 2016-02-22 07:30:56            1   132.860000
    8809     BOBL     201603 2016-03-02 07:28:29           -4   133.150000
    8812     BOBL     201606 2016-03-02 07:28:29            4   131.440000
    8881     BOBL     201606 2016-03-04 16:08:23           -1   131.250000
    8533      BTP     201603 2016-02-09 07:34:19           -1   136.550000
    8584      BTP     201603 2016-02-12 07:40:01           -1   137.340000
    8623      BTP     201603 2016-02-18 10:42:54            1   138.440000
    8740      BTP     201603 2016-02-24 07:34:15            1   138.860000
    8788      BTP     201603 2016-02-29 07:32:45            1   139.340000
    8815      BTP     201603 2016-03-02 07:29:05           -3   140.310000
    8818      BTP     201606 2016-03-02 07:29:05            3   138.620000
    8821     BUND     201603 2016-03-02 07:31:40           -1   165.600000
    8824     BUND     201606 2016-03-02 07:31:40            1   162.970000
    8536      CAC     201602 2016-02-09 08:10:13           -1  4079.000000
    8587      CAC     201602 2016-02-12 08:04:10            1  3963.500000
    8539   COPPER     201603 2016-02-09 12:07:16            1     2.050000
    8833   COPPER     201603 2016-03-02 12:27:58            1     2.165500
    8557     CORN     201612 2016-02-09 17:17:12           -1   386.000000
    8611     CORN     201612 2016-02-16 17:31:04           -1   382.750000
    8803     CORN     201612 2016-03-01 15:01:52           -1   375.500000
    8800  CRUDE_W     201612 2016-02-29 12:11:33           -1    39.660000
    8875  CRUDE_W     201612 2016-03-04 11:59:29            1    40.980000
    8569  EDOLLAR     201903 2016-02-11 13:55:56           -1    98.855000
    8581  EDOLLAR     201903 2016-02-12 06:37:44           -1    98.925000
    8656  EDOLLAR     201903 2016-02-22 12:02:44           -4    98.605000
    8659  EDOLLAR     201906 2016-02-22 12:02:44            4    98.535000
    8746  EDOLLAR     201909 2016-02-24 12:50:48            1    98.575000
    8836  EDOLLAR     201906 2016-03-02 14:39:58           -1    98.460000
    8770      EUR     201603 2016-02-26 18:01:19           -1     1.092900
    8548   GAS_US     201605 2016-02-09 14:33:53           -1     2.229000
    8662   GAS_US     201604 2016-02-22 12:05:39            1     1.839000
    8665   GAS_US     201605 2016-02-22 12:05:39           -1     1.916000
    8668   GAS_US     201604 2016-02-22 12:38:22            1     1.835000
    8671   GAS_US     201605 2016-02-22 12:38:22           -1     1.911000
    8674   GAS_US     201604 2016-02-22 12:41:31            1     1.836000
    8677   GAS_US     201605 2016-02-22 12:41:31           -1     1.913000
    8620      GBP     201603 2016-02-18 02:27:58           -1     1.430000
    8761      GBP     201603 2016-02-25 02:31:53           -1     1.392500
    8839      GBP     201603 2016-03-03 02:30:13            1     1.408300
    8602     GOLD     201606 2016-02-16 13:20:00           -1  1211.400000
    8575     KR10     201603 2016-02-12 02:40:33           -1   129.340000
    8713     KR10     201603 2016-02-23 02:53:56            1   129.100000
    8578      KR3     201603 2016-02-12 03:51:19           -1   110.230000
    8737      KR3     201603 2016-02-24 02:16:08            1   110.190000
    8785      KR3     201603 2016-02-29 02:31:40            1   110.350000
    8608  LIVECOW     201610 2016-02-16 15:29:14           -1   116.575000
    8884  LIVECOW     201610 2016-03-04 18:24:37            1   121.725000
    8617      MXP     201603 2016-02-17 17:28:23            1     0.055130
    8545   NASDAQ     201603 2016-02-09 14:12:22           -1  3911.000000
    8605   NASDAQ     201603 2016-02-16 14:02:43            1  4064.750000
    8596      OAT     201603 2016-02-15 07:36:14           -1   154.070000
    8635      OAT     201603 2016-02-22 08:35:15            1   155.720000
    8827      OAT     201603 2016-03-02 09:55:31           -3   155.630000
    8830      OAT     201606 2016-03-02 09:55:31            3   155.910000
    8851      OAT     201606 2016-03-03 07:34:22           -1   155.670000
    8857      OAT     201606 2016-03-03 07:52:22           -1   155.580000
    8791   PALLAD     201603 2016-02-29 11:59:19            1   497.100000
    8794   PALLAD     201606 2016-02-29 11:59:19           -1   497.500000
    8860   PALLAD     201606 2016-03-03 17:56:36            1   540.500000
    8530     PLAT     201604 2016-02-08 14:35:32            1   925.000000
    8524  SOYBEAN     201611 2016-02-08 12:31:16           -2   878.500000
    8542  SOYBEAN     201611 2016-02-09 14:30:02           -1   877.750000
    8590  SOYBEAN     201611 2016-02-12 12:56:44            1   888.000000
    8614  SOYBEAN     201611 2016-02-17 13:41:53            1   888.500000
    8626  SOYBEAN     201611 2016-02-18 13:03:55            1   890.250000
    8749  SOYBEAN     201611 2016-02-24 12:49:10           -1   880.000000
    8764  SOYBEAN     201611 2016-02-26 13:10:50           -1   878.500000
    8797  SOYBEAN     201611 2016-02-29 14:36:32           -1   874.000000
    8878  SOYBEAN     201611 2016-03-04 12:59:50            1   886.250000
    8887  SOYBEAN     201611 2016-03-04 18:25:09            1   890.000000
    8572    SP500     201603 2016-02-12 06:34:46           -1  1816.250000
    8599    SP500     201603 2016-02-15 15:14:48            1  1882.750000
    8629    SP500     201603 2016-02-21 19:12:47            1  1882.000000
    8680    SP500     201603 2016-02-22 14:03:06           -1  1934.750000
    8716     US10     201603 2016-02-23 13:59:03           -1   130.421875
    8719     US10     201606 2016-02-23 13:59:03            1   130.054688
    8593      US2     201603 2016-02-12 17:41:10           -1   109.531250
    8722      US2     201603 2016-02-23 13:59:32           -2   109.296875
    8725      US2     201606 2016-02-23 13:59:32            2   109.296875
    8728      US5     201603 2016-02-23 14:00:22           -2   120.898438
    8731      US5     201606 2016-02-23 14:00:22            2   120.796875
    8767      US5     201606 2016-02-26 17:55:30           -1   120.781250
    8560      V2X     201603 2016-02-11 08:34:44           -3    30.900000
    8563      V2X     201604 2016-02-11 08:34:44            3    30.850000
    8566      V2X     201604 2016-02-11 08:39:10            1    31.150000
    8872      V2X     201604 2016-03-04 08:18:48           -1    26.500000
    8527    WHEAT     201612 2016-02-08 12:34:25           -1   496.250000
    8758    WHEAT     201612 2016-02-24 13:04:18           -1   490.250000
    Expected slippage £351
    Actual £469

    Ouch.

    Although there were a few bad fills, possible as I was doing a lot of rolls, order number 8569 - Eurodollars - is the main culprit here. I saw 6.5 additional ticks of slippage at $25 each, totalling £120, on top of the £4.45 I'd have payed if I'd submitted. This was a particularly volatile day when Eurodollar hit a high 22 ticks off the open and closed 2 ticks down. The 85 I received was somewhere in the middle of that range, but unfortunately I'd entered the market as it was slamming downwards off the peak and then chased it down. The contract is now trading at 47.
     
    #315     Mar 5, 2016
    Visaria likes this.
  6. Hi GAT,
    In your backtesting, do you assume you execute at the closing price (plus slippage and transaction costs), at the next day at the open or at some other price?
    Also, in your EWMAC rule, is there a reason why the span of your slow EWMAs are 4x longer than your faster EWMAs? Did you test any alternative multiples e.g., 3 or 5? I am aware there is a potential fitting bias associated with alternatives, but wanted to get your take on it.
    Thanks
     
    #316     Mar 9, 2016
  7. I assume I execute at the next days closing price, plus slippage.

    For the EWMAC multiple there are 3 approaches you can take:

    - use real data
    - generate random data with trends plus noise http://qoppac.blogspot.co.uk/2015/11/using-random-data.html
    - Apparently there is a closed form solution for the optimal given certain assumptions about the underlying price process, which a very clever guy once showed me. I couldn't reproduce it here for legal reasons as it's not in the public domain (plus I forgot).

    Anyway, the right multiple seems to somewhere between 2 and 6 depending on which approach you take. And the performance surface is relatively flat between these values. So it doesn't make a lot of difference. If for example you ran 4,8; 4,12; 4,16; 4, 20; and 4,24 all at the same time; well the correlations between these things are very high ...

    Since I like to use fast moving average of lookback 4,8,16 and so on (you need to double it to keep the correlation of adjacent EWMAC the same); using 4 times has a certain neatness to it.

    GAT
     
    #317     Mar 9, 2016
    gonzatti likes this.
  8. wind_

    wind_

    Hi Rob,

    Thanks for posting your experience on ET. I'm a fan of your book & blog.

    Since your base currency for your futures account in GBP, I'm sure you have to handle with different currency exposure for futures margin.
    Which approach do you employ in your trading, or is there a good standard practice in hedge fund industry for handling currency exposure?
    1. convert your base currency to fulfill margin requirement (+/- profit/losses) ?
    2. let the currency remains in deficit, and pay for the interest accrued?
     
    #318     Mar 19, 2016
  9. Good practice is to minimise currency exposure.

    I try and cover my margin, but nothing more. This is especially true for EUR/ CHF where you can now be charged for cash balances. Wheras in a higher interest currency like KRW I might allow myself to build up a bit of an excess before converting. But generally any profits not yet withdrawn should sit in the base currency.

    GAT
     
    #319     Mar 20, 2016
    wind_ likes this.
  10. gmax

    gmax

    Hi Rob,
    In your Risk table, some instruments have signal > than 20 or < than - 20. Does it mean that you dont use caps for your forecasts?
     
    #320     Mar 25, 2016