In this project, I have aggregated and analyzed senator stock trading behavior. Perhaps this can help shine a light on insider trading.
Some limitations of my code are that it cannot read the handwritten trades submitted by senators; it can only detect the electronically submitted trades. Additionally, the government only uploads senator trading information from 2012 onwards.
Please install the packages at the top of the code before running it.
The senate.txt contains a sample of all recorded senator trades up until 2021-June-16. It will be downloaded by the actual code file.
It may take a long time to analyze all the trades from 2012- current day. This is due to the inefficiency of accessing all the stock information for all the trades.