Creating GICS DataSet in code
Author: traderray
Creation Date: 4/17/2010 6:24 AM
profile picture

traderray

#1
I have a strategy that is putting each symbol into a DataSet based on the GICS structure. The DataSet name is simply the GICS description for the symbol. For example, Symbol "A" is in Sector "Information Technology" so I create a DataSet with the name "Sector Information Technology" to contain the symbol "A" and all other symbols in that sector.

Some of the DataSets from this strategy are not being successfully created. Debug output indicates that they are being created. I have noticed that the DataSets not being created all contain an "&" in the name. Some DataSets with an "&" in their name are being created OK. But the ones that are being created OK do not show up in the DataSet list when I restart WLP. I believe all DataSets without an "&" are working OK. The "&" may or may not be the source of the problem but there certainly appears to be a pattern with it.

Here is the strategy with lots of Debug statements.

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

Eugene

#2
It would make sense to include the name and the contents of a failing DataSet here.

P.S. To anyone interested, this is a spin-off of this thread: How to create/convert GICS database for symbols WL5

profile picture

traderray

#3
I deleted everything and completely restarted the process of building the GICS DataSets. All of the files were correctly created and I did not recreate the problem of some files not being created.

There are 10 Sectors, none of the sector description have an "&" and all 10 show up in the WLP DataSets list.

There are 24 industry groups, 11 industry groups have an "&" in the description and none of these show up in the DataSets list. The 13 descriptions without an "&" all show up.

There are 68 industries, 26 industries have an "&" in the description and none of these show up in the DataSets list. The 42 without an "&" all show up.

One of the DataSets not showing up in the WLP DataSets list is "IndGrp Automobiles & Components"

The contents of the file are:

<?xml version="1.0"?>
<DataSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Name>IndGrp Automobiles & Components</Name>
<Scale>Daily</Scale>
<BarInterval>0</BarInterval>
<DSString>ALV,ARGN,ARM,AXL,BWA,CAAS,CTB,CXDC,DAI,DAN,DW,F,FDML,FSYS,GNTX,GT,HMC,HOG,JCI,MGA,MOD,NSANY,SMP,SORL,SRI,SUP,TEN,THO,TM,TRW,WATG,WBC,WGO,WPRT,XIDE,</DSString>
<ProviderName>FidelityStaticProvider</ProviderName>
</DataSet>


profile picture

Eugene

#4
It will work when you replace all the & (ampersand) signs with this string when writing to disk: &amp;

In other words, you should modify the holder.gics string to holder.gics.Replace( "&", "&amp;" );
profile picture

traderray

#5
Eugene,

That solved the problem. Thanks.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).