Fully automated futures trading

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

  1. That's my current system, yes. But it would be true of any sufficiently slow trading strategy. Don't forget that's based on a long period of time; on a day to day basis of course you'd see profit fluctuations compared to running it every day.

    Rob
     
    #3821     Oct 19, 2023
  2. Hello @globalarbtrader,

    I hope this is the right channel for questions. First and foremost, I'd like to express my gratitude for writing such an excellent book! I'm doing my best to absorb all the information on AFTS, as it's filled with insights I wasn't previously aware of. I hope that you continue to thrive financially, but don't want others to read your books :sneaky:

    Currently, I'm making a concerted effort to grasp strategies one through nine, but I've encountered a few stumbling blocks:

    1. Annualized Standard Deviation of Return (Instrument Risk): How can I calculate this on a daily basis? Given that the closing price fluctuates daily, does the instrument risk also change accordingly?

      also, when you calculate the stdv, do you use (C-C[1])/C[1] instead (C-C[first bar of the chart])/C[first bar of the cart] ??


    2. Regarding Figure 5 on page 31: I can't seem to identify any instances where the profit decreases by more than 30%...
    Is there anything you'd like me to clarify or expand upon?
     
    #3822     Oct 20, 2023
  3. 1. Yes the instrument risk will change every day.

    (C-C[1])/C[1] instead (C-C[first bar of the chart])/C[first bar of the cart]

    I have no idea what any of this means. If the daily price is p_t then a percentage change is (p_t-1 - p_t)/p_t-1

    2. The october 87 crash has a daily loss of 40%

    Rob
     
    #3823     Oct 21, 2023
  4. Kernfusion

    Kernfusion

    If for each instrument I multiply it's current RawUnroundedTargetPosition by it's InstrumentValueVolatility will I get a value comparable across instruments?

    I'm trying to build a quick and dirty Dynamic Optimization report which compares raw unoptimized positions with the actual current positions summarized by 'asset class'.

    The above approach gives me this, does it make sense?

    upload_2023-10-21_19-38-0.png
     
    Last edited: Oct 21, 2023
    #3824     Oct 21, 2023
  5. D

    Dear Rob

    Thank you so much for your reply as well as explanation.
    What I meant to say was (p_t-1 - p_t)/p_t-1. I wrote in Easylnaguage but I think I wrote the right one which you are using. :)

    I googled the worst day for S&P500 and got this below. Also, my data shows that the worst day was near 20%. Could you please elaborate how you got the 40%?
    I'm afraid if I did something wrong with my code.



    Best,
    upload_2023-10-23_10-18-20.png
     
    #3825     Oct 22, 2023
  6. Trying to remember the exact definition of IVV, but if it's $ (or your currency) annual standard deviation per contract yes that makes sense (will be comparable across instruments at least; arguable whether it makes sense to summarise DO workings although as you say it's quick and dirty). I use something similar in my risk report but divided by capital to give a % figure.

    Rob
     
    #3826     Oct 26, 2023
    Kernfusion likes this.
  7. WTF is 'easy' language? Seems to be somewhat misnamed

    S&P 500 spot prices fell ~20% but what happened to futures (bearing in mind that stock pricing basically froze, but futures continued to trade, and thus were at a significant discount to stocks):

    Here are the prices I have for the December 87 contract (OHLC and ignore the final column which is volumeI don't have):

    Code:
    1987-10-15 23:00:00  303.30  307.60  297.95  298.25     0.0
    1987-10-16 23:00:00  300.50  301.00  277.00  282.25     0.0
    1987-10-19 23:00:00  264.00  269.00  198.00  201.50     0.0
    1987-10-20 23:00:00  221.00  242.00  181.00  216.25     0.0
    1987-10-21 23:00:00  242.00  259.50  237.00  258.25     0.0
    You can see a similar picture in figure 3 here file:///home/rob/Downloads/neer293a.pdf

    No idea about your code, but your data is wrong if it's supposed to be futures prices.

    Rob
     
    #3827     Oct 26, 2023

  8. Hey Rob

    Thank you so much for your reply and kind explanation. Now all the mystery is gone! dang it! I should've asked you earlier instead of just assuming.
    My Tradingview ES chart starts from there so I thought you might used SPX data for the past price. Wasn't aware of the big S&P 500 future which traded before 1997.:banghead:

    How did you get these data? :finger:


    Easylanguage is a language which is for Tradestation or Multistation.
    Since I'm no good at Python, I'm trying to replicate your strategies on Tradingview or Easylanguage.

    Thanks again!
     
    #3828     Oct 26, 2023
  9. Hi @cholo
    Would you mind sharing the python code with the buffering technique, when you find the time? I'd be interested in that.
    Thanks a lot.
     
    #3829     Oct 27, 2023
  10. Kernfusion

    Kernfusion

    Found it in the original source :)
    Instrument value volatility:
    The expected daily standard deviation of returns of owning one instrument block, measured in the same currency as the trader or investor’s trading capital. Equal to instrument currency volatility multiplied by the relevant exchange rate. See page 168.
    and
    Instrument currency volatility:
    The expected daily standard deviation of returns of owning one instrument block, measured in the currency of the instrument. Equal to price volatility multiplied by block value. See page 168.

    So yes, it's all in currency units, and I was also thinking to divide it by the daily risk capital in $ (e.g. 5,000$ with 300,000 of total capital @ 0.25 vol.tgt) and express as %.
    If I do that, I get this, which sort of makes sense I guess, although, not sure at which levels of discrepancies I should start to worry., the grouping by these asset classes might not reflect the current correlations, but running an automatic correlation grouping algorithm to get the current "correct" groups is way more work :)

    upload_2023-10-27_16-45-7.png
     
    Last edited: Oct 27, 2023
    #3830     Oct 27, 2023