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

RE: [amibroker] Re: Extracting MG Industry Group Closing Price



PureBytes Links

Trading Reference Links

I don’t know what to say.   I guess Graham was right.   I’m not sure why mine are mapped because I’ve deleted my Telechart database.   It’s been months since I set this up and since I no longer use Telechart data, I have thought about it much. 

 

To make the setup easier, below is a list of the sectors and industries.  The industries appear in the order in which they appear in the industries list.  Using this, it should be easier to set up the Industry to Symbol mapping.

 

I hope this is useful for you.

 

Regards,

 

Dan.

 

Aerospace/Defense

Aerospace/Defense-Major Dive

MG611

Aerospace/Defense

Aerospace/Defense-Products & S

MG612

Automotive

Auto Manufacturers-Major

MG331

Automotive

Auto Parts

MG334

Automotive

Recreational Vehicles

MG333

Automotive

Trucks & Other Vehicles

MG332

Banking

Foreign Regional Banks

MG418

Banking

Money Center Banks

MG411

Banking

Regional-Mid Atlantic Banks

MG413

Banking

Regional-Midwest Banks

MG415

Banking

Regional-Northeast Banks

MG412

Banking

Regional-Pacific Banks

MG417

Banking

Regional-Southeast Banks

MG414

Banking

Regional-Southwest Banks

MG416

Banking

Savings & Loans

MG419

Chemicals

Agricultural Chemicals

MG113

Chemicals

Chemicals - Major Diversified

MG111

Chemicals

Specialty Chemicals

MG114

Chemicals

Synthetics

MG112

Computer Hardware

Computer Based Systems

MG813

Computer Hardware

Computer Peripherals

MG816

Computer Hardware

Data Storage Devices

MG814

Computer Hardware

Diversified Computer Systems

MG811

Computer Hardware

Networking & Comm Dev

MG815

Computer Hardware

Personal Computers

MG812

Computer Software & Services

Application Software

MG822

Computer Software & Services

Business Software & Services

MG827

Computer Software & Services

Healthcare Information Service

MG826

Computer Software & Services

Information & Delivery Service

MG828

Computer Software & Services

Information Technology Service

MG825

Computer Software & Services

Multimedia & Graphics Software

MG821

Computer Software & Services

Security Software & Services

MG824

Computer Software & Services

Technical & System Software

MG823

Conglomerates

Conglomerates

MG211

Consumer Durables

Appliances

MG311

Consumer Durables

Business Equipment

MG314

Consumer Durables

Electronic Equipment

MG315

Consumer Durables

Home Furnishings & Fixtures

MG312

Consumer Durables

Housewares & Accessories

MG313

Consumer Durables

Photographic Equip & Supplies

MG319

Consumer Durables

Recreational Goods - Other

MG318

Consumer Durables

Sporting Goods

MG317

Consumer Durables

Toys & Games

MG316

Consumer NonDurables

Cleaning Products

MG327

Consumer NonDurables

Office Supplies

MG328

Consumer NonDurables

Packaging & Containers

MG326

Consumer NonDurables

Paper & Paper Products

MG325

Consumer NonDurables

Personal Products

MG324

Consumer NonDurables

Rubber & Plastics

MG323

Consumer NonDurables

Textile-Apparel Clothing

MG321

Consumer NonDurables

Textile-Apparel Footwear & Acc

MG322

Diversified Services

Business/Management Services

MG761

Diversified Services

Consumer Services

MG764

Diversified Services

Education & Training Services

MG767

Diversified Services

Personal Service

MG763

Diversified Services

Rental & Leasing Services

MG762

Diversified Services

Research Services

MG769

Diversified Services

Security & Protection Services

MG766

Diversified Services

Staffing & Outsourcing Service

MG765

Diversified Services

Technical Services

MG768

Drugs

Biotechnology

MG516

Drugs

Diagnostic Substances

MG517

Drugs

Drug Delivery

MG514

Drugs

Drug Manufacturers - Major

MG511

Drugs

Drug Manufacturers-Other

MG512

Drugs

Drug Related Products

MG515

Drugs

Drugs-Generic

MG513

Electronics

Diversified Electronics

MG837

Electronics

Printed Circuit Boards

MG836

Electronics

Scientific & Technical Instr

MG838

Electronics

Semiconductor-Broadline

MG831

Electronics

Semiconductor-Equipment & Mate

MG835

Electronics

Semiconductor-Integrated Cir

MG834

Electronics

Semiconductor-Memory Chips

MG832

Electronics

Semiconductor-Specialized

MG833

Energy

Independent Oil & Gas

MG122

Energy

Major Integrated Oil & Gas

MG121

Energy

Oil & Gas Drilling & Explorat

MG124

Energy

Oil & Gas Equip & Services

MG125

Energy

Oil & Gas Pipelines

MG126

Energy

Oil & Gas Refining & Marketing

MG123

Financial Services

Asset Management

MG423

Financial Services

Closed-End Fund-Debt

MG426

Financial Services

Closed-End Fund-Equity

MG427

Financial Services

Closed-End Fund-Foreign

MG428

Financial Services

Credit Services

MG425

Financial Services

Diversified Investments

MG424

Financial Services

Investment Brokerage-National

MG421

Financial Services

Investment Brokerage-Regional

MG422

Food & Beverage

Beverages-Brewers

MG347

Food & Beverage

Beverages-Soft Drinks

MG349

Food & Beverage

Beverages-Wineries & Distill

MG348

Food & Beverage

Confectioners

MG346

Food & Beverage

Dairy Products

MG345

Food & Beverage

Farm Products

MG342

Food & Beverage

Food-Major Diversified

MG341

Food & Beverage

Meat Products

MG344

Food & Beverage

Processed & Packaged Goods

MG343

Health Services

Health Care Plans

MG523

Health Services

Home Health Care

MG527

Health Services

Hospitals

MG525

Health Services

Long-Term Care Facilities

MG524

Health Services

Medical Appliances & Equipment

MG522

Health Services

Medical Instruments & Supplies

MG521

Health Services

Medical Laboratories & Researc

MG526

Health Services

Medical Practitionersi

MG528

Health Services

Specialized Health Services

MG529

Insurance

Accident & Health Insurance

MG432

Insurance

Insurance Brokers

MG435

Insurance

Life Insurance

MG431

Insurance

Property & Casualty Insurance

MG433

Insurance

Surety & Title Insurance

MG434

Internet

Internet Information Providers

MG852

Internet

Internet Service Providers

MG851

Internet

Internet Software & Services

MG853

Leisure

Gaming Activities

MG715

Leisure

General Entertainment

MG717

Leisure

Lodging

MG711

Leisure

Resorts & Casinos

MG712

Leisure

Restaurants

MG713

Leisure

Specialty Eateries

MG714

Leisure

Sporting Activities

MG716

Manufacturing

Diversified Machinery

MG623

Manufacturing

Farm & Construction Machinery

MG621

Manufacturing

Industrial Electrical Equipmen

MG628

Manufacturing

Industrial Equipment & Compone

MG622

Manufacturing

Machine Tools & Accessories

MG625

Manufacturing

Metal Fabrication

MG627

Manufacturing

Pollution & Treatment Controls

MG624

Manufacturing

Small Tools & Accessories

MG626

Manufacturing

Textile Manufacturing

MG629

Materials & Construction

Cement

MG634

Materials & Construction

General Building Materials

MG635

Materials & Construction

General Contractors

MG637

Materials & Construction

Heavy Construction

MG636

Materials & Construction

Lumber / Wood Production

MG633

Materials & Construction

Manufactured Housing

MG632

Materials & Construction

Residential Construction

MG631

Materials & Construction

Waste Management

MG638

Media

Advertising Agencies

MG721

Media

Broadcasting-Radio

MG725

Media

Broadcasting-Tv

MG724

Media

Catv Systems

MG726

Media

Entertainment-Diversified

MG723

Media

Marketing Services

MG722

Media

Movie Production - Theaters

MG727

Media

Publishing-Books

MG729

Media

Publishing-Periodicals

MG728

Metals & Mining

Aluminum

MG133

Metals & Mining

Copper

MG132

Metals & Mining

Gold

MG135

Metals & Mining

Industrial Metals & Minerals

MG134

Metals & Mining

Nonmetallic Mineral Mining

MG137

Metals & Mining

Silver

MG136

Metals & Mining

Steel & Iron

MG131

Real Estate

Mortgage Investment

MG448

Real Estate

Property Management/Develop

MG449

Real Estate

Reit-Diversified/Industrial

MG441

Real Estate

Reit-Healthcare Facilities

MG443

Real Estate

Reit-Hotel/Motel

MG444

Real Estate

Reit-Office

MG442

Real Estate

Reit-Residential

MG446

Real Estate

Reit-Retail

MG447

Retail

Auto Parts Stores

MG738

Retail

Catalog & Mail Order Houses

MG739

Retail

Department Stores

MG731

Retail

Discount - Variety Stores

MG732

Retail

Drug Stores

MG733

Retail

Electronic Stores

MG735

Retail

Grocery Stores

MG734

Retail

Home Furnishing Stores

MG737

Retail

Home Improvement Stores

MG736

Specialty Retail

Apparel Stores

MG747

Specialty Retail

Auto Dealerships

MG745

Specialty Retail

Jewelry Stores

MG743

Specialty Retail

Music & Video Stores

MG744

Specialty Retail

Specialty Retail - Other

MG746

Specialty Retail

Sporting Goods Stores

MG741

Specialty Retail

Toy & Hobby Stores

MG742

Telecommunications

Communication Equipment

MG842

Telecommunications

Diversified Communication Serv

MG847

Telecommunications

Long Distance Carriers

MG844

Telecommunications

Processing Systems & Products

MG843

Telecommunications

Telecom Services-Domestic

MG845

Telecommunications

Telecom Services-Foreign

MG846

Telecommunications

Wireless Communications

MG841

Tobacco

Cigarettes

MG351

Tobacco

Tobacco Products - Other

MG352

Transportation

Air Delivery & Freight Service

MG774

Transportation

Air Services - Other

MG773

Transportation

Major Airlines

MG771

Transportation

Railroads

MG777

Transportation

Regional Airlines

MG772

Transportation

Shipping

MG776

Transportation

Trucking

MG775

Utilities

Diversified Utilities

MG914

Utilities

Electric Utilities

MG912

Utilities

Foreign Utilities

MG911

Utilities

Gas Utilities

MG913

Utilities

Water Utilities

MG915

Wholesale

Auto Parts Wholesale

MG751

Wholesale

Building Materials Wholesale

MG752

Wholesale

Computers Wholesale

MG756

Wholesale

Drugs Wholesale

MG757

Wholesale

Electronics Wholesale

MG754

Wholesale

Food Wholesale

MG758

Wholesale

Industrial Equipment Wholesale

MG753

Wholesale

Medical Equipment Wholesale

MG755

Wholesale

Wholesale - Other

MG759

 

 

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of quirinus
Sent: Sunday, October 09, 2005 11:47 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Extracting MG Industry Group Closing Price

 

Hi Dan,

I followed your directions exactly.  The Symbol-Categories-
Industries  Base Indexes for Relative Strength field remains
unpopulated.

The drop down does give me a whole bunch to chose from including the
MG symbols.  However, that is the same as manually entering the data
for each of the 239 Industries.

I upgraded to AB 4.70 before doing this.

I have used TeleChart data for a couple of years so I just updated
the Database settings for my existing database.

When that didn't work, I tried the same thing by creating a new
database - that didn't work either :-((


--- In amibroker@xxxxxxxxxxxxxxx, "Dan Clark" <dan_public@xxxx> wrote:
>
> Hmmm.  That's strange.   Did you create a Telechart database in
AB?  If so,
> try this. 
>

>
> 1.      Open the database (File --> Open Database.)
> 2.      Select AB's Telechart database.
> 3.      Select File --> Database Settings.    The Database settings
window
> will open.
> 4.      Ensure that the "Database folder:" is pointed to the correct
AB
> database.
> 5.      For Data Source, ensure that the TC2000/TCNet Plugin is
selected.
> 6.      For Local data storage, ensure that the "Enable" radio button
is
> selected.
> 7.      Click the "Configure" button.  The TC2000 plugin configuration
> window pops up.
> 8.      Ensure that the "Stocks & indexes" and "Sector/Industry
assignments"
> checkboxes are checked.
> 9.      Click Retrieve.   Below the "Retrieve" button, you should see
the
> data being retrieved and then the message "Done" when complete.
> 10.      Click "Close" and then "OK" to get out of the menus.
> 11.      Select "Symbol --> Categories --> Industries"
> 12.      Select an Industry.  Select "Auto Parts".  You should see
the "Base
> Indexes for: " "Relative Strength" dropdown set to "MG334". 
>

>
> Are your base index symbols set for the industries?   Yes?  No? 
>

>
> Regards,
>

>
> Dan.
>

>

>

>

>
>   _____ 
>
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
On Behalf
> Of quirinus
> Sent: Sunday, October 09, 2005 8:54 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Extracting MG Industry Group Closing Price
>

>
> Thank you all for your replies.
>
> Creating a database from TeleChart does pull up and map the
> Industries to stocks.  I need to correct myself in that I'm using
> TeleChart 2005 - their latest version.
>
> As far as I can figure it out (and as Graham pointed out),
> GetBaseIndex pulls up the symbol that has been manually input into
> the "Base indexes for Relative Strength" field in Symbol-Categories-
> Industries.  If there is nothing there then GetBaseIndex doesn't
seem
> to work.
>
> So I added a few MG symbols and it seems to work fine - Thanks Dan.
>
> However, I was wondering if there is a way to program in AFL to be
> able to pull these symbols without manually entering all 239 of
> them.  This would make any database updates or re-installs so much
> simpler and reduce errors due to entering the data by hand.  An AFL
> solution would also take care of any re-classifications by MG
(Media
> General).
>
> I should point out that the MG Industry symbol is part of the
> Industry list automatically created when setting up the database.
>
> For example, working my way down from the Sector category -
>
> Sectors - Tobacco - Cigarettes
>
> This list contains the following symbols
>
> BTI
> CG
> GLH
> ITY
> MG351
> MO
> RAI
> STSI
> VGR
>
> Let's say we are looking at BTI.
>
> Would it be possible to have AFL look at the Industry list that BTI
> is in and then go down that list to pull the MG industry symbol
> (MG351)?
>
> Really appreciate your help.
>
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Dan Clark" <dan_public@xxxx>
wrote:
> >
> > Graham,
> >
> > 
> >
> > I don't use TC2000 anymore, but I recall that the industries and
> sectors,
> > and their mapping to a stock can be retrieved when creating the
> database.
> > I.e., retrieving them sets the symbol to industry/sector mapping
> > automatically.  You don't have to set the symbols. 
> >
> > 
> >
> > I just tested this by creating a new TC2000 DB in AB and then
> pointed it at
> > the TC2005 plugin (my old TC installation is still there).  Then
I
> retrieved
> > the symbols, and the Sector/Industry mappings.  It worked fine,
and
> the code
> > below retrieved the Industry symbol correct. 
> >
> > 
> >
> > Are you referring to something different?
> >
> > 
> >
> > Regards,
> >
> > 
> >
> > Dan.
> >
> > 
> >
> >   _____ 
> >
> > From: amibroker@xxxxxxxxxxxxxxx
[mailto:amibroker@xxxxxxxxxxxxxxx]
> On Behalf
> > Of Graham
> > Sent: Saturday, October 08, 2005 10:10 PM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: Re: [amibroker] Extracting MG Industry Group Closing
Price
> >
> > 
> >
> > assuming you have set the index symbols for the industries in
> > Symbol-Category
> >
> >
> >
> > On 10/9/05, Dan Clark <dan_public@xxxx> wrote:
> > >
> > >
> > > HI,
> > >
> > >
> > >
> > > Try:
> > >
> > >
> > >
> > > IndustrySymbol = GetBaseIndex() ;
> > >
> > >
> > >
> > > Then you can use Foreign, SetForeign, PlotForeign, etc.
> > >
> > >
> > >
> > > From here it's pretty easy to get the Sector Symbol also.  In
> TC2005, the
> > > Sector Symbol can be generated by replacing the last digit of
an
> Industry
> > > Symbol with a zero ("0").  So, the Sector Symbol for MG747 is
> MG740.
> > >
> > >
> > >
> > > Regards,
> > >
> > >
> > >
> > > Dan.
> > >
> > >
> > > ________________________________
> > >
> > >
> > > From: amibroker@xxxxxxxxxxxxxxx
> [mailto:amibroker@xxxxxxxxxxxxxxx] On
> > Behalf
> > > Of quirinus
> > > Sent: Saturday, October 08, 2005 9:19 PM
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Subject: [amibroker] Extracting MG Industry Group Closing Price
> > >
> > >
> > >
> > > Hi,
> > >
> > > I use TC2000 for end of day data.  Basically what I would like
to
> do
> > > is to be able to pull up the closing price of a stock's Industry
> > > Group Average.
> > >
> > > For example - American Eagle Outfitter (AEOS) is part of the
> > > Specialty Retail - Apparel Stores Industry Group (MG747).
> > >
> > > I'm trying to implement a simple Industry Group Relative
Strength
> > > graph while looking at a stock - so that as I go through stocks
> the
> > > graph will automatically pick up the appropriate MG Industry
Group
> > > and plot the stock's Relative Strength.
> > >
> > > So, if I'm looking at AEOS, my formula will pick up MG747 close
> and
> > > graph the Relative Strength of AEOS vs MG747.
> > >
> > > When I move on to another stock, the formula should pick up the
> > > appropriate MG Group close automatically.
> > >
> > > I just need to pick up the closing price of the MG Industry
Group
> > > based on the stock I'm looking at.
> > >
> > > I've tried using
> > >
> > > MG_Close = Foreign(IndustryID(1),"Close");
> > >
> > > but that doesn't seem to work.
> > >
> > > Would someone be please kind enough to help me figure this out.
> > >
> > > Thanks
> > >
> > >
> > >
> > >
> > >
> > >
> > > 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
> > >
> > >
> > >
> > >
> > > ________________________________
> > > YAHOO! GROUPS LINKS
> > >
> > >  Visit your group "amibroker" on the web.
> > >
> > >  To unsubscribe from this group, send an email to:
> > >  amibroker-unsubscribe@xxxxxxxxxxxxxxx
> > >
> > >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.
> > >  To unsubscribe from this group, send an email to:
> > >  amibroker-unsubscribe@xxxxxxxxxxxxxxx
> > >
> > >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.
> > >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.
> > > ________________________________
> > >
> > >
> > >
> >
> >
> > --
> > Cheers
> > Graham
> > AB-Write >< Professional AFL Writing Service
> > Yes, I write AFL code to your requirements
> > http://e-wire.net.au/~eb_kavan/ab_write.htm
> >
> >
> > 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
> >
> >
> > Investment
> > <http://groups.yahoo.com/gads?
> t=ms&k=Investment+management+software&w1=Inves
> >
>
tment+management+software&w2=Real+estate+investment+software&w3=Invest
> ment+p
> >
>
roperty+software&w4=Software+support&w5=Real+estate+investment+analysi
> s+soft
> > ware&w6=Investment+software&c=6&s=200&.sig=_XXUzbE9l5lGlZNcMu4KNQ>
> > management software
> >
> > Real
> > <http://groups.yahoo.com/gads?
> t=ms&k=Real+estate+investment+software&w1=Inve
> >
>
stment+management+software&w2=Real+estate+investment+software&w3=Inves
> tment+
> >
>
property+software&w4=Software+support&w5=Real+estate+investment+analys
> is+sof
> >
>
tware&w6=Investment+software&c=6&s=200&.sig=5_sgDczz3ArKGMtJ9tFSJA> 
> estate
> > investment software
> >
> > Investment
> > <http://groups.yahoo.com/gads?
> t=ms&k=Investment+property+software&w1=Investm
> >
>
ent+management+software&w2=Real+estate+investment+software&w3=Investme
> nt+pro
> >
>
perty+software&w4=Software+support&w5=Real+estate+investment+analysis+
> softwa
> > re&w6=Investment+software&c=6&s=200&.sig=_N6zcwefgp4eg5n6oX5WZw> 
> property
> > software
> >
> >
> > Software
> > <http://groups.yahoo.com/gads?
> t=ms&k=Software+support&w1=Investment+manageme
> >
>
nt+software&w2=Real+estate+investment+software&w3=Investment+property+
> softwa
> >
>
re&w4=Software+support&w5=Real+estate+investment+analysis+software&w6=
> Invest
> > ment+software&c=6&s=200&.sig=MJ2jP31F3n64RDZkDadU8w>  support
> >
> > Real
> > <http://groups.yahoo.com/gads?
> t=ms&k=Real+estate+investment+analysis+softwar
> >
>
e&w1=Investment+management+software&w2=Real+estate+investment+software
> &w3=In
> >
>
vestment+property+software&w4=Software+support&w5=Real+estate+investme
> nt+ana
> >
>
lysis+software&w6=Investment+software&c=6&s=200&.sig=GmF8PlAJASx0wrSaX
> 5-Zlw>
> > estate investment analysis software
> >
> > Investment
> > <http://groups.yahoo.com/gads?
> t=ms&k=Investment+software&w1=Investment+manag
> >
>
ement+software&w2=Real+estate+investment+software&w3=Investment+proper
> ty+sof
> >
>
tware&w4=Software+support&w5=Real+estate+investment+analysis+software&
> w6=Inv
> > estment+software&c=6&s=200&.sig=aMgGsKT4w29dMAYUzQUKzg>  software
> >
> > 
> >
> >   _____ 
> >
> > YAHOO! GROUPS LINKS
> >
> > 
> >
> > *      Visit your group "amibroker
> > <http://groups.yahoo.com/group/amibroker> " on the web.
> >  
> > *      To unsubscribe from this group, send an email to:
> >  amibroker-unsubscribe@xxxxxxxxxxxxxxx
> > <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?
subject=Unsubscribe>
> >  
> > *      Your use of Yahoo! Groups is subject to the Yahoo!
> > <http://docs.yahoo.com/info/terms/>  Terms of Service.
> >
> > 
> >
> >   _____
> >
>
>
>
>
>
>
> 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
>
>
>
>
>
>
>   _____ 
>
> YAHOO! GROUPS LINKS
>

>
> *      Visit your group "amibroker
> <http://groups.yahoo.com/group/amibroker> " on the web.
>  
> *      To unsubscribe from this group, send an email to:
>  amibroker-unsubscribe@xxxxxxxxxxxxxxx
> <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
>  
> *      Your use of Yahoo! Groups is subject to the Yahoo!
> <http://docs.yahoo.com/info/terms/>  Terms of Service.
>

>
>   _____
>







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
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS