[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AmiBroker Tips - Weekly Newsletter - Issue 07/2000


  • To: "AmiBroker Mailing List" <amibroker@xxxx>
  • Subject: AmiBroker Tips - Weekly Newsletter - Issue 07/2000
  • From: "Tomasz Janeczko" <tjaneczk@xxxx>
  • Date: 17 Dec 2000 16:06:43 -0000

PureBytes Links

Trading Reference Links

Issue 7/2000 AmiBroker Tips weekly newsletter.
Issue 7/2000.
Copyright (C)2000 Tomasz Janeczko. 
All back issues available from:
http://www.amibroker.com/newsletter/ 

IN THIS ISSUE
1 Welcome
2 AmiBroker 3.42 available
3 Tip of the week: Understanding sectors and industries
1 Welcome
Welcome to the 6th issue of AmiBroker Tips newsletter. This issue features an article that (hopefully) will help you understand how sectors and industries work in AmiBroker. 


By the way: Do you find this newsletter useful? Have any comments/suggestions or article ideas. Please don't hesitate to drop a line to newsletter@xxxxxxxxxxxxxx

2 AmiBroker 3.42 available
A new version (3.42) is available now for download from AmiBroker web site.Version 3.42 introduces very important bug fixes to previous versions. A bug was found in automation interface that affected Sharenet downloads when ticker name changes occurred. This version is the first one that handles changing ticker from the script correctly. Also a new setup now includes a new script for Sharenet downloader that displays now a list of erroneous lines found in the data. It is installed by default along with proper Custom Tools item setup so problems with previous version should finally disappear. 

3 Tip of the week: Understanding sectors and industries

AmiBroker has an ability to assign stocks to different categories allowing you (when properly set up) to narrow your analysis searches to the stocks meeting certain selection criteria (thanks to Filter feature available in Quick Review and Automatic Analysis windows). The initial set up of categories may be a little bit complicated especially when you want to track severalthousands stocks. This article will focus on setting up sectors and industries and assigning the stocks to them. First let me discuss some basic ideas.

3.1 Basics - predefined sectors and industries

AmiBroker comes with an example Dow Jones Industrials database holding all 30 components of this world's most famous market average. They are assignedto predefined sectors and industries. These sectors and industries are exactly the same as used on Yahoo finance site and here is a table which showsthem all:

Sector Industry 
Basic Materials (0) Chemical Manufacturing 
Chemicals - Plastics & Rubber 
Containers & Packaging 
Fabricated Plastic & Rubber 
Forestry & Wood Products 
Gold & Silver 
Iron & Steel 
Metal Mining 
Misc. Fabricated Products 
Non-Metallic Mining 
Paper & Paper Products 
Capital Goods (1) Aerospace & Defense 
Constr. - Supplies & Fixtures 
Constr. & Agric. Machinery 
Construction - Raw Materials 
Construction Services 
Misc. Capital Goods 
Mobile Homes & RVs 
Conglomerates (2) Conglomerates 
Consumer Cyclical (3) Apparel/Accessories 
Appliance & Tool 
Audio & Video Equipment 
Auto & Truck Manufacturers 
Auto & Truck Parts 
Footwear 
Furniture & Fixtures 
Jewelry & Silverware 
Photography 
Recreational Products 
Textiles - Non Apparel 
Tires 
Consumer/Non-Cyclical (4) Beverages (Alcoholic) 
Beverages (Non-Alcoholic) 
Crops 
Fish/Livestock 
Food Processing 
Office Supplies 
Personal & Household Prods. 
Tobacco 
Energy (5) Coal 
Oil & Gas - Integrated 
Oil & Gas Operations 
Oil Well Services & Equipment 
Financial (6) Consumer Financial Services 
Insurance (Accident & Health) 
Insurance (Life) 
Insurance (Miscellaneous) 
Insurance (Prop. & Casualty) 
Investment Services 
Misc. Financial Services 
Money Center Banks 
Regional Banks 
S&Ls/Savings Banks 
Healthcare (7) Biotechnology & Drugs 
Healthcare Facilities 
Major Drugs 
Medical Equipment & Supplies 
Services (8) Advertising 
Broadcasting & Cable TV 
Business Services 
Casinos & Gaming 
Communications Services 
Hotels & Motels 
Motion Pictures 
Personal Services 
Printing & Publishing 
Printing Services 
Real Estate Operations 
Recreational Activities 
Rental & Leasing 
Restaurants 
Retail (Apparel) 
Retail (Catalog & Mail Order) 
Retail (Department & Discount) 
Retail (Drugs) 
Retail (Grocery) 
Retail (Home Improvement) 
Retail (Specialty) 
Retail (Technology) 
Schools 
Security Systems & Services 
Waste Management Services 
Technology (9) Communications Equipment 
Computer Hardware 
Computer Networks 
Computer Peripherals 
Computer Services 
Computer Storage Devices 
Electronic Instruments & Controls 
Office Equipment 
Scientific & Technical Instr. 
Semiconductors 
Software & Programming 
Transportation (10) Air Courier 
Airline 
Misc. Transportation 
Railroads 
Trucking 
Water Transportation 
Utilities (11) Electric Utilities 
Natural Gas Utilities 
Water Utilities 

It is important to understand the difference between a sector and an industry: industries "belong" to sectors, for example: "Air Courier", "Airline", "Railroads", "Trucking" industries belong to "Transportation" sector. So ifa stock is assigned to given industry, it is "automatically" assigned alsoto the corresponding sector. 

In the example DJIA database each stock is assigned to specific industry, for example GM (General Motors) is assigned to "Auto & Truck Manufacturers" industry, and this implicates that GM belongs to "Consumer/Cyclical" sector. 

AmiBroker can handle up to 32 sectors and up to 256 industries.

3.2 How to assign stock to the industry?

You can change the industry to which given stock is assigned by using Stock->Information dialog (Industry combo box) 



or using Stock->Organize Assignments. 



The first method is fine if you want to change single stock settings. The latter is better if you want to move multiple stocks from one category to another.

3.3 How to define your own sectors and industries

Please go to Stock->Categories dialog, the last two tabs are "Sectors" and "Industries". First, switch to the "Sectors" tab and you will see the list of 32 sector names. You can now select the sector by clicking once on its name and edit the sector name by pressing ENTER or clicking "Edit name" button. Hit ENTER again to accept the name change. 



After you renamed the sectors you can switch to the "Industries" tab. Similarly to the previous tab you can select the industry in the list and edit its name in the same manner. Here you can also assign the industry to the sector using "Sector" combo. Just select the sector to which you want to assign currently selected industry.





3.4 Where sector and industry information is stored?

Generally speaking this information is stored in AmiBroker database. The sector and industry names and settings are stored in the broker.workspace file (in the workspace folder), stock data files hold only the information about the assignment of the stock to given industry (IndustryID).

When you create a new workspace (a database) AmiBroker sets up your industries and sectors according to the templates stored in the "broker.sectors" and "broker.industries" files. These are simple text files that could be edited with plain text editor (such as Notepad). These files could be also used for quick, automatic setup of the sectors and industries. AmiBroker comeswith predefined broker.sectors and broker.industries that follow describedabove convention (see the table). You can rewrite broker.sectors and broker.industries files to define your own default scheme. So, "broker.sectors" and "broker.industries" files are used as a template when creating new workspace. Once workspace is created these files are not taken into consideration. In this way you may have different categories in each workspace. If youwant AmiBroker to load them into already existing workspace please delete broker.workspace file before opening the workspace. If you then open the workspace AmiBroker will read broker.sectors and broker.industries. 

The layout of broker.sectors file is very simple: it is plain text file holding sector names written line by line as shown below:


Basic Materials
Capital Goods
Conglomerates
Consumer Cyclical
Consumer/Non-Cyclical
Energy
Financial
Healthcare
Services
Technology
Transportation
Utilities


The layout of broker.industries is similar, but in addition to industry names there is a number at the beginning of each line:

8 Advertising
1 Aerospace & Defense
10 Air Courier
10 Airline
3 Apparel/Accessories
3 Appliance & Tool
3 Audio & Video Equipment
3 Auto & Truck Manufacturers
3 Auto & Truck Parts
4 Beverages (Alcoholic)
4 Beverages (Non-Alcoholic)
7 Biotechnology & Drugs
8 Broadcasting & Cable TV
8 Business Services
8 Casinos & Gaming
0 Chemical Manufacturing
0 Chemicals - Plastics & Rubber
5 Coal
9 Communications Equipment


The numbers at front of industry names are "Sector IDs". Those numbers decide to which sector given industry belongs to. Because several industries may belong to one sector - you may need to put the same number for sector Id.Sector IDs are zero based, which means that 0 refers to the first line (sector name) of "broker.sectors" file, while 7 refers to the eighth line of this file. In the example above: "Advertising" industry belongs to "Services" sector, while "Aerospace & Defence" industry belongs to "Capital Goods" sector. 

If you don't want to setup detailed industry information and want assign stocks only to sectors you can define one-to-one relationship between first 32 industries so they will be equivalent to sectors. Using the broker.sectors as show earlier in this article 1-1 broker.industries file would look like:

0 Basic Materials
1 Capital Goods
2 Conglomerates
3 Consumer Cyclical
4 Consumer/Non-Cyclical
5 Energy
6 Financial
7 Healthcare
8 Services
9 Technology
10 Transportation
11 Utilities


Note that this file is essentially the same as broker.sectors with the onlydifference that we have consecutive numbers prepended to each line. Using this kind of setup setting the industry will be equivalent to setting the sector.

3.5 Making it automatic

As described above stock and industries names and relationship can be easily set up quickly using "broker.sectors" and "broker.industries" files. It will save some work needed otherwise to enter this information in Stock->Categories window.

Unfortunately a lot more work is needed to assign all stocks to the industries even using Stock->Organize Assignments dialog. Fortunately there is a way to save a lot of work using AmiBroker automation interface and scripting. The detailed description of how to accomplish this task and ready-to-use script is presented in the 4th issue of AmiBroker Tips newsletter.

.... and that's all for this week - hope you enjoyed reading 


--------------------------------------------------------------------------------

AmiBroker Tips weekly newsletter. Issue 7/2000. Copyright (C)2000 Tomasz Janeczko. All back issues available from: http://www.amibroker.com/newsletter/

 




------=_NextPart_001_035B_01C0684A.6A7B2DA0
Content-Type: text/html;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-2" http-equiv=Content-Type>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD>
<DIV align=center><B><IMG alt="" border=0 hspace=0 
src="cid:035501c06842$089533e0$a428a0d4@xxxx";><BR>Issue 7/2000</B></DIV></TD>
<TD width="15%"><FONT size=-2>AmiBroker Tips weekly newsletter.<BR>Issue 
7/2000.<BR>Copyright&nbsp;(C)2000&nbsp;Tomasz&nbsp;Janeczko. <BR>All back 
issues available from:<BR><A 
href="http://www.amibroker.com/newsletter/";>http://www.amibroker.com/newsletter/</A></FONT></TD></TR></TBODY></TABLE>
<H5>IN THIS ISSUE</H5>
<H5>1 Welcome<BR>2 AmiBroker 3.42 available<BR>3 Tip of the week: Understanding 
sectors and industries</H5>
<H5>1 Welcome</H5>
<P>Welcome to the 6th issue of AmiBroker Tips newsletter. This issue features an 
article that (hopefully) will help you understand how sectors and industries 
work in AmiBroker. <BR></P>
<P>By the way: Do you find this newsletter useful? Have any comments/suggestions 
or article ideas. Please don't hesitate to drop a line to <A 
href="mailto:newsletter@xxxx";>newsletter@xxxx</A></P>
<H5>2 AmiBroker 3.42 available</H5>
<P>A new version (3.42) is available now for download from AmiBroker web site. 
Version 3.42 introduces very important bug fixes to previous versions. A bug was 
found in automation interface that affected Sharenet downloads when ticker name 
changes occurred. This version is the first one that handles changing ticker 
from the script correctly. Also a new setup now includes a new script for 
Sharenet downloader that displays now a list of erroneous lines found in the 
data. It is installed by default along with proper Custom Tools item setup so 
problems with previous version should finally disappear. </P>
<P><B>3 Tip of the week: Understanding sectors and industries</B></P>
<P>AmiBroker has an ability to assign stocks to different categories allowing 
you (when properly set up) to narrow your analysis searches to the stocks 
meeting certain selection criteria (thanks to Filter feature available in Quick 
Review and Automatic Analysis windows). The initial set up of categories may be 
a little bit complicated especially when you want to track several thousands 
stocks. This article will focus on setting up sectors and industries and 
assigning the stocks to them. First let me discuss some basic ideas.</P>
<P>3.1 Basics - predefined sectors and industries</P>
<P>AmiBroker comes with an example Dow Jones Industrials database holding all 30 
components of this world's most famous market average. They are assigned to 
predefined sectors and industries. These sectors and industries are exactlythe 
same as used on Yahoo finance site and here is a table which shows them all:</P>
<TABLE bgColor=#ddddff border=2 borderColor=#ffffff cellPadding=2 cellSpacing=0 
style="BORDER-COLLAPSE: collapse; TABLE-LAYOUT: fixed; WIDTH: 435pt" x:str>
<TBODY>
<TR bgColor=#ccccff height=17 style="HEIGHT: 12.75pt">
<TH height=17 style="HEIGHT: 12.75pt; WIDTH: 157pt" width=209>Sector</TH>
<TH style="WIDTH: 278pt" width=370>Industry</TH></TR>
<COLGROUP>
<COL style="WIDTH: 157pt; mso-width-source: userset; mso-width-alt: 7643" 
width=209>
<COL style="WIDTH: 278pt; mso-width-source: userset; mso-width-alt: 13531" 
width=370>
<TBODY>
<TR height=17 style="HEIGHT: 12.75pt">
<TD height=187 rowSpan=11 style="HEIGHT: 12.75pt; WIDTH: 157pt">Basic 
Materials<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>(0)</TD>
<TD style="WIDTH: 278pt" width=370>Chemical Manufacturing</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Chemicals - Plastics &amp; Rubber</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Containers &amp; Packaging</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Fabricated Plastic &amp; Rubber</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Forestry &amp; Wood Products</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Gold &amp; Silver</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Iron &amp; Steel</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Metal Mining</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Misc. Fabricated Products</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Non-Metallic Mining</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Paper &amp; Paper Products</TD></TR>
<TR bgColor=#ccccff height=17 style="HEIGHT: 12.75pt">
<TD height=119 rowSpan=7 style="HEIGHT: 12.75pt">Capital Goods (1)</TD>
<TD>Aerospace &amp; Defense</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Constr. - Supplies &amp; Fixtures</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Constr. &amp; Agric. Machinery</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Construction - Raw Materials</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Construction Services</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Misc. Capital Goods</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Mobile Homes &amp; RVs</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD height=17 style="HEIGHT: 12.75pt">Conglomerates (2) </TD>
<TD>Conglomerates</TD></TR>
<TR bgColor=#ccccff height=17 style="HEIGHT: 12.75pt">
<TD height=204 rowSpan=12 style="HEIGHT: 12.75pt">Consumer Cyclical (3)</TD>
<TD>Apparel/Accessories</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Appliance &amp; Tool</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Audio &amp; Video Equipment</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Auto &amp; Truck Manufacturers</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Auto &amp; Truck Parts</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Footwear</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Furniture &amp; Fixtures</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Jewelry &amp; Silverware</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Photography</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Recreational Products</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Textiles - Non Apparel</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Tires</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD height=136 rowSpan=8 style="HEIGHT: 12.75pt">Consumer/Non-Cyclical 
(4)</TD>
<TD>Beverages (Alcoholic)</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Beverages (Non-Alcoholic)</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Crops</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Fish/Livestock</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Food Processing</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Office Supplies</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Personal &amp; Household Prods.</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Tobacco</TD></TR>
<TR bgColor=#ccccff height=17 style="HEIGHT: 12.75pt">
<TD height=68 rowSpan=4 style="HEIGHT: 12.75pt">Energy (5)</TD>
<TD>Coal</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Oil &amp; Gas - Integrated</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Oil &amp; Gas Operations</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Oil Well Services &amp; Equipment</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD height=170 rowSpan=10 style="HEIGHT: 12.75pt">Financial (6)</TD>
<TD>Consumer Financial Services</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Insurance (Accident &amp; Health)</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Insurance (Life)</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Insurance (Miscellaneous)</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Insurance (Prop. &amp; Casualty)</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Investment Services</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Misc. Financial Services</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Money Center Banks</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Regional Banks</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>S&amp;Ls/Savings Banks</TD></TR>
<TR bgColor=#ccccff height=17 style="HEIGHT: 12.75pt">
<TD height=68 rowSpan=4 style="HEIGHT: 12.75pt">Healthcare (7)</TD>
<TD>Biotechnology &amp; Drugs</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Healthcare Facilities</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Major Drugs</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Medical Equipment &amp; Supplies</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD height=425 rowSpan=25 style="HEIGHT: 12.75pt">Services (8)</TD>
<TD>Advertising</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Broadcasting &amp; Cable TV</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Business Services</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Casinos &amp; Gaming</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Communications Services</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Hotels &amp; Motels</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Motion Pictures</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Personal Services</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Printing &amp; Publishing</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Printing Services</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Real Estate Operations</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Recreational Activities</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Rental &amp; Leasing</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Restaurants</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Retail (Apparel)</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Retail (Catalog &amp; Mail Order)</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Retail (Department &amp; Discount)</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Retail (Drugs)</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Retail (Grocery)</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Retail (Home Improvement)</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Retail (Specialty)</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Retail (Technology)</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Schools</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Security Systems &amp; Services</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Waste Management Services</TD></TR>
<TR bgColor=#ccccff height=17 style="HEIGHT: 12.75pt">
<TD height=187 rowSpan=11 style="HEIGHT: 12.75pt">Technology (9)</TD>
<TD>Communications Equipment</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Computer Hardware</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Computer Networks</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Computer Peripherals</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Computer Services</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Computer Storage Devices</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Electronic Instruments &amp; Controls</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Office Equipment</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Scientific &amp; Technical Instr.</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Semiconductors</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Software &amp; Programming</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD height=102 rowSpan=6 style="HEIGHT: 12.75pt">Transportation (10)</TD>
<TD>Air Courier</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Airline</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Misc. Transportation</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Railroads</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Trucking</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD>Water Transportation</TD></TR>
<TR bgColor=#ccccff height=17 style="HEIGHT: 12.75pt">
<TD height=51 rowSpan=3 style="HEIGHT: 12.75pt">Utilities (11)</TD>
<TD>Electric Utilities</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Natural Gas Utilities</TD></TR>
<TR height=17 style="HEIGHT: 12.75pt">
<TD bgColor=#ccccff>Water Utilities</TD></TR></TBODY></TABLE>
<P>It is important to understand the difference between a sector and an 
industry: industries "belong" to sectors, for example: "Air Courier", "Airline", 
"Railroads", "Trucking" industries belong to "Transportation" sector. So ifa 
stock is assigned to given industry, it is "automatically" assigned also tothe 
corresponding sector. </P>
<P>In the example DJIA database each stock is assigned to specific industry, for 
example GM (General Motors) is assigned to "Auto &amp; Truck Manufacturers" 
industry, and this implicates that GM belongs to "Consumer/Cyclical" sector. 
</P>
<P>AmiBroker can handle up to 32 sectors and up to 256 industries.</P>
<P>3.2 How to assign stock to the industry?</P>
<P>You can change the industry to which given stock is assigned by using 
<B><I>Stock-&gt;Information</I></B> dialog (Industry combo box) </P>
<P><IMG alt="" border=0 hspace=0 
src="cid:035601c06842$089533e0$a428a0d4@xxxx";></P>
<P>or using <B><I>Stock-&gt;Organize Assignments</I></B>. </P>
<P><IMG alt="" border=0 hspace=0 
src="cid:035701c06842$089e5ba0$a428a0d4@xxxx";></P>
<P>The first method is fine if you want to change single stock settings. The 
latter is better if you want to move multiple stocks from one category to 
another.</P>
<P>3.3 How to define your own sectors and industries</P>
<P>Please go to <I><B>Stock-&gt;Categories</B></I> dialog, the last two tabs are 
"Sectors" and "Industries". First, switch to the "Sectors" tab and you willsee 
the list of 32 sector names. You can now select the sector by clicking onceon 
its name and edit the sector name by pressing ENTER or clicking "Edit name" 
button. Hit ENTER again to accept the name change. </P>
<P><IMG alt="" border=0 hspace=0 
src="cid:035801c06842$089e5ba0$a428a0d4@xxxx";></P>
<P>After you renamed the sectors you can switch to the "Industries" tab. 
Similarly to the previous tab you can select the industry in the list and edit 
its name in the same manner. Here you can also assign the industry to the sector 
using "Sector" combo. Just select the sector to which you want to assign 
currently selected industry.</P>
<P><IMG alt="" border=0 hspace=0 
src="cid:035901c06842$089e5ba0$a428a0d4@xxxx";></P>
<P>&nbsp;</P>
<P>3.4 Where sector and industry information is stored?</P>
<P>Generally speaking this information is stored in AmiBroker database. The 
sector and industry names and settings are stored in the broker.workspace file 
(in the workspace folder), stock data files hold only the information aboutthe 
assignment of the stock to given industry (IndustryID).</P>
<P>When you create a new workspace (a database) AmiBroker sets up your 
industries and sectors according to the templates stored in the "broker.sectors" 
and "broker.industries" files. These are simple text files that could be edited 
with plain text editor (such as Notepad). These files could be also used for 
quick, automatic setup of the sectors and industries. AmiBroker comes with 
predefined broker.sectors and broker.industries that follow described above 
convention (see the table). You can rewrite broker.sectors and broker.industries 
files to define your own default scheme. So, "broker.sectors" and 
"broker.industries" files are used as a template when creating new workspace. 
Once workspace is created these files are <B>not</B> taken into consideration. 
In this way you may have different categories in each workspace. If you want 
AmiBroker to load them into already existing workspace please delete 
broker.workspace file <B>before</B> opening the workspace. If you then openthe 
workspace AmiBroker will read broker.sectors and broker.industries. </P>
<P>The layout of broker.sectors file is very simple: it is plain text file 
holding sector names written line by line as shown below:<BR></P>
<P><CODE>Basic Materials<BR>Capital Goods<BR>Conglomerates<BR>Consumer 
Cyclical<BR>Consumer/Non-Cyclical<BR>Energy<BR>Financial<BR>Healthcare<BR>Services<BR>Technology<BR>Transportation<BR>Utilities</CODE></P>
<P></P>
<P>The layout of broker.industries is similar, but in addition to industry names 
there is a number at the beginning of each line:</P>
<P><CODE>8 Advertising<BR>1 Aerospace &amp; Defense<BR>10 Air Courier<BR>10 
Airline<BR>3 Apparel/Accessories<BR>3 Appliance &amp; Tool<BR>3 Audio &amp; 
Video Equipment<BR>3 Auto &amp; Truck Manufacturers<BR>3 Auto &amp; Truck 
Parts<BR>4 Beverages (Alcoholic)<BR>4 Beverages (Non-Alcoholic)<BR>7 
Biotechnology &amp; Drugs<BR>8 Broadcasting &amp; Cable TV<BR>8 Business 
Services<BR>8 Casinos &amp; Gaming<BR>0 Chemical Manufacturing<BR>0 Chemicals - 
Plastics &amp; Rubber<BR>5 Coal<BR>9 Communications Equipment</CODE></P>
<P></P>
<P>The numbers at front of industry names are "Sector IDs". Those numbers decide 
to which sector given industry belongs to. Because several industries may belong 
to one sector - you may need to put the same number for sector Id. Sector IDs 
are zero based, which means that 0 refers to the first line (sector name) of 
"broker.sectors" file, while 7 refers to the eighth line of this file. In the 
example above: "Advertising" industry belongs to "Services" sector, while 
"Aerospace &amp; Defence" industry belongs to "Capital Goods" sector. </P>
<P>If you don't want to setup detailed industry information and want assign 
stocks only to sectors you can define one-to-one relationship between first32 
industries so they will be equivalent to sectors. Using the broker.sectors as 
show earlier in this article 1-1 broker.industries file would look like:</P>
<P><CODE>0 Basic Materials<BR>1 Capital Goods<BR>2 Conglomerates<BR>3 Consumer 
Cyclical<BR>4 Consumer/Non-Cyclical<BR>5 Energy<BR>6 Financial<BR>7 
Healthcare<BR>8 Services<BR>9 Technology<BR>10 Transportation<BR>11 
Utilities</CODE></P>
<P></P>
<P>Note that this file is essentially the same as broker.sectors with the only 
difference that we have consecutive numbers prepended to each line. Using this 
kind of setup setting the industry will be equivalent to setting the sector.</P>
<P>3.5 Making it automatic</P>
<P>As described above stock and industries names and relationship can be easily 
set up quickly using "broker.sectors" and "broker.industries" files. It will 
save some work needed otherwise to enter this information in 
<B><I>Stock-&gt;Categories</I></B> window.</P>
<P>Unfortunately a lot more work is needed to assign all stocks to the 
industries even using <I><B>Stock-&gt;Organize Assignments</B></I> dialog. 
Fortunately there is a way to save a lot of work using AmiBroker automation 
interface and scripting. The detailed description of how to accomplish thistask 
and ready-to-use script is presented in the <A 
href="http://www.amibroker.com/newsletter/04-2000.html";>4th issue of AmiBroker 
Tips newsletter</A>.</P>
<P><I>.... and that's all for this week - hope you enjoyed reading</I> </P>
<HR>

<P><FONT size=-2>AmiBroker Tips weekly newsletter. Issue 7/2000. 
Copyright&nbsp;(C)2000&nbsp;Tomasz&nbsp;Janeczko. All back issues available 
from: <A 
href="http://www.amibroker.com/newsletter/";>http://www.amibroker.com/newsletter/</A></FONT></P>
<P> </P></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV><FONT size=1></FONT></BODY></HTML>

------=_NextPart_001_035B_01C0684A.6A7B2DA0--

Attachment: Description: ""

Attachment: Description: ""

Attachment: Description: ""

Attachment: Description: ""

Attachment: Description: ""