Norgate Data - Issue with combining historical watchlists

Hi everyone,

Just after some help with an issue I have just come across.

I use Norgate data, and was testing a rotational system. I wish to test the system across 2 watchlists of stocks, being the S&P500 and the Nasadq100 at the same time. To do so I was referencing

InIndex = NorgateIndexConstituentTimeSeries("$SPX") OR NorgateIndexConstituentTimeSeries("$NDX");

I then run the system on the 2 respective historical watchlists, and select 'Match Any'. See image. image

My issue is that I get 2 different sets of results, based on the order in which I load the watchlists into the Filter. In other words, based on which list is loaded in the top field and which one in the second field.

Any ideas what could be happening here?

Maybe you have multiple symbols with the same position score, and the ordering then is determining which get selected? ( don’t remember now if it goes alphabetical in that case or based on watchlist position)

@OTG, did you take a look at the Detailed Log

Not sure if it will help you, but inspecting the trades in such a log will tell you precisely what signals are generated for every bar, what are position scores and when / why some are ignored (due to constraints such as insufficient funds).

Thanks derfahrer, yeah I did not consider how stocks with the same ranking score were being handled.

I’ll investigate, thanks

@OTG for backtesting at least have you considered combining watchlists as in this article,

http://www.amibroker.com/kb/2014/12/23/using-multiple-watchlists-as-a-filter-in-the-analysis/

And it is worth considering (and you could run a quick Exploration to find out) but isn’t almost every single stock in the Nasdaq 100 also in the SP500?

@OTG I may have "jumped the gun" with my last sentence because I was curious and at least in my database, as of today there are 20 stocks in the NDX 100 (out of a current 104) that are not in the SP500.
image

I tried this Exploration and in the Filter included the two current Indexes.

#include_once "Formulas\Norgate Data\Norgate Data Functions.afl"
inIndex1 = NorgateIndexConstituentTimeSeries( "$SPX" );
inIndex2 = NorgateIndexConstituentTimeSeries( "$NDX" );
Ndx_Not_SPX = NorgateIndexConstituentTimeSeries( "$NDX" ) AND !NorgateIndexConstituentTimeSeries( "$SPX" );

Filter = 1;
AddColumn( inIndex1, "in S&P 500", 1.0, colorDefault, colorLightYellow );
AddColumn( inIndex2, "in NDX 100", 1.0, colorDefault, colorLightBlue);
AddColumn( Ndx_Not_SPX, "NDX not SPX", 1.0, IIf(Ndx_Not_SPX, colorWhite,colorDefault),IIf(Ndx_Not_SPX, colorRed,colorDefault ));
AddSummaryRows(1);

Thanks everyone,

I have worked it out. I was using code to loop through a watchlist to assign static variables in order to limit exposure to sectors. When that’s removed, I get the same results.

I’ll add the stocks to a new single watchlist and that should fix the issue.

Thanks for the help.