All Projects → kwoshvick → NSE-Stock-Price-Crawler

kwoshvick / NSE-Stock-Price-Crawler

Licence: MIT License
Nairobi Security Exchange (NSE) Kenya daily historical prices of all the stocks listed since 11 September 2006

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to NSE-Stock-Price-Crawler

nse
Nmap NSE scripts
Stars: ✭ 23 (+9.52%)
Mutual labels:  nse
getbhavcopy
Free NSE and BSE data downloader
Stars: ✭ 93 (+342.86%)
Mutual labels:  nse
ICS-Protocal-Detect-Nmap-Script
Some nmap scripts to detetct the infomations of the different ICS Here are 16 main ics protocal scan-scripts include Modbus, S7 and so on.
Stars: ✭ 21 (+0%)
Mutual labels:  nse
nmap-nse-scripts
Nmap NSE scripts that have been customised or created
Stars: ✭ 73 (+247.62%)
Mutual labels:  nse
Screeni-py
A Python-based stock screener to find stocks with potential breakout probability from NSE India.
Stars: ✭ 161 (+666.67%)
Mutual labels:  nse
nmap-nse-modules
My collection of nmap nse modules
Stars: ✭ 59 (+180.95%)
Mutual labels:  nse
mftool
Python library for getting real-time Mutual Funds data in India
Stars: ✭ 76 (+261.9%)
Mutual labels:  nse
NSEDownload
Python Library to get historical, adjusted data and generate trailing returns of stocks and indices on the NSE
Stars: ✭ 65 (+209.52%)
Mutual labels:  nse
nse2r
Fetch data from National Stock Exchange, India
Stars: ✭ 21 (+0%)
Mutual labels:  nse
NSE-Stock-Scanner
National Stock Exchange (NSE), India based Stock screener program. Supports Live Data, Swing / Momentum Trading, Intraday Trading, Connect to online brokers as Zerodha Kite, Risk Management, Emotion Control, Screening, Strategies, Backtesting, Automatic Stock Downloading after closing, live free day trading data and much more
Stars: ✭ 78 (+271.43%)
Mutual labels:  nse
Vulscan
Advanced vulnerability scanning with Nmap NSE
Stars: ✭ 2,305 (+10876.19%)
Mutual labels:  nse

NSE Stock Price Crawler

This is a web crawler for Nairobi Security Exchange (NSE) Share prices since its digitization on 11th September 2006 to 31th December 2021. The data crawled can be found in the data folder.

Setup

  • Install python3 and pip3 installed
  pip3 install -r requirements.txt
  • To install the python3 dependencies.

Data Format in the csv

  • Daily csv Format

    • Each csv contains daily prices for all the companies for that day.
    • Code | Name | Lowest Price of the Day | Highest Price of the Day | Closing Price | Previous Day Closing Price | Volume Traded
  • Monthly , Yearly and Company csv Format

    • Each csv contains a particulars company prices for the month/ year
    • Date | Lowest Price of the Day | Highest Price of the Day | Closing Price | Previous Day Closing Price | Volume Traded

The data folder has 4 folders inside:

  • Daily folder Has all NSE daily prices ordered by year and months
  • Monthly folder All daily data put in a single csv for that month ordered by company code name.
  • Yearly folder All monthly data put in a single csv for that year.
  • Company folder All yearly data put in a single csv for that company.

All errors 404 errors for pages not found can be found in the errorlog folder in the error.log

NB Unable to remove the following holidays as of now because they are dynamic

  • Eid al Adha (was gazetted in Kenya as of September 2016)

  • Eid Fitr

Usage

  • To run the crawler
python3 getData.py

getData file

  • Set the following input

    • Start month
    • Start year
    • End month
    • End Year
  • The script also does the following:

    • The script crawls the data given the start dates and end dates. It gets data from mystocks website , credits to them and saves them under the data/daily/ folder.

    • It gets each company's data from the daily csvs. It creates a csv for each company and saves the monthly share prices of that company. The data is stored in the data/monthly/ folder.

    • It gets each company's data from the monthly csvs. It creates a csv for each company and saves the yearly share prices of that company. The data is stored in the data/yearly/ folder.

    • It gets each company's data from the yearly csvs. It creates a csv for each company and saves the company's share prices for the period specified. The data is stored in the data/company/ folder.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].