In my previous post I shared the excel sheet for Sector / Industry classification for NSE listed companies.
To import the same excel to Amibroker it first needs to be converted to csv and then the data can be imported using the following code.
$FORMAT Ticker,Fullname,IndustryName,SectorName
$SKIPLINES 1
$SEPARATOR ,
$AUTOADD 1
$NOQUOTES 1
$OVERWRITE 1
$CLEANSECTORS 1
$SORTSECTORS 1
Explanation of each line to be processed.
$FORMAT
First line tells AmiBroker the sequence of the columns contained in the csv sheet you would be importing.
Here the csv sheet to be imported has a sequence of columns having column header as "Ticker,Fullname,IndustryName,SectorName"
$SKIPLINES 0
It instructs Amibroker to SKIP 0 lines from the csv sheet to be imported.
If the csv sheet contains its first row as header then it can be skipped while importing by making $SKIPLINES 1
$SEPARATOR ,
Import format needs to be a comma-separated values (CSV) file. If you have an excel format convert it to csv format before importing.
CSV is a delimited text file that uses a comma to separate values hence the "," is mentioned as a separator.
$AUTOADD 1
While processing the data if AUTOADD is switched to 1 it then it wouldn't be interrupted and would add a new stock when non-existing ticker is detected.
$NOQUOTES 1
NOQUOTES 1 will switch off quotation data checking - this allows importing non-quotation data.
$OVERWRITE 1
Overwrite mode on/off.
0 is off, 1 is on.
When overwrite mode is on then information provided by GROUP, MARKET, INDUSTRY, FULLNAME fields is overwritten for existing symbols (not only for newly added)
$CLEANSECTORS 1
If this is turned on (1), existing sector/ industry structure will be deleted and initialized with Sector 0, 1, 2, 3...63/ Industry 0...255.
So switching this on will basically clean (wipe) existing sector/industry structure
$SORTSECTORS 1
If this is turned on (1), sector/ industry structure will be sorted alphabetically after importing.
Link to the CSV file that can be directly imported to Amibroker
If you have an inkling idea about Amibroker then this can be done seamlessly.
If this still not fathomable then on request I can make a short video tutorial to lucidly demonstrate the process of importing this sectoral classification to Amibroker.
Stay Blessed and Illuminated.