On another instrument things work as expected. What am I overlooking?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Backtest with Yahoo data doesn't work
Collapse
X
-
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?Tags: None
-
Hello FireFly,Originally posted by FireFly View PostI 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?
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
-
Ah! I see...Originally posted by NinjaTrader_RJStein View PostHello 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.
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
-
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!Originally posted by NinjaTrader_Josh View PostYou 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.
Comment
-
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).Originally posted by FireFly View PostSo 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?
The reason I wanted to do this was to compare trading futures, ETFs, and index funds to the "idealized" trading of the index.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
116 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
61 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
40 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
44 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
82 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

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