Amibroker Database for NSE stocks

murthymsr

Well-Known Member
#11
hi all,

procedure for incorporating split / bonus into Amobroker database:

1) go to Amibroker >> >> database purify >>

2) enter the reference symbol. this may be the most actively traded stock in the excahange of your data. ( RELIANCE is probably the most suited. i use BHEL for NSE. )

3) check 'report possible splits'. to avoid confusion initially, uncheck all other options.

4) enter the detection threshhold % (you are permitted to enter between 30% & 90 % : a high value, may not show some of the splits. a low value may show some extra stocks also as splits. : i am comfortable with 50% setting)

5) select 'ALL symbols' & 'ALL quotes' when you are running ffor the first time.

6) press 'analize'

7) the output will show the columns symbol, date & possible 'unadjusted split'. please understand that the split & the rato are only suggestions and to be conffffirmed by other sources.

8) it is preferable to confirm the 'possible split' from other sources. i find this NSE link helpful for confirmation of a split for a stock from the announcements:
http://www.nse-india.com/content/cor...troduction.htm

i also find the below link useful, though not & complete:

http://www.investsmartindia.com/iil_...ch/rights.aspx

9) after the confirmation of a split & the RATIO, you may double click on the database purify window. this action will take you to the corresponding stock chart.

10) now go to Amibroker >> symbol >> split >>
a window will open, where you will be shown the date & the ratio as predicted by amibroker. you may make changes as necessary & press the OK button.

11) please note that bonus & splits are considered as the same & shown as splits. the number indicated in the RATIO field is the number of shares EACH share will be split into. you can enter fractions also in this field, as required. sometimes, stocks are split & on the same date bonis shares are issued.
the ratio to be entered = split ratio * bonus ratio. this bonus ratio has a different meaning & value than the conventional parlance in India. ( 1:1 bonus means that an additioanal share is issued for every share held. but in AB, the corresponding ratio will be 2:1, meaning that the earlier ONE share has become TWO.

with this post, the procedures for clean-up of the database will be complete. now we can assign each stock to an industry & to a sector so that we may do the TA sectorwise & industrywise.

karthik will be detailing the procedure for the same.

all the best.
MurthyMSR
 

asnavale

Well-Known Member
#12
Thanks murthy,

The database purify procedure described by you has helped me in detecting erraneous data in my database. In some cases I had unadjusted data for a few days(about 1-2weeks). The data before and after were properly adjusted but in between there was an error. So I got some contradicting split ratios such as 2 to 1 split followed by a 1 to 2 split which clearly shows the unadjusted chunk of data. I could correct these errors and it helped me in the TA. I was getting some unacceptable results due to the error in data and now I am able to get correct results. Thanks for such useful tips.

-Anant
 
#13
Hi all !

i downloaded amibroker evalution version from interent,now i am struck.don'tk know how to import bhav copy of nse into amibroker. can any one give step by step procedure. i did tried but failed.

thanks
suba
 

murthymsr

Well-Known Member
#14
Thanks murthy,

The database purify procedure described by you has helped me in detecting erraneous data in my database. In some cases I had unadjusted data for a few days(about 1-2weeks). The data before and after were properly adjusted but in between there was an error. So I got some contradicting split ratios such as 2 to 1 split followed by a 1 to 2 split which clearly shows the unadjusted chunk of data. I could correct these errors and it helped me in the TA. I was getting some unacceptable results due to the error in data and now I am able to get correct results. Thanks for such useful tips.

-Anant
dear asnawale,
thanks for your positive feedback.
any sw works with the basic principle, garbage in - garbage out. so database purity is very important.

i felt that users may purify their database before the all important series of posts by karthik are made.

all the best, keep posting your feedback.

murthymsr
 

karthikmarar

Well-Known Member
#15
Hi Everybody

Murthy had elaborated on creating a clean database. The next step is setting up the sectors and industries.

First we have to define the Sectors and Industries. For this we had a look at the various sector and industry classifications available at various websites.

First we had a look at the NSE. Though NSE does not provide a well defined classification of sectors and corresponding industries, it provides a list of about 69 Industries,

Then we had a look at the industry classification at Myiris.com. This had about 59 sectors and 175 Industries. Too Elaborate and in unwieldy.

In contrast ,the DOW provides just 11 sectors and 100 odd industries for the huge number of stocks considered there..

We felt that there is no point in having a very elaborate list of sectors and industries. Whatever list is made, it should be concise to handle but with adequate clarity.

So we started a long elaborate process of lists and revisions, arguments and agreements and finally arrived at list of 18 Sectors and corresponding 94 Industries. To tell the truth it was not an easy task. :)

Just to highlight a few points we had considered..

Fertilizers and sugar are not considered as separate sectors but there are all related Agriculture and would be considered as Industries under the Agriculture sector.

All Service oriented Industries like aviation, shipping, retail etc brought under one Main sector called services.

Also the sector and industry composite charts which we will be making later are by default loaded to sector zero. So we have reserved the first sector, that is Sector zero for the sectoral aggregates. Also one sector ( rather a folder) called unassigned will be provided in the last to put all unassigned securities like bankbees, niftybees etc.

The complete list of Sectors and Industries is enclosed for reference.

Soon we will proceed with the methods and afl to load the sectors and Industries in Amibroker. That would be followed by methods to create composite charts for sectors and Industries. However it should be noted that if you already have some sectors and industries defined already they would be over written.

Murthy, please add if you have additional points on this.

Warm regards

Karthik
 
Last edited:

karthikmarar

Well-Known Member
#16
Hi Everybody

Once the classification of sectors and industries was completed, next came the arduous task of assigning the industry for each stock. NSE has classification of industries for about 500 odd stocks. So we had to depend on other website like myiris, moneycontrol etc to looks up the industry classification for the remaining stocks. Some of the new stocks we had to go to the company web site to check their activity and assign the industry. It was a very time consuming and boring task. Somehow we went through the task and completed it.

Before we proceed further with the actual procedure to load the industry and stocks into Amibroker we will share with the complete list of stocks with the industry and Sector Assignments.

List enclosed

Regards

Karthik .
 
Last edited:

karthikmarar

Well-Known Member
#17
Hi All

Finally we come to the actual procedure to setup the sectors and Industries for Amibroker.

We require 2 Amibroker files, One text file containing the industry details for the stocks and finally one afl to load the data into Amibroker. Following are the files

1. Broker.sectors - Ami file
2. Broker.Industries - Ami File
3. Stockindustry.txt - text file containg the industry details for the stocks
4. loaddata.afl - Afl for lading the sector and Industry data.

Following is the procedure

1,Backup file c:\Program Files\Amibroker\data\Broker.Workspace ( or d:\... wherever you AB is loaded)

2. Delete Broker.Workspace

(Or you can just rename the existing Broker.Workspace into something convenient to remember)

3. Backup and Delete broker.industries and broker.sectors from
c:\program files\Amibroker.
(Or just rename as mentioned before)

4. Copy the files new broker.sectors and broker.industries file to this dir.

5. Copy LoadData.afl into c:\programfiles\Amibroker\formulas\custom ( or d:\... wherever you AB is loaded)

6. Modify LoadData.afl file to point to where the StockIndustry.txt file. Is located. The Default location is the root directory of D:\. If you are apprehensive in changing the Loaddata.afl , just save the txt file in the root directory in partition D.

7. Now open Amibroker.

8. By default, all the stocks will be in the 1st industry, Agro - Others. Move them to Industry 255 using menu item Symbol -> Organize assignments..

9. Open LoadData.afl for analysis. In the Analysis window, choose the following
Apply to: All stocks
Range : Last 200 quotes.

And then run the scan. This may take a few minutes depending on your computer speed.

10. Once the Scan is complete, check it your sector and Industry allocation.

The necessary files enclosed.

Please do let us know if you face any problem..

warm regards

karthik
 
Last edited:
#18
Works like a charm :)

Let me have the honor of being the first one to thank both of you for your painstaking efforts. Thanks to your work of a genius, I now have a cleaner and an organized database in AB.

Best Regards,
Ganesh
 

murthymsr

Well-Known Member
#19
Works like a charm :)

Let me have the honor of being the first one to thank both of you for your painstaking efforts. Thanks to your work of a genius, I now have a cleaner and an organized database in AB.

Best Regards,
Ganesh
dear ganesh,
thanks for your words of kindness.
may be you have 'cleaner' database.

also please follow carefully the last few posts of karthik and the next one & you will have all industry & sector charts too.

if you have already adjusted for bonus/splits also, you may post that info for the benefit of others.

all the best.
murthymsr
 
Last edited:

karthikmarar

Well-Known Member
#20
Hi all

now we have the sector and Industry allocated in Amibroker. No queries so far. So either nobody followed it or nobody faced any problems. :D

Anyway let me go to the next step of creating the sector and industry charts. Very easy. just run the attched afl in the the analysis, Scan and the charts will be created automatically and they will be loaded under the first sector folder "Sector Aggregates".

Attaching the afl and some sample sector and Industry charts.

regards

Karthik
 
Last edited:

Similar threads

Zerodha – Open Paperless Account

Open online account with Zerodha. Free delivery trading and Max Rs 20 for Intraday, F&O, Currency and Commodity Trading. Intraday High leverage with MIS, CO and BO.

Name:Phone:
Email:City:
State:
Are you a day trader?