Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding an instrument without a lot of data messes up backtest

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

    Adding an instrument without a lot of data messes up backtest

    I am backtesting a multi-instrument strategy using stocks and I have observed a weird behavior. I backtest for a period of 1 year and when I add an instrument which only has data going back say 4 months, then the backtest starts 4 months ago instead of 1 year ago. This makes it impossible for me to backtest for 1 year with this instrument in my strategy.

    Is this a bug or is it intentional? I'd like to be able to backtest any period I want and if an instrument doesn't have data then that's fine it's just not used (like the OnBarUpdate isn't called). Is this possible?

    Making the problem even worse, is I'm running my test with many symbols that I got from a scan. So I don't know which one is causing this problem and I have to go through them one at a time to find out!

    #2
    Hi cunparis, you want to make sure you have enough data for all instruments in your MultiInstrument Strategy present, when this is not the case NinjaTrader will backtest over the period for which this is the case.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Hi cunparis, you want to make sure you have enough data for all instruments in your MultiInstrument Strategy present, when this is not the case NinjaTrader will backtest over the period for which this is the case.
      This is what I was afraid of. Any chance of having this changed in a future version?

      I have a few hundred stocks that i'm trying to test. I'll have to go through them one at a time to find out which ones don't have enough data and remove them. This will take some time, especially if I update the symbol list often.

      Comment


        #4
        Unfortunately not, as there are various reasons why you want this to be aligned. Such as when using a MultiInstrument strategy that relies on all datastreams for its decisions.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by alifarahani, Today, 09:40 AM
        6 responses
        36 views
        0 likes
        Last Post alifarahani  
        Started by Waxavi, Today, 02:10 AM
        1 response
        17 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by Kaledus, Today, 01:29 PM
        5 responses
        14 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by Waxavi, Today, 02:00 AM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by gentlebenthebear, Today, 01:30 AM
        3 responses
        17 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X