Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Instrument automatic rollover during backtest in the strategy analyzer

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

    Instrument automatic rollover during backtest in the strategy analyzer

    Hi, my question is about whether the strategy analyzer will do automatic rollover of the instrument under test during a backtesting or not for tests longer than the expiration date of any given instrument contract.

    For instance, if I need to backtest a strategy on the NQ from January 1st to December 31st, 2023, can I do it in one single run or do I have to do it in 4 runs, using the corresponding contract NQ 3-23, NQ 6-23, NQ 9-23 or NQ 12-23 in each of them?

    In case it can be done in 1 run, which of the 4 contracts shall I select?

    Thanks so much in advance
    Juan

    #2
    Hello Juan,

    Thanks for your post.

    Yes, you could backtest the strategy over previous contract expiries at the same time.

    The Strategy Analyzer takes into account the Merge Policy setting you have your platform set to.

    With MergeBackAdjusted (default setting) the chart will be continuous, stitched together by expiry month from the rollover date of the expiry month to the rollover date of the previous expiry month, and adjusted by an offset to prevent gaps between contract months (which trade at different prices) for a smooth chart.

    With MergeNonBackAdjusted the chart with be continuous (stitched together by expiry month from the rollover date of the expiry month to the rollover date of the previous expiry month) but will not be adjusted and there will be gaps in price from one contract to the next.

    With DoNotMerge only the data from the selected contact is shown and previous contract months will not be loaded. Chart is not continuous.
    http://ninjatrader.com/support/forum...57&postcount=2

    See the help guide page here for more information about Merge Policy: https://ninjatrader.com/support/help...rge_policy.htm

    When MergeBack or MergeNonBack Adjust is selected, the contract month selected should be the contract month of the last day of data in the test. (or today's contract month)

    When DoNoMerge is selected, the contract month should be the contract month of the data being tested.​

    See this forum thread for more information: https://forum.ninjatrader.com/forum/...986#post782986
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    58 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    133 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    73 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X