Book recommedations on Algo trading and backtesting

Discussion in 'Automated Trading' started by cafeole, Nov 1, 2020.

  1. ValeryN

    ValeryN

    I have 3 of his books. Which is a huge compliment to the author, as I probably bought few hundred on this topic in total and kept <20. Mostly to see what kind of thing my guests would pick up first when visit :) The rest were sold online with warm wishes of luck to new owners or went straight to garbage after I've read them.

    Got them in this order:
    1. Mean Reversion Trading Systems
    2. Quantitative Trading Systems
    3. Modelling Trading System Performance
    Mean reversion is most practical one on systems development and goes deep into MR, which I am a big fan of. There is only so much theory one can take before wanting to get to an actual strategy talk. And it offers a decent balance.
    If you want to get one I'd say get that one.

    #2 talks about more categories of systems
    #3 has most math and theory and might take a very long time to understand, including, how and to what extend to apply all of that
     
    #11     Nov 1, 2020
    cafeole likes this.
  2. cafeole

    cafeole

    Thanks, ValeryN. That helps.
     
    #12     Nov 1, 2020
  3. MarkBrown

    MarkBrown

    page 9, 11, 140, 152 but good stuff throughout the text...

    broad market, efficiency ratio, adaptive moving average with slope function, smoothing constant, how to handle spike moves both in your favor and against your position - just can't say enough about this thin book.
     
    #13     Nov 1, 2020
    cafeole likes this.
  4. cafeole

    cafeole

    #14     Nov 2, 2020
  5. cafeole

    cafeole

    It turns out that the above book is a smaller version of his "Quantitative Technical Analysis" book. It is 161 pages, but, as far as I have read, leaves out the details of his larger book.
     
    #15     Nov 2, 2020
  6. cafeole

    cafeole

    I just finished Foundations of Trading by Bandy. What an eye opener. Completely changed my view of backtesting. He introduced me to the term "stationarity". Price over time is NOT stationary but most algorithms requite the data to be stationary. That is why he strongly rejects backtesting over long periods of time. This increases the non stationary aspect of the data and leads to incorrect results. He doesn't, in this book anyway, tell us how to mitigate this. He did point to a youtube video of his talking about the concept. I will watch it when I get time.
     
    #16     Nov 4, 2020
    indicator777 likes this.
  7. ValeryN

    ValeryN

    There are few things in systematic trading that become pretty obvious the more you do it, examples:
    1. Backtesting over any "single" period of time is pretty meaningless.
    2. Probability distribution in financial instruments is not uniform.
    While there is nothing new here, I often saw people taking it to the wrong extremes, such as equating #1 to - backtesting is meaningless / you shouldn't test beyond last few years etc or #2 future price can not be predicted at all. Those are just few examples, there is lots of "common wisdom" circulating around which seems like it logically came out of those but is incorrect.

    So for the "not stationarity" nature of price I would suggest not to take it too far. On practice you cover this by
    1. ALWAYS breaking down your test data into intervals. Lets say - at least 4, to give you some number to start with
    2. Never developing initial version of your system on more than 25% of your available data
    3. Never use latest data interval to develop initial version of your system as it will create, often, incurable bias towards what worked recently
    4. Having enough data intervals to represent reasonably diverse sample of market types (basically combinations of volatility + direction)
    If all of that is done, interval duration will be almost entirely irrelevant and never too long.
    If is always too long when all data is used at once, regardless of its' absolute duration.

    Bandy also speaks a lot, especially in the later years, about impulse vs state systems. Which is overrated in my opinion. I am oversimplifying but will take it as far as suggesting that his initial approach to systems testing in AmiBroker was rather naive (or was it was simply a mistake reported by readers). And that's why it because a topic in a first place. He basically used to include ONLY closed trades into DD calculations. No need to start calling it a fancy name and come up with a big explanation about it, could have just said -

    ALWAYS look at your DD based on OPEN & CLOSED trades while modeling your system, because in real life that's what will drive you nuts and make you quit trading it.

    Val
     
    Last edited: Nov 4, 2020
    #17     Nov 4, 2020
    comagnum and cafeole like this.
  8. cafeole

    cafeole

    lt seems that walk forward testing with intervals equal to OOS interval (as he mentions in his book) might mitigate it as much as you can.

    Anyway, thanks for the clarification, Val.
     
    #18     Nov 4, 2020
  9. I liked Chan's Quantitative Trading but not so much the other two books that came after it. I have also read most of the other books mentioned. Most of these books do not focus on the two things that will happen with high certainty: either you will have to live with a high draw-down no matter what to eventually profit in longer-term or the strategy will not work at all and they do not provide insight into the causes of these problems. The one book I have found that provides some basic methodology for detecting spurious systems is Fooled by Technical Analysis by Michael Harris. It includes an honest, free-of-hype approach to back-testing and to testing the significance of systems. The author claims that conceiving a strategy is the easy part and the hard part is to discover the hidden problems that will make it unprofitable - it is a worthwhile read but only available from the author website. I printed all the pages and made my own hard copy.
     
    #19     Nov 5, 2020
  10. Why do most algorithms require stationary data? This is patently false. Most statistical analysis requires stationary data but there are advanced methods that do not and also you can make the data stationary if you want. What Bandy is saying is surprising because CTAs and especially Turtles made billions trading non stationary prices with trend-following systems and in fact it was the non stationary prices (trends) that provided the profits. It is a good idea to put through a sanity filter everything you read. Momentum and trend-following have been the most successful trading methods and both thrived due to prices being no stationary.
     
    #20     Nov 5, 2020