Backtesting question

Discussion in 'Strategy Building' started by chanelops, Sep 17, 2009.

  1. telozo

    telozo

    TradeStation, and I assume other software packages too, can be set up to look inside a bar, to decide if an order placed on the previous bar has been hit.
    This will solve your resolution problem, but I would put the extra effort to program the entire strategy at intra-day level.
     
    #11     Sep 21, 2009
  2. Not sure I get that. If the bar contains a wide enough range that allows both a stop and a profit target both to be hit, how does TradeStation decide which has been hit? Seems to me you'd need the higher-rez data.
     
    #12     Sep 22, 2009
  3. In older TS versions like TS2000i, if the target was very close to the opening price that program assumed it was hit before the stop. Quite an arbitrary assumption I agree. I stopped using backtesting because the results were all over the place and I agree with the paper conclusions that some companies took traders for a ride, very irresponsible thing I would say. Check out the paper. I think the second program tested is TS2000i:

     
    #13     Sep 23, 2009
  4. telozo

    telozo

    It works like this:
    you set up a daily bar chart and add a strategy. In the properties of the strategy there is an option for intra-bar lookup. When you set it, you also specify the intra-day interval, in minutes. Let's say you pick 1 minute.

    When the strategy generates one or more orders for the next bar, and the range of the next bar includes the price of an order, tradestation will automatically load the 1 minute bar data for that particular bar, and check which order is hit using the 1 minute bars, practically giving you a 1 minute resolution.
     
    #14     Sep 23, 2009
  5. That sounds pretty neat, actually. Does it work as well in practice as it sounds like it should? For example, does TS have 1-minute data from say 10 years ago available for this type of lookup?
     
    #15     Sep 28, 2009
  6. Bob111

    Bob111

    in order to get as much as possible to real world in my back testing application i drill down to tick data. even after that,if you have a decent size position and for example you have limit order to sell your position at some target price-here i literally start counting shares,passed at my target price. even after that,if you trade relatively low volume stocks your results not going to be accurate. because many times you have 1000 shares at target and only a 100 was actually traded at that price. many times 1000's shares passed by at my price and my order never filled.
    same for stops. may times price just fell thru your stop and even if it's triggered -price is already down and may never come back and your stop will not be executed. that's why i prefer to use home made application for back testing.
    "common"existing soft is not flexible enough.
     
    #16     Sep 28, 2009
  7. dloyer

    dloyer

    Even then, that does not account for the latency between whatever triggered your order and the order hitting the exchange.

    Also, you will not be able to get all of the shares that trade at your price.

    Another fun fact that if you are trading a higher dollar stock and your position size is less than a 100 share lot, the market can trade right through your price because it will not move the NBO.

    I dont know that there is a truly accurate way to model limit orders on a fragmented market, with many exchanges.
     
    #17     Oct 3, 2009