Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    11 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    10 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    12 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,982 views
    3 likes
    Last Post jhudas88  
    Started by rbeckmann05, Yesterday, 06:48 PM
    0 responses
    10 views
    0 likes
    Last Post rbeckmann05  
    Working...
    X