Check your data, was: GICS Import fails

GICS import fails with error:
"Error in line 20MICRONS.NS,10304001
'20MICRONS.NS' - this ticker symbol does not exist in the database
"
The stock(s) exists in the database. Below is the command i am using.

$FORMAT Ticker,GICS
$OVERWRITE 1$
$SEPARATOR ,
$CONT 1
$GROUP 255
$AUTOADD 0
$NOQUOTES 1

You have

$AUTOADD 0

which means it will NOT add symbols to the database. Change it to 1 to add missing symbols. And if it says that Given symbol does not exist, it means that it really does NOT exist and you are mistaken. Computer doesn't make mistakes. Check the spelling of symbols.

Also you have spurious $ mark that is incorrect here:

$OVERWRITE 1$

Thanks for the reply @Tomasz, the symbols do exist as can be seen in the snapshot below. If i removed 20MICRONS.NS from the csv, i was getting the same error on the next line in this case 21STCENMGM.NS.
oOx8RMmxFo

  1. $AUTOADD 0 because, i do not want to add any new symbols.
  2. $OVERWRITE 1$ because it was mentioned in the snippet in amibroker ascii guide.

Following your suggestion, when i changed the $AUTOADD to 1 and removed the extra $ in the command, i did not receive any error on importing but the GICS codes weren't imported either. Do not know what is happening.

However, I noticed some differences in the GICS codes for NSE and Global. Could this be the reason for the failure?

I wrote you what you should do. But you don't listen. As I wrote - USE

$AUTOADD 1

It will NOT add symbols if they are already existing, but you will quickly find out what the problem is.
The screenshot proves nothing as you might have symbols with leading/trailing spaces. Spaces are invisible, yet make symbols different.

I followed your suggestion, i used $AUTOADD 1 before posting my previous response..
I ran the import again now, below is the complete command i used.

$FORMAT Ticker, GICS
$OVERWRITE 1
$SEPARATOR ,
$SKIPLINES 1
$CONT 1
$GROUP 255
$AUTOADD 1
$NOQUOTES 1

Result:

  1. No error message after import
  2. GICS is empty after import

What you mean with "GICS" is empty? Where are you looking? We don't see your computer screen and don't know where you are looking. Please follow this advice: How to ask a good question

I looked under both GICS folder and also under Information panel.

My imported csv has information about this stock. DRREDDY.NS,60101001.

But does your GICS.tx define 60101001, because you have to have first those categories LISTED IN GICS.txt !

AmiBroker comes shipped with GICS.txt but you are using NON-EXISTING GICS codes.
Only codes that DO EXIST in GICS.txt can be imported.

1 Like

Thank you, because it is a text file, can i modify it?

Yes you can modify it. It is text file for the purpose, so users can and should modify it for their own use.

I have put together the GICS codes of NSE in the format of default gics.txt. I am seeing below issues.

  1. My GICS categories start under "0" folder rather than GICS folder
    TgsPbdgJKS

2.Telecom and Commodities have same starting code 10(snapshot above), though my txt file has commodities as 01.

01; Commodities
0101; Chemicals
  1. Some 3rd level GICS categories are under GICS folder.
    wqDDguEY3y

If you would like to take a look at the complete GICS.txt, here is the pastebin link.

Don't create the file from scratch. Use existing GICS.txt as guideance and only ADD missing pieces, don't type the whole thing from zero.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.