Accessing industry and sector for an equity
Author: hannan
Creation Date: 1/16/2008 7:57 AM
profile picture

hannan

#1
Wealth-Lab (.NET)

Hi,
When creating a new dataset from fidelity source, users are given an options to classify stocks by industry and sector.
Can these classification be accessed programatically?
Are industry statistics data avilable and supported?
Yahoo has such data and let you compare individual stock performance with the industry average and with competitors.

Hannan
profile picture

Cone

#2
<< Can these classification be accessed programatically? >>

Of course, but the dedicated WealthScript functions for that aren't ready yet. Until Release 2, motivated programmers can access the data from the Gics.xml file in the ..\Data folder.

<< Are industry statistics data avilable and supported? Yahoo has.. >>

No. But again, motivated programmers can easily obtain any data available on the internet.

profile picture

hannan

#3
For some reason I am unable to find this fild (Gics.xml )
profile picture

Cone

#4
See the "Data" chapter in the User Guide, bottom of first page: "Where Data is Stored".
profile picture

hannan

#5
Ok tnx found it.
One more question, how does WL handle stock splits?
Clearly the price change dramatically and all indicators
are no longer valid, do they?
profile picture

Eugene

#6
MSN and Fidelity data are split-adjusted.

Yahoo data has local storage of split and dividend history, so it can be optionally applied to price data.

In addition, by right-clicking on the chart and choosing "Process a Stock Split" you can manually split the current symbol's data.
profile picture

hannan

#7
Is it possible to use DataSets inside wealth lab 5 scripts?

profile picture

Eugene

#8
Yes. See QuickRef examples for DataSetSymbols and SetContext and included symbol rotation strategies (Dogs of the Dow, RSI Rotation). Note that this sort of strategy should not be executed in MSB mode.
profile picture

hannan

#9
What is MSB mode?
profile picture

Eugene

#10
Multi-Symbol Backtest.

See the User Guide: Symbol mode backtest / Multi-Symbol Backtest.
profile picture

hannan

#11
What I need is to read the gics.xml to a .net dataset
(as Cone suggested above).
I would like to compute average fundamentals for sector,
industry and subindustry and compare individual stock fundamentals to the avergae of it's industry.
profile picture

Eugene

#12
Just a very primitive snippet that parses the GICS file and prints out the sub-industry vs. its code (don't forget to leave a copy of System.XML.dll in WL5 folder):

CODE:
Please log in to see this code.
profile picture

ss161

#13
is GICS data for a symbol now accessible directly or does the GICS.xml file still need to be parsed? thanks.
profile picture

Cone

#14
It still has to be parsed. GICS functions coming in a release later this year.

Here's another way -
CODE:
Please log in to see this code.
profile picture

ss161

#15
hopefully an easy follow-up. does system.xml.dll already exist on my computer, and if so where would it likely be? i use both XP and Vista to develop. Thanks.
profile picture

ss161

#16
just saw your code. thanks for the help!!!

Steve
profile picture

ss161

#17
Hi Cone. I created two classes based on your code, SymbolGICSInfo: contains all of the GICS sector, group, ... GICS information for a symbol, and GICS a static class that contains static methods that return individual GICS elements.

I needed to make two minor changes to your code: searching for (" " symbol + " ") and pre-pending " " to the beginning of the SymbolString. The symbol C was returning the GICS information of the first "??C " symbol and as a result of that change, the first symbol in the string was never being matched (hence pre-pending a leading " " to the beginning of the symbol.

I guess ideally the entire line would be parsed into different symbols and then an exact match performed, but this will work fine for now.

Also, for some reason when i load GICS information in the DataSource manager, some major symbols in the DOW are not included: WMT, MO for example.

Here is the code i wrote based on your sample, thanks again for the help:

CODE:
Please log in to see this code.
profile picture

Cone

#18
Nice work.

QUOTE:
WMT, MO for example.
I just refreshed and got data for both.

Symbol: MO
Sector: Consumer Staples
Sector Code: 30
Group: Food Beverage & Tobacco
Group Code: 3020
SubGroup: Tobacco
SubGroup Code: 302030
Industry: Tobacco
Industry Code: 30203010


Symbol: WMT
Sector: Consumer Staples
Sector Code: 30
Group: Food & Staples Retailing
Group Code: 3010
SubGroup: Food & Staples Retailing
SubGroup Code: 301010
Industry: Hypermarkets & Super Centers
Industry Code: 30101040
profile picture

MikeCaron

#19
I am running WLP version 5.3 and I am not able to find Gics.xml anywhere under c:\users\username\AppData\Roaming\Fidelity Wealth-Lab Pro. I do have GICSDescMapping.txt, GICSSymbolMapping.txt, and GICSTreeMapping.txt directly under that directory. Any suggestions on how to proceed? Thanks!
profile picture

Cone

#20
It must be because you have never performed "Update Industry Data".
See User Guide: Data > Data Manager > Create New DataSet > Data Providers > Fidelity, Step 2b.
profile picture

MikeCaron

#21
Thanks for the pointer. That did the trick, though Vista's Explorer still can't seem to find the file even after checking show hidden files. Oh well.

How often does the Gics information get updated on my PC? Do I need to create a new data set to update it or does it update on a regular basis through some other mechanism? I am just wondering as new companies come on the scene when they would appear in the listing.
profile picture

Cone

#22
It shows up in Explorer on my Vista system, and it must be there for you too (or somewhere else if you relocated the Data folder).

You have to repeat the process to update the GICS data yourself.

profile picture

Gamba

#23
Is it possible to get sector of an equity for the WL-Developer version?
I tried with Aronow Watchlist provider, but without success so far.

I thougt I could get the real datasetname of a symbol, but GetDataSet() doesn't seem to work.
Maybe there is an more simpler approach.
profile picture

Eugene

#24
No idea what the WatchList provider has to do with the GICS data, but Wealth-Lab Developer does not include both the GICS.xml file and the assembly with the class that brings GICS support.
profile picture

Gamba

#25
I guessed that it is not included. So I tried another way, with Watchlist-Provider.
Is there another way to get sector and industry for an equity in WL-Developer.
profile picture

Cone

#26
The only way is to obtain the GICS source data from Standard & Poors in some readable format, then it's no problem.

(Fidelity customers have access to it in WL Pro through a brokerage agreement.)
profile picture

Gamba

#27
OK, thank you Cone. Too bad that no fundamental provider has these information.
profile picture

gbullr

#28
Is there an "easy way to get this information if I am a FIDO customer?

profile picture

Eugene

#29
Yes, GICS is supported in Fidelity WLP. I believe it's documented in the manuals.