Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Same strategy, different results?

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

    Same strategy, different results?

    I have a strategy that includes a time window for trades (i.e. time of day must be between X and Y).

    If I run a backtest with the trading hours as "default 24x7" it produces wildly different results than with "CME US Index Futures." But they are both only taking trades within the same time window. And an almost identical daily number of trades, taken around the same times, but not exactly.

    Why would changing the "trading hours" setting alter when the trades are taken by only a matter of minutes or seconds?

    #2
    It makes a difference because whatever the rules are for WHEN to take a trade within that window are affected by the presence of pre-market data (or absence of it).

    For instance, if it is an SMA crossover, whether there is a crossover 5 minutes after the open on a 20-period MA depends on whether you're talking about the 20 bars extending into the pre-market or the 20 bars extending into yesterday.

    Remember the "trading hours" setting isn't just when it is allowed to take a a trade - is it is the hours used to build the bars to run all the rules on.
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Originally posted by tradgrad View Post
      I have a strategy that includes a time window for trades (i.e. time of day must be between X and Y).

      If I run a backtest with the trading hours as "default 24x7" it produces wildly different results than with "CME US Index Futures." But they are both only taking trades within the same time window. And an almost identical daily number of trades, taken around the same times, but not exactly.

      Why would changing the "trading hours" setting alter when the trades are taken by only a matter of minutes or seconds?
      Bruce makes a good point here; changing the trading hours could affect other values that are used to determine whether to trade or not. This may be verified by adding prints to your strategy that include all values used in your conditions. This way, you can see which values change and understand why this changes your strategy's behavior when the trading hours are adjusted. For more details on using prints to debug your scripts:


      Please feel free to reach out with any additional questions or concerns.
      Emily C.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by futureszone, Today, 01:06 AM
      0 responses
      6 views
      0 likes
      Last Post futureszone  
      Started by mels77, Yesterday, 11:58 PM
      0 responses
      12 views
      0 likes
      Last Post mels77
      by mels77
       
      Started by ageeholdings, Yesterday, 10:13 PM
      0 responses
      7 views
      0 likes
      Last Post ageeholdings  
      Started by johnMoss, Yesterday, 08:56 PM
      0 responses
      7 views
      0 likes
      Last Post johnMoss  
      Started by alonso7kk, Yesterday, 06:57 PM
      0 responses
      20 views
      0 likes
      Last Post alonso7kk  
      Working...
      X