Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi instrument backtesting on non-existing data

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

    Multi instrument backtesting on non-existing data

    I am playing around with a strategy that trades off of weekly bars. The strategy is adding multiple instruments

    I'm back testing from 2005. One of the instruments only has data back to 2008. When I run strategy analyzer, it only gives me results from 2008 on. Is there a way to force the back test from 2005, but ignoring the instrument that doesn't have data from 2005-2007?

    Thanks

    #2
    Hello lookOutBelow,

    NinjaTrader will process your strategy (OnBarUpdate) as long as you have Historical Data for the other instrument, but it sounds like you are using that DataSeries in your logic or the Series that you are submitting your orders to.

    Do you have a CurrentBars check at the beginning of your strategy?
    JCNinjaTrader Customer Service

    Comment


      #3
      Hi JC,

      No, I do not have a CurrentBars check. I tried it to see what would happen, but it didn't change the results.

      Comment


        #4
        Hello lookOutBelow,

        Are you using the DataSeries that you do not have any data for until 2008 in your logic or are you submitting your orders to that Series?
        JCNinjaTrader Customer Service

        Comment


          #5
          I did have logic to it, but before posting this message, I removed any attempts to access the data or attempts to trade on that symbol. The only thing left in the code was the adding of the instrument.

          Add("EDV",PeriodType.Week,1);

          As soon as I comment this line out, it works as I would expect it to (back to 2005).

          Comment


            #6
            Hello lookOutBelow,

            In your Strategy Parameters can you change the "Bars Required" to "0" to have your strategy try to process this right away.
            JCNinjaTrader Customer Service

            Comment


              #7
              It will fail if I change it to 0. The data for the other instruments (that have data to 2005) are looking back as far as 15 weeks. I guess I can eliminate that, to test it out.

              Comment


                #8
                Hello lookOutBelow,

                If you require 15 bars of data to process this strategy how you would like you may want to add your own CurrentBars check but check for the series that you do not have data for until 2008 separately and still use Bars Required 0.

                Let me know if this works like you are wanting it to.
                JCNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Christopher_R, Today, 12:29 AM
                0 responses
                9 views
                0 likes
                Last Post Christopher_R  
                Started by sidlercom80, 10-28-2023, 08:49 AM
                166 responses
                2,235 views
                0 likes
                Last Post sidlercom80  
                Started by thread, Yesterday, 11:58 PM
                0 responses
                3 views
                0 likes
                Last Post thread
                by thread
                 
                Started by jclose, Yesterday, 09:37 PM
                0 responses
                8 views
                0 likes
                Last Post jclose
                by jclose
                 
                Started by WeyldFalcon, 08-07-2020, 06:13 AM
                10 responses
                1,415 views
                0 likes
                Last Post Traderontheroad  
                Working...
                X