A tool to scrape senators' stock transactions for your own analysis

栏目: IT技术 · 发布时间: 4年前

内容简介: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 atpython3, SeleniumScrape all of the senators' filings:

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.

以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

软件测试

软件测试

[美]Ron Patton / 张小松、王珏、曹跃 / 机械工业出版社 / 2006-4 / 30.00元

软件测试(原书第2版),ISBN:9787111185260,作者:(美)佩腾(Patton,R.) 著,张小松 等译;张小松译一起来看看 《软件测试》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

html转js在线工具
html转js在线工具

html转js在线工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具