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

RE: [amibroker] Challenge - Best Ways of Accessing and Using External Data



PureBytes Links

Trading Reference Links

Steve,

 

Regarding the TC industry/sector data, I’ve got that set up now.  And, I’ve got the industries set up and am using “GetBaseIndex()” now.   Works great.

 

The issue is linking the Industry Symbols to the Sector Symbols.  I like your solution!  

 

But it also made me realize something…  Now I know why TC has 31 sectors (a lot).    Although there are multiple industry/sector mappings, only TC has so many Sectors.   When I checked your solution to ensure, I realized that many of the sectors have EXACTLY nine industries.  That is the maximum number possible given their symbol numbering method!    I.e., their sector categories are driven by their symbol numbering methods!

 

As a database architect (my profession) that concept makes me very uncomfortable because it’s driven by physical constraints, not what’s best for the Industry/Sector categorization.   L  But, it does work fairly well and it makes for easier coding in AB.

 

Many thanks for the great solution.

 

Best regards,

 

Dan.

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Steve Dugas
Sent: Saturday, July 09, 2005 10:17 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Challenge - Best Ways of Accessing and Using External Data

 

Hi Dan,

 

All industry/sector data is already in AB, automatically imported by the TC2K plugin. To link a stock with its industry/sector requires a one-time setup, but works very well after you set it up.

 

Go to Symbol > Categories > Industries and under Relative Strength, fill in the MGxxx name for each industry in the list. I believe that the sector is already populated by the TC2K plugin.

 

This will link them. After that, you can retrieve the industry/sector for each ticker like this:

 

Industry = GetBaseIndex();

Sector = StrLeft( GetBaseIndex(), 4 ) + "0";

 

Steve

----- Original Message -----

From: Dan Clark

Sent: Saturday, July 09, 2005 10:54 AM

Subject: [amibroker] Challenge - Best Ways of Accessing and Using External Data

 

Hi,

 

I’m trying to load, access and use NON-price external data in AB scans and indicators.  Example: I’m trying to map Telechart Industry Symbols to Sector Symbols, and use these in AB.   What are the best ways of handling this?

 

In general, I’m interested in two types of external data:

 

1)       Non-price, single value (current) data – Current values for symbol-related data.    Examples: Current p/e ratio, current shares outstanding, next earnings date, and Sector to industry symbol mapping.

 

2)       Non-price, historical data – Similar to number two, except historical.  Example: P/e ratio by day week or month, historical shares outstanding.

 

Here’s a problem I’m trying to solve…

 

I use Telechart data.   They provide Stock to Industry to Sector mapping. And, they provide Industry and Sector symbol data that can be plotted.  And, Stock symbol to Industry symbol mapping is simple in AB.   But…

 

There appears to be no simple way of mapping an Industry symbol to a Sector symbol in AB.  

 

I was thinking of using a simple CSV file (using “fgets”) containing one line for each TC Industry Symbol with its associated Sector symbol.    For example, the Telechart Specialty Retail symbol is “MG740”.   Its Industry symbols are “MG741” to “MG747”.   So the Specialty Retail section of the mapping file would contain:

 

MG741,MG740

MG742,MG740

MG743,MG740

MG744,MG740

MG745,MG740

MG746,MG740

MG747,MG740

 

I think a file approach would work.  But…

 

Are there better, faster ways of handling this?  Maybe an external database?   Setting up some sort of array in AB?  

 

Please help.

 

Thanks and regards,

 

Dan.

 



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

Investment property software

Investment software

Investment tracking software

Return on investment software

Stock investment software



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






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