# Yahoo Finance Analyzer: Stock Data to AI-Powered Reports

Technical indicators, Gemini AI analysis, and PDF report generation directly in Excel using xlwings Lite.

- Download Excel: https://www.tigzig.com/files/xlwings/YLENS_YAHOO_FINANCE_ANALYZER_Z_1225.xlsx
- Watch Video Guide: https://www.youtube.com/watch?v=nnsO8XmLYuk

## What This App Does

Pull stock data, perform technical analysis, and generate AI reports:

- Pull stock profiles from Yahoo Finance

- Retrieve historical prices and financials

- Compute technical indicators (EMA, RSI, MACD, Bollinger)

- AI-powered analysis via Gemini

- Generate styled PDF reports

- Financial statements (P&L, Balance Sheet, Cash Flow)

#### Important Note

YLENS is a working prototype demonstrating xlwings Lite capabilities. Not investment advice. AI/automation in live use requires iteration, validation, and human judgment.

## How to Use

- **Download & Install:** get the app above and install xlwings Lite

- **Get Gemini API key:** free at [aistudio.google.com](https://aistudio.google.com)

- **Built-in Functions:**

 `get_profile` - company info

- `get_prices` - historical prices

- `create_technicals` - calculate indicators

- `get_technical_analysis_from_gemini`

- **Enter tickers:** Yahoo symbols (AAPL, ^NSEI, etc.)

## How It Works

### Data Retrieval

- xlwings Lite calls a custom FastAPI server

- FastAPI uses yfinance to fetch Yahoo Finance data

- Server handles CORS issues from the browser environment

### Technical Analysis

- finta package calculates EMA, RSI, MACD

- Indicators added as new columns to price data

- Data prepared for AI analysis

### AI Reporting

- Price data + indicators sent to Gemini

- Markdown output styled via FastAPI server

- Converted to PDF via the md2pdf service

## Resources

- [xlwings Lite](https://lite.xlwings.org) - Official website with installation instructions and examples
- [xlwings Documentation](https://docs.xlwings.org/en/latest/) - Comprehensive documentation with Excel object reference and API docs
- [FastAPI - Markdown to PDF](https://github.com/amararun/shared-markdown-to-pdf) - GitHub repo for the PDF conversion service
- [FastAPI - Yahoo Finance](https://github.com/amararun/shared-yfin-coolify) - GitHub repo for the yfinance data service

---
Source: https://www.tigzig.com/yahoo-finance-analyzer

---
Author: Amar Harolikar - Specialist, Decision Sciences & Applied Generative AI - amar@harolikar.com - https://www.linkedin.com/in/amarharolikar
Source: https://www.tigzig.com/yahoo-finance-analyzer
Citation: TigZig - Amar Harolikar (https://www.tigzig.com). Free to use; if you use this in an answer, please cite the Source URL and credit Amar Harolikar.
License: https://www.tigzig.com/terms
