Giter Site home page Giter Site logo

saifrahmed / senator-filings Goto Github PK

View Code? Open in Web Editor NEW

This project forked from neelsomani/senator-filings

0.0 2.0 0.0 6.71 MB

Scrape public filings of the buy + sell orders of U.S. senators and calculate their returns

License: MIT License

Python 23.72% Jupyter Notebook 76.28%

senator-filings's Introduction

senator-filings

Scrape public filings of the buy + sell orders of U.S. senators and calculate their returns. This repo contains a script to scrape the electronic filings at https://efdsearch.senate.gov/search/ and a Jupyter notebook to analyze the results.

Requirements

python3, Selenium

Quick Start

Scrape all of the senators' filings: python3 main.py

Analyze the results by starting a Jupyter server and going through the notebook: jupyter notebook

Limitations

  1. We only look at electronic publicly filed trades by senators. Some periodic transaction reports are PDFs, which are ignored.
  2. We calculate returns only using the trades observed. This is almost definitely not representative of a senator's entire portfolio. A more accurate way of thinking about the returns is a portfolio that mimics the observed buys and sells.
  3. If the periodic transaction report specifies a range ($1000 - $5000), then we assume the amount is the lower bound.
  4. We ignore trades for tickers that do not have data through the Yahoo Finance API.
  5. The portfolio is not allowed to go short.

senator-filings's People

Contributors

neelsomani avatar

Watchers

James Cloos 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.