building the system

Discussion in 'Automated Trading' started by Kris, Jan 19, 2009.

  1. Kris


    Okay, so it appears I've found an edge (I think)... maybe the experienced guys can help me out here.

    Backtesting results for my intraday system (no overnight holds) came back good - depending on what group of equities I'm testing and how tight my stops are I'm running from between 45-52% win rate, with winners outpacing losers by a margin of inbetween 1.5 and 1.85 to one. Testing was done on the previous six months and # of trades ranged from 600-1000 trades total (for a set of 10 equities). I set the testing parameters to only take 100 share lots. Total Net Profit came to $16,000 and change with $40,000 capital required (to run a trade on each equity at the same time) but the system required less than $20,000 invested at any one time. I don't have it in front of me but I think max drawdown was around $2k with 7 consecutive losers reported.

    This seems pretty good to me - now commissions I'm not sure about - I know there are some pretty good deals out there (I know what the prop firms get), and slippage I asked about in the other thread... if I lost .07 cents per trade on 800 trades, that's $5600 gone plus commissions I could still be looking at $10k for $40k invested - a 25% return over 6 months... am I being too optimistic?

    Now, a couple things concern me - one is that the testing was done over the last 6 months and volatility has been at extremes which could indicate that these type of results are not necessarily repeatable. That worries me a bit. Nevertheless, even an intraday long-only version of this system did quite well for a bear market (took considerably less trades though).

    Is the next step to now purchase more historical data for a few select equities and test during quieter times (ie 2003-2007)? And then do a walk forward?

    Does anyone have any suggestions on how to best optimize? Am I being too optimistic here?

    Haven't done the money dance yet :) hopefully soon lol

  2. yes use longer history, try to get 2000 trades/underlying;
    as you mencioned by yourself market behaviour has
    changed lately

    optimize anyway you want, if your done optimizing
    play litle with the parameters; your system should
    remain stable during this time and may not show
    to much "parameterweakness" wich would be a result
    of "over"optimizing

    test it forward and do some papertrading
  3. If you don't mind me asking what software did you use to do your backtesting? Thanks.
  4. Try back testing your results over longer period of time. Hell, if you have the processing power (I am assuming that you are testing a day trading algo), go back AT LEAST ten years, maybe even further if you can.

    Once you have that data, only THEN should start thinking about optimizing.
  5. Kris


    Okay, that's the plan then - I'll test on a few equities over a longer time period and see what happens. I'll keep you updated.

    user8 - I'm using Investor R/T for backtesting/system building purposes because it's very simple to use without an extensive programming background.
  6. Your back testing sounds reasonable for the time period you chose. However, some other optimization methods may help.
    I suggest you back test in a period like part of '02 and '03 that has similiar volatility characteristics to todays markets. Then walk forward the optimization settings to today. This will give you a better idea of how durable your strategy is going forward.
  7. and if you can, backtest during late 1987. That was a very volatile time with huge losses, like today. One day lost 23%.

    Also, there were times where the market went nowhere for a couple of years. Early 90s, if memory serves me correctly.

    Everyone likes to backtest on rising markets, which is what the market does over the long term. But long flat markets and bear markets also really test a system.
  8. Kris


    Excellent advice, thank you guys for your help. I'm trying to line up some intraday historical as we speak.

    The type of market I'm most concerned about is a flat market since the conditions I've been testing under have been extremely volatile.

    I tested on the Dow 30 today. I actually seem to make more money with this system by widening the stop a bit which increases the win rate but decreases win size. Results came back as 55% winners, 1.25 - 1 win size. A tighter stop will get about 42-45% winners but win size is increased to around 1.6-2 to one. The higher win rate seems to generate more cash at this stage, we'll see what more testing brings.

    Quite happy with this so far :)
  9. lindq


    You will find that commissions and slippage are definitely a factor with that number of trades. So don't buy the Porshe until you are realistic about that.

    You don't mention the type of system, but you can assume that yes, your system will probably not perform in a normal VIX environment the way it has the past 6 months. You sound bright enough to figure that on on your own based on what approach you're taking.

    Another thing to look at with equities, is what's happening in the overall market environment at times/days that you are cooking? Are your trades all tending to signal at once during particular conditions? If so, you might want to look at trading the index, like ES, as opposed to screwing around with individual stocks. Something to consider, as the market itself can contribute a lot to movement of your watchlist. Run ES or SPY alongside your trades and see if this makes sense. For many traders, myself included, this exercise was enough to cause me to leave equities in the dust.

    Good luck.
  10. It sounds to me like "noise trading", but I may be wrong.

    Your success rate is too low and so is your profit factor. If you try to trade anything like that in real-time, slippage -- as someone else already pointed out -- partial fills, commissions , etc. may drive your net down to zero and you may end up in the red.

    I don't trade any system with a success rate less that 60% and a profit factor less than 1.7 combined. Maybe I'm just too conservative.

    Good luck
    #10     Jan 21, 2009