On 1/25/2016 7:41 PM, brandon.richard03@yahoo.com [amibroker] wrote:
This takes a bit of work sometimes on the users side. Amibroker allows multiple ways to import and receive data but their not in the business of managing data and managing tickers. This requires work from the user.
So I've done this a few times recently for Index constituents and it can get messy. Sometimes its better to compare multiple sources.
The easiest way is if your broker or any other software has some sort of screener you can use to get a list of symbols. Something you can export or copy somehow.
The other way is your off to google and trying to find a list.
So for instance, say you don't have the option above(which is usually more reliable then list online that can be outdated or wrong) , is to just google NSE ticker list.
http://www.nseindia.com/corporates/content/securities_info.htm
This looks like an official website(not sure, not a market I trade). They provide some .csv files for download. You'll need a way to open this like Excel. From there, you need to get these symbols into a form that Yahoo recognizes.
So what I have done myself for some Canadian Index constituents which require some symbol adds on for IQFeed or Yahoo, is to use a free software call Notepad++, its like microsofts notepad with more features, more of interface to program in I believe.
So now we have our list in Excel, the ticker symbols should all be in one column that we can simply copy and paste. I select the column of tickers, and copy them over to Notepad++, they should all be on their own individual lines going down.
This gives us a way to add suffixes that Yahoo uses quickly and easily.
http://finance.yahoo.com/exchanges
That link provides a way to see what Yahoo uses for Suffixes for the multiple exchanges. For instance NSE uses .NS at the end of any symbol so it knows its from the NSE.
So now in Notepad++ theirs a feature where you can replace anything with anything basically. So now we press "ctrl+H" this a shortcut for the replace function. We now go to the tab that says "Replace".
In the field labeled "Find", we enter "$" , $ is the symbol used to represent the end of any line. If you ever wanted to add something to the front of a ticker, you could use "^" instead.
In the field labeled "Replace With" , enter ".NS," . This will now go to the end of every line and add .NS to the symbol. The comma at the end is for when we enter it into amibroker, it recognizes comma as a separation of symbols when entering them.
In the bottom left of the Replace window make sure "Regular Expression" is selected and then click the "Replace All" on the right side.
Now sometimes I've been able to enter the list as is by copy and pasting into amibroker symbols, sometimes because of the lines it only takes the first.
The next step combines all these symbols and combines it to one line. So you should have a list of symbols that look like "ABC.NS," .
In Notepad++, click the edit selection in the top of screen, hit "Select All" or use "CTRL + A " for a shortcut to select the whole document. Then after the selection is highlited, go to Edit again and go to to the selection of "Line Operations" in there you'll see an option to join all lines. You could also use "CTRL + J " for a shortcut.
Now all the symbols have .NS added aswell as a , to seperate and their all in one line. Now use Edit again to select all and now go to Edit and click copy or use "CTRL + C" for a shortcut.
Go into amibroker, select File, New Database, fill in what you want. Go to the manual to reference what is required. For Yahoo data in Amiquote, it'll need to be a Local Database, If yahoo only provides EOD for these Markets, you'll want to select how many bars of EOD you want from the options menu. If they provide any intraday then I recommend you Google Amibroker Yahoo data or reference the manual for more information on creating a database.
So now the database has a name. You can create many databases of data. They can be switched at anytime by going to file and using the open database or even the recent database tab if you've been to it recently.
So with our new list of symbols, we go to the top of Amibroker and select "Symbol" and click on the "New" option. This will open a screen where you can enter a individual symbol or multiple symbols using a comma to seperate. Just paste your list into this window and click add symbol. Now these symbols have all been added to the database. You just now need to retrieve the data for it.
Select Amiquote in the tools tab at the top of screen. Now select Yahoo Historical, select the dates you want to retrieve(Not sure of their historical limits on NSE or BSE). Now its as simple as clicking the play symbol on the screen and it will go through each symbol looking for data.
A good tip is for an intitial download to use Yahoo Historical this retrieves all the data in your range selected. If your downloading everyday, you can use Yahoo Current, and this will download the most recent bar. It's a good idea to atleast once a week download the YahooHistorical in case their was a change with a days data.
Now you'll want to flip through the symbols in your chart and make sure theirs data there. Sometimes depending on where you get your symbols it may be different then what Yahoo uses.
For instance I have some symbols that my broker list as ABC.A to represent that its ABC A class shares. Yahoo usually uses a "-" in symbols like that so it would need to be changed to ABC-A so I just delete the ABC.A and add the new symbol ABC-A and redownload that symbol. It may be another issue aswell. Usually going to yahoo finance and typing the companies real name will provide the symbol they use.
Also, not sure if they do with the NSE or BSE but you can use in Amiquote the Yahoo Fundamental in the data selection tab. This will retrieve whatever fundamantal data it has. Fundamental basic will add for instance with North American symbols, the full company Name so now it'll appear with your symbol list and on the charts or their P.E. This can be viewed with the Symbol Information window in amibroker
Theirs also fundamental extra which isn't available with most symbols I believe outside the U.S. My Canadian symbols don't get any extra fundamentals.
If their any issues, just google some keywords. Amibroker is well documented with articles, a very well done manual and probably someone has asked whatever issue you've had before.
Posted by: Alan <alan@thenorthams.us>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (4) |
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
EmoticonEmoticon