# Nigeria External Debt, Institutional Quality, and Financial Sector Development Analysis (1996–2023)
This repository contains the complete, automated econometric analysis pipeline for the undergraduate thesis investigating the relationship between **External Debt**, **Institutional Quality (WGI)**, and **Financial Sector Development (FSD)** in Nigeria.
The research design, variables, model specification, and diagnostic tests are built to align directly with the methodology described in Project_Chapters_1_2_3_Updated.pdf.
---
## Recommended Repository Name
**`nigeria-external-debt-fsd-analysis`**
---
## Project Overview
This project implements a modular Python-based econometric pipeline that:
1. **Fetches Real Data** directly from the World Bank API (World Development Indicators and Worldwide Governance Indicators).
2. **Preprocesses and Cleans** the time series (1996–2023), including linear interpolation for biennial governance indicators and mean-centering of the variables to reduce multicollinearity in the interaction term.
3. **Conducts Unit Root Tests** (Augmented Dickey-Fuller and Zivot-Andrews with endogenous structural breaks).
4. **Performs Cointegration Bounds Testing** using the Autoregressive Distributed Lag (ARDL) framework (Pesaran et al., 2001, Case 3).
5. **Estimates Long-Run Levels & Short-Run Dynamics** via the Unrestricted Error Correction Model (UECM).
6. **Validates Models** with a comprehensive suite of post-estimation diagnostic checks (Normality, Heteroskedasticity, Serial Correlation, ARCH, and Ramsey RESET).
7. **Runs Toda-Yamamoto Modified Granger Causality** to establish directional causality.
8. **Outputs Publication-Grade Visualizations** (historical trends, correlation matrix, CUSUM/CUSUMSQ parameter stability, and the interaction marginal effects plot).
9. **Compiles a Thesis-Ready Academic Report** directly into Markdown format.
---
## Directory Structure
```text
├── data/
│ └── nigeria_debt_data.csv # The preproces …