GitHunt
NI

niyatipatel2005/Machine-Learning-based-Financial-Analysis

A financial analysis web app that extracts and visualizes key metrics from company financial data using Python and Flask.

๐Ÿ“Š ML Financial Analysis

A web-based platform that provides fundamental analysis of companies using historical financial data, key ratios, and visualizations.


๐Ÿ”ง Features

  • Extracts and calculates key metrics like:
    • ROE (Return on Equity)
    • Sales & Profit growth (3Y, 5Y, 10Y)
  • Displays pros and cons from MySQL database
  • Clean UI with HTML + CSS
  • Metrics fetched from JSON files (per company)
  • Built using Python Flask

๐Ÿ“ Project Structure

ML_Financial_Analysis/
โ”‚
โ”œโ”€โ”€ app/ # Flask routes and templates
    โ”œโ”€โ”€ static/
    โ”œโ”€โ”€ templates/
โ”œโ”€โ”€ assets/ # CSS, images, etc.
โ”œโ”€โ”€ metrics/ # Generated metric JSON files
โ”œโ”€โ”€ raw_data/ # Raw company JSON input files
โ”œโ”€โ”€ scripts/ # Python script for metrics extraction
โ”œโ”€โ”€ insights/ # Visual outputs 
โ”œโ”€โ”€ output/ # Optional export/output directory
โ”œโ”€โ”€ .venv/ # Python virtual environment
โ”œโ”€โ”€ main.py # Entry point for the app
โ”œโ”€โ”€ app.py # (optional) if used to launch
โ””โ”€โ”€ README.md # You are here

๐Ÿš€ Setup Instructions

1. Clone the repo:

git clone https://github.com/niyatipatel2005/Machine-Learning-based-Financial-Analysis.git
cd Machine-Learning-based-Financial-Analysis

2. Create and activate virtual environment (Windows):

python -m venv .venv
.venv\Scripts\activate

3. Install required packages:

pip install -r requirements.txt

4. Generate metrics:

python scripts/extract_metrics.py

5. Run the Flask app:

python app.py

Authors

License

This project is licensed under the [NAME HERE] License - see the LICENSE.md file for details