Coder Social home page Coder Social logo

Comments (1)

dgunning avatar dgunning commented on July 30, 2024

Company(ticker) gets the company json with the first 1000 filings for that company. If the company has more than 1000 filings the code issues a call for each page of 1000 filings until all are retrieved. So for given company you could be making several calls
Company(ticker, include_old_filings=False) makes just the first call, but that's moot since you need all the 10-K's

max_workers>2 will likely overload the requests per second at the moment.

There is a more efficient way to do this .. I need some time to do the details but

  • get a list of ciks from the tickers using get_cik_ticker_lookup()
  • filings = get_filings(form=['10-K', '10-Q'], filing_date=f'{start_date}:{end_date}')
  • filter filings by cik
  • Separate into companies

I'm also working on a set of batch improvements including a Throttler inside the request framework but that's a couple releases out (a week or two)

(Side note: you've given me an idea for optimization by getting old filings only when get_filings is called. Right now it's just a filter.)

from edgartools.

Related Issues (20)

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.