Skip to content

An interactive financial assistant with real-time stock analysis, risk assessment, and AI-powered insights using Flask and Google's Gemini model.

Notifications You must be signed in to change notification settings

Life-Experimentalist/financial_assist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💹 Finance Chatbot & Stock Analysis Web App

An AI-powered finance chatbot and stock analysis web application built with Flask, Google Gemini, and Yahoo Finance. The app can handle user queries about investing, stock market insights, risk analysis, and provides real-time stock data and visualizations.


🌟 Features

  • 🔎 Finance Chatbot
    Responds to finance, investment, and trading-related questions using Google Gemini (Gemini 2.0 Flash).

  • 📈 Stock Insights
    Get concise bullet-point insights for supported tickers like AAPL, MSFT, TSLA, etc.

  • ⚠️ Risk Assessment
    Analyze volatility, beta, and overall risk profile of stocks.

  • 📊 Real-Time Stock Data
    View current stock price, % change, open/high/low/volume data using yfinance.

  • 🕰️ Dynamic Graphs
    Visualize price trends across multiple timeframes: intraday, weekly, monthly, etc.


🧠 Tech Stack

  • Backend: Python, Flask, Flask-CORS
  • AI Model: Google Gemini (via google.generativeai)
  • Finance Data: Yahoo Finance API (yfinance)
  • Frontend: Static HTML/CSS/JS (located in /frontend)
  • Timezone Handling: pytz, datetime
  • Data Processing: pandas, numpy, re

🚀 Getting Started

1. Clone the Repo

git clone https://github.com/your-username/finance-chatbot-app.git
cd finance-chatbot-app

2. Install Dependencies

Make sure you have Python 3.8+ and pip:

pip install -r requirements.txt

3. Set Your Gemini API Key

In app.py, replace:

genai.configure(api_key="YOUR_API_KEY_HERE")

Or better, use an environment variable:

export GEMINI_API_KEY=your-api-key

And update app.py like this:

import os
genai.configure(api_key=os.getenv("GEMINI_API_KEY"))

4. Run the App

python app.py

Then open your browser and go to:

📍 http://localhost:5000

📂 Project Structure

finance-chatbot-app/
│
├── frontend/                  # Static frontend assets
│   └── index.html
│
├── app.py                     # Main Flask application
├── requirements.txt           # Python dependencies
└── README.md                  # You're here!

📌 To-Do / Future Enhancements

Expand to more stock tickers dynamically

Add user authentication

Deploy on Heroku / Render / AWS

Interactive charts (Plotly.js, Chart.js)

Real-time news scraping (via NewsAPI)

📃 License

MIT License © 2025 [k sai shashank]

🤝 Contributions

Feel free to open issues or PRs! Let’s build a smarter financial assistant together 💸


About

An interactive financial assistant with real-time stock analysis, risk assessment, and AI-powered insights using Flask and Google's Gemini model.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published