Coder Social home page Coder Social logo

edgar-fetch's Introduction

edgar-fetch

For downloading and accessing financial data from SEC's EDGAR

To install dependencies in virtual environment with pip

Do the following at the root:

pip install -r requirements.txt

But before doing this, you might consider installing the whole package in the virtual environment, which would automatically install all required dependencies.

To install the package locally

Do the following after changing directory (cd) to the edgar-fetch root directory in the terminal:

pip install -e .

Goal

To fetch SEC filings, both latest and historical, for credit risk reseacrch of companies in emerging markets especially the small and medium-size enterprises (SMEs). It is expected the focus will be on the major risk ratios: i.e. the debt, solvency, and profitabilty metrics. Particular attention should be paid to new markets in the retail and commercial segments of the startup landscape. We will therefore give less attention to the banking segment.

Quickstart

To download the required SEC finanical statement data (via DERA) with a year since (e.g. 2015) and a year before (e.g., 2021, not inclusive), do the following on either a Jupyter notebook or ipython (or similar) terminal with Python version at least 3.8:

from edgar_fetch.downloader import Fetcher

fetcher = Fetcher("/Users/username/edgar-fetch/data/")  # This is the path to an existing data directory that comes with the installation. 
fetcher.get_all(2015, 2021, False)

fetcher.unzip_files()

The last step is to extract all the zip files into their respective folders. Note that these directories, if not present already, will be autogenerated.

To download EDGAR full-index financial data (e.g. 8-K) for a single firm (e.g. Apple with ticker "AAPL"), do the following instead:

from edgar_fetch.downloader import Fetcher
fetcher = Fetcher("/Users/username/edgar-fetch/data/")  # This is the path to an existing data directory that comes with the installation.
fetcher.get_company("8-K", "AAPL")

edgar-fetch's People

Contributors

dependabot[bot] avatar slim-patchy avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.