Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strange Backtesting Behavior

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

    Strange Backtesting Behavior

    Hi-

    I'm pretty good with backtesting tick-based futures contracts. I have lots of data back from this past summer and I've made sure that all the data I have overlaps during the roll period so as to support nearly any roll date I choose.

    This particular issue I've come across concerns the Eurex (in this case the DAX, but I'm getting generally the same error on all Eurex-based products such as FGBM, FGBL, FGBS, FESX); I have tick data from mid-June2010 (the 9-10 contract). From that point on I have every day's tick data until today for that contract, as well as the 12-10 and the 3-11 contracts.

    I'm using NT's standard FDAX roll date of 12/15 for the 12-10 to 3-11 contract; as such I have 12-10 data to 12/17 and 3-11 data back to 11/1 (sufficient overlap).

    I note this because - as it relates to my error - I've figured out that I need to make sure that I have sufficient data during all dates (rolls included) if I'm going to backtest a continuous -type contract.

    Problem:

    For this instrument, and this instrument only, when I run backtests starting whenever (8/1/2010, 9/1/2010, 10/1/2010, etc), the backtest will run, then show only about 6 days of data. It doesn't matter which date I choose to run the backtest (I've attached two pictures; first was a backtest starting 7/1/2010, second was same parameters starting 12/1/2010). As you can see from the second photo, done on FESX, the backtest only shows two days of trade data.

    I checked the Log (on control panel), and there weren't any errors. I checked the trace file, and I get the standard requests for tick data as I would under any other circumstance (EXAMPLE BELOW):

    Code:
    2011-03-01 09:23:05:171 (DTN-IQ) Data.Bars.GetBarsNow: instrument='FESX 09-10' from='2010-08-28' to='2010-09-16 23:59:59' period=1 Tick splitAdjusted=False dividendAdjusted=False bars=0 session='Eurex Equity Index Futures'
    2011-03-01 09:23:05:906 (DTN-IQ) Data.Bars.GetBarsNow: instrument='FESX 09-10' from='2010-08-28' to='2010-09-16 23:59:59' period=1 Tick splitAdjusted=False dividendAdjusted=False bars=0 session='Eurex Equity Index Futures'
    2011-03-01 09:23:06:656 (DTN-IQ) Data.Bars.GetBarsNow: instrument='FESX 09-10' from='2010-08-28' to='2010-09-16 23:59:59' period=1 Tick splitAdjusted=False dividendAdjusted=False bars=0 session='Eurex Equity Index Futures'
    2011-03-01 09:23:07:500 (DTN-IQ) Data.Bars.GetBarsNow: instrument='FESX 09-10' from='2010-08-28' to='2010-09-16 23:59:59' period=1 Tick splitAdjusted=False dividendAdjusted=False bars=0 session='Eurex Equity Index Futures'
    Again, this is only happening for EUREX products, and I'm really perplexed right now. Ideas on this? I'm running NT 7.0.1000.2, using DTN IQ.
    Attached Files

    #2
    Hello,

    Thanks for your patience.

    Apologize in the delay in my response somehow your ticket was closed inadvertantly.

    Can you please add the following to your code.

    Print("The last OnBarUpdate Ran: " + Date[0]);

    Put this at the top of OnBarUpdate().

    I want to run this to see if the test is actually running the full period or if it is not running the full period.

    Let me know the output you get.

    Thank You.

    Comment


      #3
      Brett-

      Hold all that - relaying everything to you made me realize that I had (about a month ago) added some code that created a custom session closer for backtesting...the backtesting stops trading when one of these closing trades occurs.

      In other words, seems like my problem, not yours. You can close this one -

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Javierw.ok, Today, 04:12 PM
      0 responses
      2 views
      0 likes
      Last Post Javierw.ok  
      Started by timmbbo, Today, 08:59 AM
      2 responses
      10 views
      0 likes
      Last Post bltdavid  
      Started by alifarahani, Today, 09:40 AM
      6 responses
      40 views
      0 likes
      Last Post alifarahani  
      Started by Waxavi, Today, 02:10 AM
      1 response
      18 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by Kaledus, Today, 01:29 PM
      5 responses
      15 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X