Code Monkey home page Code Monkey logo

sec-edgar's Introduction

SEC-Edgar-Crawler

Getting filings of various comapanies at once is really a pain but SEC-Edgar-Crawler does that for you. you can Download all companies periodic reports, filings and forms from EDGAR database in a single command.

Installation

You may have to install the package using pip.

$ pip install SECEdgar

or

You can clone the project or download it as zip.

$ git clone https://github.com/rahulrrixe/SEC-Edgar.git
$ cd SEC-Edgar
$ python setup.py install

Runing

Check data.txt to see the format in which name of company's, CIK code date (prior to) and count is given to get the filings of that company.

Now to run it start python shell

>>> from SECEdgar.crawler import SecCrawler
>>> secCrawler = SecCrawler()
>>> secCrawler.filing_10K('AAPL', '0000320193', '20010101', '10')

This will download the AAPL company's 10-K filings and the data will be saved in "SEC-Edgar-data" folder which will be created on the run time.

Example

import time
from SECEdgar.crawler import SecCrawler

def get_filings():
	t1 = time.time()
	
	# create object
	seccrawler = SecCrawler()

	companyCode = 'AAPL'    # company code for apple 
	cik = '0000320193'      # cik code for apple
	date = '20010101'       # date from which filings should be downloaded
	count = '10'            # no of filings
	
	seccrawler.filing_10Q(str(companyCode), str(cik), str(date), str(count))
	seccrawler.filing_10K(str(companyCode), str(cik), str(date), str(count))
	seccrawler.filing_8K(str(companyCode), str(cik), str(date), str(count))
	seccrawler.filing_13F(str(companyCode), str(cik), str(date), str(count))

	t2 = time.time()
	print ("Total Time taken: "),
	print (t2-t1)
	
if __name__ == '__main__':
	get_filings()	

Supported Methods

Currently this cralwer supports only 4 filings

  • 10-K
  • 10-Q
  • 8-K
  • 13-F

I have maintained a list of companies with their cik code and the file can be downlaoded from here.

Bitdeli Badge

sec-edgar's People

Contributors

fluffybeing avatar quartzing avatar bitdeli-chef avatar zevaverbach avatar jblemoine avatar

Watchers

James Cloos avatar Joe Cool avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.