Index | Recent Threads | Who's Online | Search |
|
New Thread |
|
marco
![]() |
Hello, you didn't specify the period. I'll use 4 week return and I will use the screener. Here's the public screen There are two ways: Using the cap-weighted Industry time series FOrder("mktcap",#industry,#desc)=1 // returns largest stock in each industry (90 of them) The first rule screens for the largest stock by MktCap from each industry which returns 90 stocks. This tells me that there are 90 Industries in total. You can now disable this rule. The next rule uses the Industry time series to calculate the 4 week return (latest value vs value 20 bars ago). It also uses FOrder to select the top 45 industries. The 4th parameter is very important since it bases the order on distinct values. See the reference for FOrder for more details Using the pre-built Ind factors There are 4 pre-bult Ind factors for performance (4w, 13w, 26w and 52w) that can be used, so it's more limiting. In addition Ind factors are computed using Aggregate function which averages the statistic for the constituents after trimming 16.5% of the outliers. So it's not the same as the cap-weighted time series above. For the 4 week use this Ind factor: Forder("Pr4W%ChgInd" , #all, #desc, TRUE) <= 45 Let me know what you think. NOTE1: you will not get exactly 1/2 the stocks of the universe because industries contain different number of stocks. NOTE2: the two methods use different metric and will return different stocks also because of NOTE1 Portfolio123 Staff. |
||
|
marco
![]() |
I have added a Knowledge Base article on this topic here https://portfolio123.customerly.help/research...een-within-top-industries Thank you for your question PS there's a third way to do this as well described in the KB article that has ultimate flexibility Portfolio123 Staff. |
||
Edit 2 times,
last edit by
marco
at Mar 30, 2022 7:00:45 PM
|
sraby
![]() |
Thank you very much Marco! I can't wait to try this. |
||
|
|