Don:  Thanks again for the detailed explanation, but unfortunately, this approach will not help me nor anyone else who wants to put many/most of the ETF holdings into "slots" in Amibroker.
 
The key barrier is that there can be no duplicates among industries...a symbol may only be assigned to one industry or industry/sector listing.  Some ETFs, especially when they span the competing companies selling the ETFS, (SPYDRS, iShares, PowerShare, etc) have some of the same stocks in their ETF, thus making it inevitiable that if I named Industry "slots" for ETFs that I would come to some duplicates.  I am not sure what TJ programmed AB to do if you try to populate two different industries with the same symbol but I'll bet he has taken it into account, and I just am not going to try.  I also am discouraged because there are some 57 iShares and 12 SPYDRS so these will not all fit into the 64 limit of Watchlists.
 
I suppose I could have a Database for each family of ETFs but that defeats the purpose of comparing them with the same indicators.
 
Maybe there are not many folks who want to or have tried to do this, maybe there are.  It sure would be handy to have 250 Watchlists.  I know, it is "Planned".
 
Right now I am going to stick the SPYDRS into Watchlists and work with them alone.
 
Thanks again.
 
....on another approach, Fred has commented to me that one can write self erasing Watchlists, and I believe I mentioned that here.  I seems to be just beyond my programming skills, but it probably is the next place I will look to try and implement this task.
 
Ken
 
=============================================================== 
 Ken,
Yes you can reassign you own definitions to the Industry/Sectors. I have played with this for a modified Hemscott rating system.
 
Here is the procedure as simply as I can explain it.
 
    1) you must change the broker.industries and broker.sectors files at the root of AB directory before you create your new directory.  These 2 files establish your structure  on any NEW database. (has no effect on previously created ones). The broker.sectors file establishes your main categories (whatever you decide they are). This is simply a text file you can manipulate with any text editor. The file counts from 0 up, so your 1st category will be 0, second will be 1, third will be 2, etc to the limit of your categories.  There is a direct relationship Between broker.sectors and broker.industries. In broker.industries you have 2 fields, a number, and a description. The number is a reference back to broker.sectors. Thus every entry in broker.industries MUST relate to one of the entries in broker.sectors.  This file is also a text file.
 
    2) Once you have established these two files in the format of your liking you will create your new BLANK database. You then go into Symbol>Categories and choose the Industries tab. On the left you will see all the categories you created in broker.industries. You must now go through each of these categories, and (on right hand side of screen) link them to one of your broker.sectors categories. This sets up your basic structure for populating the new database.
 
    3) Populating the database is done with a script reading a ticker file. I used the script "PopulateIndustriesAndTickers_v3_0.js which is located in the Files section on the AmiBroker Users Group.  The ticker format is <ticker>,<market number>,<Full name>, <industry number>.
This last is the most important to you as it will put your stock into their assigned category.  THE MOST IMPORTANT THING TO REMEMBER is the industry number corresponds to you categories position in your broker.industries !  Thus if your first category was Widgets, the number you put in the <industry number> post ion will be 0. Now when the script reads your ticker all of your stocks numbered 0 will appear in the category Widgets.
 
That covers the how. I am not a writer, so I can only hope the above makes sense to you. Feel free to ask me questions about the procedure and I will clarify as best I can.
 
Hope this helps,
 
Don Lindberg
 
 
 
-------Original Message-------
 
From: Ken Close
Date: 9/7/2006 7:21:32 AM
Subject: [amibroker] Advice on Populating New Set of Industries
 
I do not know if this can be done, but I hope someone can offer some advice or point to some messages....
 
I want to track ATCs of most ETFs which number well over 100.  True, some are probably much less important now but as ETF use grows and as more varieties emerge, then the number of "popular" ones is sure to grow.
 
I have been thinking how to organize to do this, and the only obvious approach (short of an instantaneous update of the program to increase the number of Watchlists) is to popular the Industry set with the ETF members.
 
I see Industry slot from 0 to 100 or whatever, each named for the symbol of the ETF and containing the holdings of the ETF.  I have read (and reread) the "Organization of the database" and it appears that this will be possible, although I am not certain.
 
Also, it seems like some of the scripts which have been written to populate normally named industries and sectors will have to be modified (how I do not know yet).
 
What is your assessment of this approach?
 
Do you have other suggestions?
 
Can you point me to any scripts that I could use(modify) for my purpose?
 
Thanks for any assistance.
 
Ken
 
__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html






SPONSORED LINKS
Software support Small business finance Business finance online
Business finance training Business finance course

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to