Skip to content

codyjohnsontx/insideroutsider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Stock Trading Analysis of Politicians

Overview

Welcome to the Stock Trading Analysis of Politicians project! This repository showcases a Python-based analysis of stock trading data among politicians, with a focus on investigating whether politicians engage in suspicious timing of trades around legislative events. The project utilizes web scraping techniques, data parsing, and visualization to gain insights into this phenomenon.

Motivation

The project was born out of a curiosity to explore the intersection of politics and finance. By analyzing stock trading data of politicians, we aim to shed light on whether there are patterns suggestive of insider trading or opportunistic trading around legislative events. This investigation is crucial for ensuring transparency and accountability in financial markets and political practices.

Key Features

  • Web Scraping: Utilizes the Beautiful Soup framework to scrape stock trading data from Quiver Quant.
  • Data Parsing: Parses the scraped data and compiles it into CSV files for further analysis.
  • Data Visualization: Utilizes Plotly to visualize the trading data, allowing for interactive exploration of trends and patterns.
  • Hypothesis Testing: Investigates the hypothesis that politicians time their trades around legislative events by analyzing spikes or patterns in trading activity.

Usage

  1. Clone this repository to your local machine.
  2. Navigate to the project directory.
  3. Run the Python script to parse the trading data and generate CSV files.
  4. Open the Jupyter notebook stock_trading_analysis.ipynb to visualize the data using Plotly.

Dependencies

  • Python 3.x
  • Requests
  • Beautiful Soup
  • Plotly
  • Pandas

Graph Legend

  • Blue: Represents buy transactions.
  • Red: Represents sell transactions.

Future Enhancements

  • Integration of machine learning algorithms for predictive analysis.
  • Expansion of data sources and incorporation of additional datasets for comprehensive analysis.
  • Deployment of interactive dashboards for real-time monitoring of trading activities.

Contributions

Contributions to this project are welcome! Whether it's through code contributions, bug fixes, or feature enhancements, we appreciate any contributions that help advance our understanding of stock trading among politicians.

License

This project is licensed under the MIT License.

Author

Created by Cody Johnson.

Contact

Connect with me on LinkedIn.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages