New approach for testing algorithmic trading strategies

Discussion in 'Programming' started by fan27, Jul 22, 2018.

  1. fan27


    The genetic optimizers I am familiar with work on parameters of a given strategy. My platform tests different feature combinations that can make up a strategy. Of course there are deep learning routines that may use some sort of genetic optimization and then spit out strategy code but my approach uses highly supervised learning that is configured by the user.
    #11     Jul 23, 2018
  2. traider


    There are genetic programs out there that don't just optimize parameters. They search for strategies by combining mathematical formulas into a giant expression tree. Quite cool to play with.
    #12     Jul 23, 2018
    MarkBrown and fan27 like this.
  3. your are correct that is one of the faults of doing it this way and i also have had that problem. with the ndr platform you can pick from a quartile of settings, so like an Olympic judge you throw out the high and the lows and take the middle settings. Not perfect but it seems to work very well.
    #13     Jul 23, 2018
    dtrader98 likes this.
  4. It’s cool stuff, but it’s all curve fitting. No shortage of that. If I were a vendor, I’d look to handicap specific markets monthly, and offer to clients strategies based only on walk-forward simulation on real-time data, which then become historical stats. I wouldn’t take seriously anything else. Just my opinion.

    Good luck either way @fan27. Your programming skills are top notch. I don’t think you’ll die poor :)
    #14     Jul 23, 2018
    alfa8 and fan27 like this.
  5. Interesting, thank you for that. I am not familiar with the ndr platform. But I guess it is targeted at professionals and I am just a hobbyist.
    #15     Jul 23, 2018
  6. yea think of it this way when you optimize, greed would have you take the best setting. but if you back off the perfect setting you will make less money but you are hoping for better longevity. this seems to work for me now many decades. also it will make you build better models because you whacked it down off it's perfect settings.
    #16     Jul 23, 2018
  7. That's pretty interesting. Most published and common sense approaches I've seen keep the higher quantile and throw out the rest. That tries to mitigate some of the over-fitting by averaging over several series, rather than pick one best. The initial intuition about picking the middle set, would be that they are a more stable set to draw from, but that the average performance would likely be mediocre. Also, by middle, you are including the entire middle of the distribution (poor performers in sample, too)? I'm curious to know what kind of objective you found to work very well. Could you express it in terms of something like CAGR (and or Sharpe)? I.e. what kind of CAGR numbers did you get with that? Say vs. the top and lower quantiles that you threw out. And this is on hourly data, as opposed to EOD (or does the behavior you found work on both)?

    As I said, you (in particular) shared some interesting ideas here; (general) thread ideas are a bit dated, but a real stroll down memory lane.
    Last edited: Jul 23, 2018
    #17     Jul 23, 2018
  8. Along these lines, you might want to look at the Adaptrade Builder (
    It's under $1000 and the latest version has features to "periodically build new trading strategies to replace the existing ones". I have no financial relationship with the company, am just a satisified customer from using their Market System Analyzer (MSA) product. The owner, Mike Bryant, is a stand up guy who supports his products well.

    #18     Jul 28, 2018
  9. fan27


    Thanks for posting! The application looks great. While it looks like I am taking a similar approach to back-testing, the main difference is I am be distributing an SDK and console application with source code which is targeted at programmers who want to be able to extend the platform.
    #19     Jul 29, 2018
  10. You're welcome. If you want to look into it more, Adaptrade does a free, 30 day, full functional trial of their products.

    I can relate to your backtesting work. I trade options and couldn't find a product that would backtest options the way I needed and wrote my own options backtester.
    #20     Jul 29, 2018
    fan27 likes this.