Skip to content

akramguediri/FTD_VW_relation_analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Financial Analysis of Short Selling Impact on Volkswagen During the 2008-2009 Financial Crisis

Table of Contents

  1. Introduction
  2. Project Structure
  3. Setup Instructions
  4. Data Sources
  5. Running the Scripts
  6. Analysis and Results
  7. Dependencies
  8. Contributing
  9. License

Introduction

This project aims to analyze the impact of short selling on Volkswagen stock and the broader market during the 2008-2009 financial crisis. The analysis includes:

  • Correlation analysis between Volkswagen stock prices and Failures to Deliver (FTD) volumes.
  • Regression analysis to explore the relationship between FTD volumes and stock prices.
  • Sentiment analysis of news articles related to Volkswagen during the period of interest.

Project Structure

financial_analysis/
├── data/
├─├──FTDs/
├─├──├─cnsp_sec_fails_200{701..812}.txt/
│ ├── volkswagen_stock_prices.csv
│ ├── ftd_data.csv
│ ├── sp500_index.csv
│ └── news_articles.json
├── scripts/
│ ├── download_data.py
│ ├── analyze_data.py
│ └── sentiment_analysis.py
├── requirements.txt
└── README.md

  • data/: Directory to store all datasets.
  • scripts/: Directory containing Python scripts for data download, analysis, and sentiment analysis.
  • requirements.txt: File listing all Python dependencies.
  • README.md: Detailed project documentation.

Setup Instructions

Follow these steps to set up the project on your local machine:

  1. Clone the repository:
    git clone https://github.com/yourusername/financial_analysis.git
    cd financial_analysis
    
  2. Install the required packages:
    pip install -r requirements.txt
    

Data Sources

The data used in this project includes:

  • Volkswagen Stock Prices: Historical stock prices for Volkswagen.
  • Failures to Deliver (FTD) Data: FTD data for Volkswagen.
  • S&P 500 Index Data: Historical S&P 500 index data.
  • News Articles: News articles related to Volkswagen.

Running the Scripts

  1. Download and Parse Data This script downloads the required datasets and saves them into the data/ directory.
    python scripts/download_data.py

paste the data of 2007-2008 files from SEC FTD in the data folder (use curl) these two scripts will parse the data accordingly.

python scripts/parseftd.py
python scripts/convert_text_csv.py
  1. Analyze Data This script loads and analyzes the data, performing correlation and regression analysis.
    python scripts/analyze_data.py
  2. Sentiment Analysis This script performs sentiment analysis on the news articles related to Volkswagen.
    python scripts/sentiment_analysis.py
    

Analysis and Results

The analysis includes the following components:

  1. Correlation Analysis: Identifies correlations between Volkswagen stock prices and FTD volumes.
  2. Regression Analysis: Explores the relationship between FTD volumes and stock prices.
  3. Sentiment Analysis: Analyzes the sentiment of news articles related to Volkswagen during the period of interest. Example Outputs: Correlation Analysis The correlation matrix showing the relationship between Volkswagen stock prices and FTD volumes.

Regression Analysis A summary of the regression analysis exploring the relationship between FTD volumes and Volkswagen stock prices.

Sentiment Analysis A plot showing the sentiment of news articles over time.

Dependencies

The project relies on the following Python libraries:

  • yfinance
  • requests
  • pandas
  • matplotlib
  • seaborn
  • statsmodels
  • textblob

These dependencies are listed in the requirements.txt file and can be installed using pip install -r requirements.txt.

Contributing

Contributions are welcome! Please create a pull request or submit an issue if you have any suggestions or find any bugs.

About

Financial Analysis of Short Selling Impact on Volkswagen During the 2008-2009 Financial Crisis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages