Skip to content

Syntax-Surge-01/IITK-Finance-AI

Repository files navigation

Financial Data Analysis & Explanation using LLMs

📌 Problem Statement

Financial statements are crucial for understanding a company's performance and health, yet they are often filled with complex jargon, intricate calculations, and details that can be overwhelming for the average reader.

As financial literacy becomes increasingly important, there is a growing need for innovative solutions that can bridge the knowledge gap and empower individuals to make informed financial decisions.

The task is to develop an application or platform that leverages Large Language Models (LLMs) and Generative AI to simplify and explain complex financial statements in a way that is accessible to amateurs.

The application should provide:
Clear, concise explanations
Visual summaries
Insights in the form of stories derived from financial documents


🛠 Tech Stack

Languages & Frameworks:

  • Python (Core backend logic)
  • Flask (Web framework for interactive UI)
  • HTML, Jinja2, dash (Frontend templating)

Libraries Used:

  • pandas → Data handling & preprocessing
  • matplotlib & seaborn → Data visualization
  • statsmodels → Statistical modeling
  • scipy → Mathematical operations
  • numpy → Numerical operations
  • markdown → Rendering formatted text
  • Flask → Web framework
  • LLM API (Gemini) → Generating financial explanations
  • statsmodels

📂 Project Structure

├── app.py                    # Main Flask app
├── data_preprocessing.py      # Data cleaning & preparation
├── inflation_adjustment.py    # Adjusts data for inflation
├── cash_flow.py               # Analyzes cash flow trends
├── vif_analysis.py            # Detects multicollinearity using VIF
├── plots.py                   # Generates plots & visualizations
├── requirements.txt           # Python dependencies
├── README.md                  # Project documentation
│
└── templates/
    ├── index.html             # Homepage template
    ├── plot.html              # Visualization page template

📊 Dataset

This project uses a financial dataset containing key metrics such as:

  • Net Income
  • Earnings Per Share (EPS)
  • Revenue
  • Cash Flow
  • Stock Prices
  • Inflation Data
  • etc

The dataset is preprocessed before analysis, ensuring clean and structured input.

🚀 How to Run Locally

1️⃣ Clone the Repository

git clone <repository-url>
cd <project-folder>

2️⃣ Create a Virtual Environment (Recommended)

python -m venv venv
source venv/bin/activate  # On macOS/Linux
venv\Scripts\activate     # On Windows

3️⃣ Install Dependencies

pip install -r requirements.txt

4️⃣ Run the Application

python app.py

5️⃣ Open in Browser

Go to http://127.0.0.1:5000/ to use the application.


📌 Features

Data Preprocessing: Cleans and prepares financial data
Inflation Adjustment: Adjusts financial values based on inflation
Cash Flow Analysis: Evaluates a company’s cash inflow & outflow
VIF Analysis: Detects multicollinearity in financial variables
LLM-Based Explanation: Converts complex financial terms into simple insights
Data Visualization: Generates insightful plots for analysis
Web-Based Interface: View results and analysis interactively


📢 Future Enhancements

🔹 Integrate real-time financial data APIs
🔹 Improve AI-generated explanations with domain-specific tuning
🔹 Enhance UI with interactive charts using Plotly
🔹 Add NLP-based financial trend analysis


Releases

Packages

Used by

Contributors

Languages