5 ms·
Hi everyone, with the recent interest in U.S. senator insider trading, I open-sourced this repo for you to scrape and analyze the senators' stock transactions y
by nsomani 6y ago
Hi everyone, with the recent interest in U.S. senator insider trading, I open-sourced this repo for you to scrape and analyze the senators' stock transactions yourself: https://github.com/neelsomani/senator-filings https://github.com/neelsomani/senator-filings
I provided a Jupyter notebook with my own simple analysis (limitations included in the README), but of course it can be modified to suit your needs. Let me know if you have any questions - happy to help!
- rasengan 6y agoThis is amazing transparency that we needed. With this tool, you may have really changed the future of America to that of one that’s less corrupt. Bravo!
- matthewaveryusa 6y agoIt will force senators to need a partner in crime. Communication increases the likelihood of getting solid evidence of insider trading, and also gives another leverage point if the partner in crime can be pressured to produce evidence. The smart ones will still get away with it.
- dpau 6y agoI was surprised to hear of blatant Covid-related insider trading by individuals in government, either some really are too stupid to know better or they feel impunity. I fear it's the latter.
- craftinator 6y agoAt least this will filter out some of the ones too stupid to be allowed in leadership roles.
- cosmodisk 6y agoI don't think so. Hardly anyone is that stupid nowadays that they would run their own assets against privileged information. Corruption, especially in western countries,tend to be a bit more sophisticated.A simplified example: Senator A figures out that stock value of company X will drop because of upcoming legislation. He contacts his college years friend,who happens to own a lot of this company's stocks. The friend sell on time just before stock price crashes amd nets millions. Now senator A wants something im return. So it happens that his daughter is finishing marketing studies and will be in need for a job. The friend places senator's daughter in one of his firms and now she's newly baked VP of Marketing.
- bredren 6y agoI agree, although I think currency of favors is usually less than direct stock tips. That is too easy to prove.
- ra7 6y ago> The friend sell on time just before stock price crashes amd nets millions. Doesn’t this get looked at by the SEC? Not always, but they monitor these kinds of transactions especially when millions are involved.
- jchook 6y agoSince the "upcoming legislation" is public information, wouldn't this count as simple market speculation rather than insider trading?
- cosmodisk 6y agoThis was a simplified example. In real life people usually have very complex social networks and it can very easily become Senator A - Senator B- Friend's friend- Neighbors daughter and etc.
- deleted 6y ago[deleted]
- amykyta 6y agoGreat idea. Have you done any analysis on the data? I’d be curious to see if a passive index to track members of the Congress would beat the S&P. Although it may not account for other sweet deals like this option expiry extension and accelerated vesting https://theintercept.com/2020/05/12/david-purdue-senate-cardlytics-stock/ https://theintercept.com/2020/05/12/david-purdue-senate-card...
- creaghpatr 6y agoThat's neat idea, but I think the reporting lag is too long to action it. Would still be good for retroactive benchmarketing. Also consider that extremely wealthy senators (many are) might only have a small part of their assets in stocks and could be part of a bigger financial strategy, as a hedge against other asset classes rather than an indicator of where they or their agent thinks the market will move.
- bko 6y agoI didn't use this tool, I instead used Senate Stock Watcher [0]. But a cursory review [1] of the trades made by senators showed the amounts to be very small (66% of trades were < 15k) and the typical Senator is a millionaire. In the 4 month period I analyzed, only 3 trades were between 250-500k. I looked at performance as well, but its tough to benchmark these things. There were net outflows in the market during that period and if you sold you did relatively well in a falling market, so the typical trade did well. But the relatively small size of the trades makes me skeptical that insider information was used. Matt Levine said it best: > Of course they could be lying, but in context the defense seems pretty plausible. (Kelly Loeffler, for instance, controversially dumped about 0.6% of her portfolio at around the same time, which sure seems like the sort of thing an investment adviser would do without any input from her? You could call your adviser and say “a disaster is coming, sell everything!,” but calling them to say “a disaster is coming, sell a tiny bit!” seems pointless.) But this doesn't include William Barr as he is not a Senator. [0] https://senatestockwatcher.com/ https://senatestockwatcher.com/ [1] https://medium.com/ml-everything/analyzing-us-senators-stock-picks-e8106bbbe8e https://medium.com/ml-everything/analyzing-us-senators-stock... [2] https://www.bloomberg.com/opinion/articles/2020-05-14/senator-s-stock-trades-make-trouble https://www.bloomberg.com/opinion/articles/2020-05-14/senato...
- christiansakai 6y agoSeems to add the PDF analyzing feature is not that hard or I'm missing something? Have you tried to incorporate this feature?
- k3oni 6y agoI would move away from the Yahoo Finance API, there's a few data sources that you can use that have free access to their API, see [1] for an example. - [1] https://www.alphavantage.co/ https://www.alphavantage.co/
- nsomani 6y agoI took a look at Alphavantage, but I wanted other data like daily transaction volume + market caps to do things like weighted regressions. The rate limiting was also a little restrictive.