Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtest with Yahoo data doesn't work

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

    Backtest with Yahoo data doesn't work

    I have downloaded daily data of the S&P500 index from yahoo. When I try to do a backtest of NinjaTrader's built in moving average crossing strategy I don't get any entries when backtesting. But I can see in the charts that the averages cross so I should have entries.

    On another instrument things work as expected. What am I overlooking?

    #2
    Originally posted by FireFly View Post
    I have downloaded daily data of the S&P500 index from yahoo. When I try to do a backtest of NinjaTrader's built in moving average crossing strategy I don't get any entries when backtesting. But I can see in the charts that the averages cross so I should have entries.

    On another instrument things work as expected. What am I overlooking?
    Hello FireFly,

    Thank you for your post.

    You cannot place trades on Indices themselves, so there will be no trades in the backtest.

    Test other instruments to verify.
    Ray S.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_RJStein View Post
      Hello FireFly,

      Thank you for your post.

      You cannot place trades on Indices themselves, so there will be no trades in the backtest.

      Test other instruments to verify.
      Ah! I see...

      So what is the easiest way around that? Maybe export the indexdata and import it again, creating a 'fake' share that holds the same data on which I can then place trades?

      Or is there a simpler approach?

      Comment


        #4
        You can try that if you want. There is no workaround to backtesting indexes because it doesn't make sense to trade on them. If you wanted to test the S&P500 I suggest you just use something like SPY or some other tradeable ETF that tracks the S&P.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          You can try that if you want. There is no workaround to backtesting indexes because it doesn't make sense to trade on them. If you wanted to test the S&P500 I suggest you just use something like SPY or some other tradeable ETF that tracks the S&P.
          Backtesting strategies on indices can make sense if you want to test if certain patterns have predictive powers. But you are right that in terms of 'trades' an index doesn't make sense. SPY will be close enough. Thanks for the suggestion!

          Comment


            #6
            Originally posted by FireFly View Post
            So what is the easiest way around that? Maybe export the indexdata and import it again, creating a 'fake' share that holds the same data on which I can then place trades?
            I've done this, and it works fine. You create a new instrument, set it to be a stock, and tell NT that the Yahoo symbol for retrieving the data is ^GSPC (S&P 500, or whatever other index you prefer).

            The reason I wanted to do this was to compare trading futures, ETFs, and index funds to the "idealized" trading of the index.

            Comment


              #7
              Very helpful

              These posts were very helpful to me... thx... To my view too it makes sense to backtest indices for certain reasons as stated below

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by sidlercom80, 10-28-2023, 08:49 AM
              166 responses
              2,233 views
              0 likes
              Last Post sidlercom80  
              Started by thread, Yesterday, 11:58 PM
              0 responses
              1 view
              0 likes
              Last Post thread
              by thread
               
              Started by jclose, Yesterday, 09:37 PM
              0 responses
              6 views
              0 likes
              Last Post jclose
              by jclose
               
              Started by WeyldFalcon, 08-07-2020, 06:13 AM
              10 responses
              1,414 views
              0 likes
              Last Post Traderontheroad  
              Started by firefoxforum12, Yesterday, 08:53 PM
              0 responses
              11 views
              0 likes
              Last Post firefoxforum12  
              Working...
              X