Announcement

Collapse
No announcement yet.

backtesting inconsistant to real life

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • backtesting inconsistant to real life

    yet another question from me,

    im a little confused as to why this is, if i tick replay a day, or if i let my script run through an entire trading day uninterupted, it works fine, it does everything its supposed to, but if i unload the efs and reaply it to the chart, it comes up with slightly different numbers and i have no idea why, the script only runs on the close of each candle so i dont see why it should make a difference whether its live or historical data.. does anyone have any input?

    PS: the efs uses 15 minute interval data and applies it to a 1 minute chart, i suspect the problem may lay in that somehow, but i really have no idea


    Last edited by kalzenith; 06-18-2008, 11:29 PM.

  • #2
    there is a little trick to setting up EFS files to run in REALTIME vs. END OF BAR (EOB). All of the historical data is calculated EOB - so it you are running your EFS in REALTIME (tick by tick) waiting for your triggers to be fired, then the EOB data will generate incorrect entries - and there is nothing you can do to correct this.

    The trick is this....

    If your strategy is designed to execute EOB on all triggers (entries and exits), then you can program your EFS to replicate this historically. If your script is designed to operate in REALTIME (tick by tick), then there is no way to replicate this on historical bars.

    So, given the assumption that your code is designed to operate in RT and not EOB, you're going to have to live with the fact that "historical bars are generated as complete bars - not tick by tick and thus your historical results will not match the RT/tick by tick actions exactly".

    In order to provide further help, you'll need to explain your codes operation a bit more to me and how you expect it to operate. If you answer as I expect (stated above), then you're just going to have to live with it the way it is.
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      i think ive figured out the issue, its written the code so it basically runs RT, but esignal is set to only cycle the script at EoB, so backtesting SHOULD result in the same outcome as live data.. i believe the problem is that my efs is running at the end of every ONE MINUTE bar, yet its using a MACD from a 15 minute bar, while the one minute bars close it is using a macd on a 15 that is still fluctuating, but when i backtest the 15 minute bar is closed and it can therefore use the final result.. i try to write all my programs using EOB so it can be properly tested, but i didnt take into account the fact that the 15 would still be changing as the one minutes close..

      also, ive found a workaround for backtesting entries that are not on closes, if i find myself wanting to test RT strategies, i get the efs to print the entry price subtract the exit price, then i drag all the resulting trades over to a microsoft excel document where i can sum up and chart the results myself.. the tricky part is making sure your strategy doesnt use price values you couldnt have actually traded at
      Last edited by kalzenith; 06-19-2008, 07:13 PM.

      Comment

      Working...
      X