This program is very similar to Get Real Time Data from Google for NSE . The difference is that this program uses concurrent.futures module in Python 3.5 to launch parallel tasks
- The purpose of this program is to retrieve Google Intraday Data for a list of symbols from the NSE stock exchange . Designed to run until 15:30 hrs Indian Standard Time(IST)
- The Input file for this program is an Excel Spreadsheet. Name it as "stock_symbols". Enter the list of stocks in the first column of the sheet for which you would like to retrieve the Google Intraday Data.
- This is a multi threaded program that uses the concurrent.futures module (only from version Python 3.2) for asynchronously executing callables (Synchronous tasks are essentially Sequential in nature ie; when you do something synchronously, you wait for it to finish before moving on to another task. When you do something asynchronously, you can move on to next task before it finishes.)
- The following arguments are required for the program : sheetname time_in_minutes
- Write's the output in OHLCV format in a CSV file
When tested on a Intel I3-2367M processor for a list of 200 stocks:
- For sequential processing , the time taken was about 30 seconds.
- For asynchronous processing, the time taken was about 16 seconds.
Test it
yourself and verify the results for yourself. The results will vary
based upon the machine that you use and your net speed.
Program on GitHub
Cheers Maadi !!!
Program on GitHub
Cheers Maadi !!!
No comments:
Post a Comment