To identify sector trend, we could group stocks which are in same industry/sector and create a index for the sector. However, to simplify the process, we could actually use the bursa sector index series which are readily available. The EOD data of the indexes should be available too if you subscribe to any EOD data service. The sector index series are
- Construction
- Consumer Product
- Finance
- Industrial Product
- Mining
- Plantation
- Property
- Technology
- Trading/Services
- Industrial
Then, in Amibroker we create a new watch list and add the indexes above to the watch list. In Analysis windows we set the filter to the watch list as in image below
After that we can just write a few line of code to identify the trend of each sector below by using Amibroker Analysis "Explore" feature
The code is as below:
Filter = 1;
AddTextColumn(FullName(), "Sector Name");
AddColumn(C > MA(C, 200), "Long");
AddColumn(C > MA(C, 100), "Medium");
AddColumn(C > MA(C, 10), "Short");
Note that in the code above, we use MA 200, 100, and 10 to gauge long, medium and short term trends respectively. Whenever the index is above the MA line, we classify the index as uptrend and vise versa. The following is the sample of "Explore" result.
From the "Explore" result, we could see that Technology, Mining and Industrial Product sectors are in long, medium and short term up trend. This could help us to make better trading decision.
Of cause we would argue that the scan might not help much because Bursa sector index series do not provide us fine grain industry index for example Wood based/furniture producers stock index, steel products producers stock index and etc. To solve this problem, as I mentioned earlier, we could categorize the stock based on our own defined sectors and derived sector indexes from that. Amibroker has some nice features to help us to create our own index but it is out of topic for this post.
Sector trend scan will be run and result will be post to KLSE stock scanners section automatically every week. Please visit KLSE stock scanners section regularly to view the scan results of other scanners too and I am sure you will find them very useful.