Trading with a tested strategy is essential, it determines the success of a trader, however testing the strategy with right data is much more important. If you wanted to test a trend following or a mean reversion strategy with list of stocks that are part of Futures and Options, most beginners simply download the current stock futures data and their lot size and test with it. But you need to know what are the list of stocks that are part of FnO historically, what were their lot size before, stocks that were part of FnO in 2016 might not be still there in FnO.
In this article, we shall cover
How to find historical stocks futures lot size
What are list of stocks that are part of index like Nifty 50, Nifty 500 historically
How to find historical top 10 Nifty stocks as per their weightage
How to download EOD data
How to get list of FnO stocks and their lot size for current month
What are list of ETFs listed in NSE
What are the list of stocks that are included/excluded from Nifty index from 1995
Historical stocks futures lot size:
Please note that there is no way to get the historical lot size of stocks futures, NSE don’t publish it, so we need to do some calculated steps to get that data.
Go to this link from NSE webiste https://www1.nseindia.com/products/content/derivatives/equities/homepage_fo.htm
Download Market Activity report, it will download the current month report of all futures and option stocks data
The zip file contains multiple files, open the second file.
The file will contain stock symbol, expiry date, OHLC data, along with that you get traded quantity and No of contracts traded, using this data we can calculate the lot size of every stock symbol. Simply divide Traded QTY / NO of contracts gives you the lot size.
So to get the historical stock futures data, all you need to do is change the date in the below link
For an example, to get the historical stock futures lot size data for Sep 2016, I will be using the below link and repeat the above steps. So all we need to do is, just change the date-month-year and download the historical files, repeat the above calculation to find the lot size.
If you want to download the FnO stocks and their lot size for current month, you can simply go to https://www1.nseindia.com/content/fo/fo_mktlots.csv
Historical constituents of Nifty Index:
When you are designing a stock trading system based on certain universe like Nifty 50, Nifty 500 etc, it is important to test the strategy with list of stocks that are part of these indices historically. If you test the strategy with current Nifty 50 or Nifty 500 stocks, you will get extraordinary results due to survivorship bias. Don’t do that mistake. Stocks like DLF, RCOM, UNITECH were part of Nifty 50 in 2008, not any more. To get this data, go to https://www.niftyindices.com/reports/monthly-reports which will show you current month list of stocks that are part of different indices. Click on Archive
Select Indices — Market Capitalization from drop down and select historical month/year, click on submit. It will generate a zip file which will contain the required information.
Not only for Nifty 50, Nifty 500, you can get the list of stocks that are part of each index.
Once you open the PDF file, you can see the stock symbol, full name, which industry it belongs to and their weightage with respect to index.
So to get the historical stocks list for different indices, all you need to do is change the month/year in the below link
For an example, to get the historical constituents of all index for Aug 2013, I will be using the below link and download the zip file. So all we need to do is, just change the month-year and download the historical files, open the respective pdf from any index to get the stock list. Please note that this data is available from April 2013 onwards. However Nifty 50, Nifty next 50 indices stocks data is available from 2006 on wards.
How to download EOD data from NSE:
You can download end of the data from NSE for all equity cash segment stocks, stock futures and options data, index spot data, index futures and options data.
Go to https://www1.nseindia.com/products/content/equities/equities/eq_security.htm enter the stock symbol and date criteria for which you want to download the data
To get the stock futures historical data, go to the below link select the symbol, year, expiry period and time period for which you wan to download the data
To get the Index spot data, go to below link and select the index from drop down and give the time period.
List of all ETFs:
To get the list of all Exchange Traded funds listed in NSE, just go this link http://www1.nseindia.com/content/equities/eq_etfseclist.csv
This will give you the ETF symbol name and their underlying details along with the date of listing
You can visit https://www.niftyindices.com/reports/etf-and-index-fund-dashboard to get detailed report on ETFs
Nifty data is available from 1995, in last 25 years there were many stocks which was included in Nifty 50 and stocks that did not perform well were removed from Nifty 50. List of stocks that were added to different index and removed from different index data is available in this link
We even did an extensive research on this earlier, ran an analysis to check what are the list of stocks that are added to Nifty 50 index and what is the returns of such stocks for next one year. Similarly, checked the list of stocks that are excluded from Nifty 50 and how it performed in next one year. You can check out this link for more info Should you buy stocks that gets added to Nifty 50 — Algo Trading in India |