# AI-Powered Technical Analysis in Excel

Generate professional technical analysis reports with Gemini Vision API, dynamic charts, and PDF/HTML outputs directly from Excel using xlwings Lite. Pulls live data from Yahoo Finance, calculates technical indicators with Finta, builds Matplotlib charts, sends to Gemini for AI pattern recognition.

## Links
- App: https://app.tigzig.com/technical-analysis-report
- Video Guide: https://youtu.be/BKWEvglkB-c
- Blog Post: https://www.tigzig.com/post/automated-analytics-reporting-with-python-in-excel-xlwings-lite-build-once-reuse-anywhere

## Tags
python-in-excel, xlwings-lite, technical-analysis, gemini

## Download
- Excel Workbook: https://www.tigzig.com/files/xlwings/TECHNICAL_ANALYSIS_PDF_HTML_V2_1225.xlsx

## Architecture

```
Excel (xlwings Lite) → Python (Pandas + Finta)
  → Yahoo Finance (FastAPI Server) → data
  → Matplotlib (Charts + Tables) → Gemini Vision (AI Analysis)
    → FastAPI Server (Markdown → PDF & HTML Reports)
```

### What It Does
- Pulls live price data from Yahoo Finance through custom API layer
- Processes technical indicators (EMAs, MACD, RSI, Bollinger Bands) using Finta
- Converts daily OHLCV data into weekly Mon-Fri timeframes
- Builds advanced charts with dynamic scaling using Matplotlib
- Sends charts to Gemini Vision API for technical pattern recognition
- Generates PDF and HTML reports with embedded charts and tables
- Automatically updates report URLs in Excel

### How to Use
1. Download Excel file and install xlwings Lite
2. Get a free Gemini API key at https://aistudio.google.com (no credit card required)
3. Input stock ticker symbol and date ranges
4. Run 'Generate Technicals Only' for charts and tables, or 'Generate AI Analysis' for full AI report
5. Click generated URLs to view PDF and HTML reports

Note: For educational and informational purposes only. Not investment research or advice.

## Related Apps
- Quants Agent: https://app.tigzig.com/n8n-tech-analysis
- Quants Suite: https://app.tigzig.com/portfolio-analysis-suite
- Quants GPT: https://app.tigzig.com/quantstats-portfolio-gpt

## Resources
- Yahoo Finance FastAPI: https://github.com/amararun/shared-yfin-coolify
- Markdown to PDF FastAPI: https://github.com/amararun/shared-reportlab-md-to-pdf
- xlwings Lite: https://lite.xlwings.org
