Breadth Create Problem

Hi Team,

I want to create industry breadth that count how many % of stock on that Sub-sector making relative 20 day high to SPY.
Please help to review below script and picture, thank you.

Script:

ensure industry is MedicalSpecialties:
MATCHFUNFIELD(FEED=FD, FIELD=IndustryName, FIELDVALUE=MedicalSpecialties)

RIC 20 day to spx::
RIC R1=RIC(DATESEL=Last Year, INDEX=SPX:WI)
C1=CLOSE(R1);
H1 = HIGHESTHIGH(C1, BARS=20, BACKTYPE=Bars, EQUAL=True);
R1 > H1

Optuma_Industry

Thanks Donald. I think it would be best to separate the criteria as otherwise it will take too long. Create a scan for each industry and then save the results as a manual symbol list:

Capture

Another option would be to scan on our Russell 3000 list (covering 96% of the US equity market) which will be quicker than the exchange groups.

Once the list has been created you can then run the breadth calculations on the manual symbol lists. You can update the list every week or month as required.

Hi Darren,

I run a s&p500 with RIC20D Breadth.
But It seems wrong.
Could you please run this example for once to see right or wrong?
Thank you.

Below is result that i run:
Optuma S&P500 RIC 20D
Optuma S&P500 RIC 20D_1
Regards.

HI Darren,

Still have problem about to scan industry.
I use the script to scan, but got no result.
Please help to solve, thank you very much.
Script:
MATCHFUNFIELD(FEED=FD, FIELD=IndustryName, FIELDVALUE=Semiconductors)
Optuma Industry

Hi,

I’ve tried that same Semiconductor script on both a Watchlist and a scan and they are returning the expected results. Can you confirm, if you open a Watchlist of the S&P500 and apply that script as a column, does it work there?

Hi Matthew,

I try that on my desktop, but didn’t work.
But when i try on my notebook, it works.
I don’t know what happen about that.
Result on desktop as below:
Optuma_Industry Name

Hi,

Can you send an export copy of that page to [email protected] please so we can view it here, I can’t see anything wrong on the image that would explain why it isn’t working.

HI team,

I run below test_breadth via my notebook and desktop.

Desktop:
Optuma Industry Breadth_Desktop

Notebook:
Optuma Industry Breadth_Notebook

Seems the breadth calculation is wrong.
Please help to check, many thanks.

Regards.
By Donald

Hi Donald,

The Breadth Engine calculates the percentage of the universe that meet that criteria ie the entire S&P500 - not just the semiconductors.

I think the only way to do it is to separate the industry scan from the breadth calculation. Run the scan and save the symbols in a new Manual List, and then run the breadth on that list.

There are only 18 semiconductor companies in the S&P500 of which 15 (83.33%) are above their 200MA. This matches the breadth calculation in the image below. One thing to note is that there are lots of industry definitions - many with only a handful of members - so creating breadth calculations for them all would be very time consuming. Have you considered doing it for the sectors instead, eg Electronic Technology?

Capture

Dear Darren,

Thank you for your advice.
I want to try to build the industry breadth first.
If that cost too much time, maybe i will back to the sector.
But i want to confirm one thing after i scan the industry and build the manual list.
If i use russell 3000 to scan and build the link list.
Is that list will auto update when russell 3000 reconstitution ?
And if i use the list to create breadth, the survivorship Bias-Free Data affect the breadth index?
As i remember, russell 3000 reconstitution once per year.
Is that mean i can’t create the data range of the breadth index more than one years?

Regards.
By Donald.

Hi Donald,

We only have historical membership of the S&P500 so for the Russell 3000 the historical breadth that you calculate is based on the current list.

The R3000 list gets updated automatically so you would need to run the scans (maybe every quarter for delistings and additions) to rebuild your industry lists, and your breadth would then be calculated on the updated list.

Dear Darren,

Thank you for your help.
Hope Russell 3000 have historical membership very soon.

Appreciate your work.

Regards.
Donald