Strange issue using "CategoryGetSymbols" with some GICS subindustries

I am trying to get symbols list of some GICS subindustries and I am having an strange issue.

The code

GICSlist = CategoryGetSymbols(categoryGICS, 45202030);

does not return anything. When I try the code with other subindustry index instead of 45202030, for example 45202020, it works ok, but with some other GICS subindustries, including this one, does not work. If I use the index for the industry "452020", instead the subinudstry "45202030", it works right.

I am using Norgate Data, so all the GICS tree is filled right.

In order to isolate the problem I have made a new database with only one ticker, AAPL, and I have filled the quotes from Yahoo with AmiQuote. The problem persist.

As you can see in the screenshots below:

  • AAPL assigned to GICS 45202030: Code does not return the ticker.
    1
  • AAPL assigned to GICS 45202030 but changing code to use 452020: OK, returns the ticker.
    2
  • AAPL assigned to GICS 45202020: OK, returns the ticker.
    3

I apologize for any mistake, I am a new AmiBroker user and this is my first post.

Thank you in advance.

Nothing strange. IEEE standard specifies that precision of numbers is 7 digits. Yours is 8 digit. Anything beyond 7 significant digit is subject to IEEE rounding. Read this: http://www.amibroker.com/kb/2010/07/20/about-floating-point-arithmetic/

1 Like

Thank you very much, Tomasz.