Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting strategy on DJIA

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

    Backtesting strategy on DJIA

    Hello

    I've got a problem regarding the charts in the Strategy Analyzer. My broker is IB. When I want to backtest a strategy on the YM contract, everything works fine without any problems. But when I then switch to the DJIA index to backtest it (without changing any parameters), it shows me, that therer were 0 trades, although there should have been several ones. In the log panel there is also no error message so it should all work fine. And it's not only with the DJIA, it's with every other index I tried (DAX, S&P, etc.). Do you know how I can fix this?

    Regards,

    Sepp

    #2
    I think ninjatrader strategies only work with contracts and not cash indices.

    Comment


      #3
      MasterSepp, this is expected behavior. The following is a copy + paste from on of my replies in the past:

      The expected behavior is for zero trades to occur because in NT, the indicies don't actually have any information available for trades, like how much $/point, for example.

      If you think about it, how exactly would you buy or sell the Dow Jones index? There isn't actually a way to directly trade this index. You'd have to pick an instrument that tracks the DJIA, like the YM futures contract, the DIA ETF, or options even. It just isn't possible to directly buy or sell an index (at least not usually).

      The same logic holds for other indicies:
      S&P 500 - future (ES), stock/ETF (SPY), or options
      Russell 2000 - future (TF), stock/ETF (IWM), and of course, options

      In most cases, the best choice for backtesting an index is to just backtest the strategy against the corresponding ETF (DIA, QQQQ, IWM, SPY, etc) because these ETFs track the index better than futures (there are issues with fair value and such).
      AustinNinjaTrader Customer Service

      Comment


        #4
        The problem with the ETF's is, that it seems that IB doesn't provide the data for it (searched in the general symbol lookup for DIA and QQQQ and found nothing). Are there any other possibilities to get the index data for a whole year? I tried to merge the data from YM 03/06/09-09 into 12-09 and it should've worked, but it doesn't generate continous data, although every data got merged correctly except for the tick data. Is that that important? Or did I do something wrong?

        Regards,

        Sepp

        Comment


          #5
          MasterSepp,

          I am not sure what you mean by the data not working when merged correctly. After merging it just provides the historical data from an earlier contract as data for the current front month during those dates.

          What you can do if your data provider does not offer you things like SPY or QQQQ is grab your DJIA index and export the data. Then rename the exported text file to a stock symbol ticker you make and then reimport it into NinjaTrader as a custom symbol. Create that symbol as a stock and then you can backtest against that data.
          Josh P.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Skifree, Today, 03:41 AM
          1 response
          2 views
          0 likes
          Last Post Skifree
          by Skifree
           
          Started by usazencort, Today, 01:16 AM
          0 responses
          1 view
          0 likes
          Last Post usazencort  
          Started by kaywai, 09-01-2023, 08:44 PM
          5 responses
          603 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by xiinteractive, 04-09-2024, 08:08 AM
          6 responses
          23 views
          0 likes
          Last Post xiinteractive  
          Started by Pattontje, Yesterday, 02:10 PM
          2 responses
          23 views
          0 likes
          Last Post Pattontje  
          Working...
          X