内容简介: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
- We only look at electronic publicly filed trades by senators. Some periodic transaction reports are PDFs, which are ignored.
- 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.
- If the periodic transaction report specifies a range ($1000 - $5000), then we assume the amount is the lower bound.
- We ignore trades for tickers that do not have data through the Yahoo Finance API.
- The portfolio is not allowed to go short.
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
程式之美-微軟技術面試心得
編程之美小 / 悅知文化 / 2008.06.20 / 490元
書內容分為以下幾個部分: ▓ 遊戲之樂:從遊戲和其他有趣問題出發,化繁為簡,分析總結。 ▓ 數字之魅:程式設計的過程實際上就是和數字及字元打交道的過程。這一部分收集了一些這方面的有趣探討。 ▓ 結構之法:彙集了常見的對字串、鏈表、佇列,以及樹進行操作的題目。 ▓ 數學之趣:列舉了一些不需要寫具體程式的數學問題,鍛煉讀者的抽象思考能力。 ▓ 書中絕大部分題目都提供了詳細......一起来看看 《程式之美-微軟技術面試心得》 这本书的介绍吧!