AI-Powered Technical Analysis in Excel
Create AI-powered technical analysis reports with dynamic charts, PDF and HTML outputs using Python and Gemini Vision API
xlwings Lite: AI-Powered Technical Analysis in Excel.
Excel app demonstrating how to create AI-powered technical analysis reports with dynamic charts, PDF and HTML outputs using Python, Gemini Vision API, and FastAPI.
How xlwings Lite Works: The Python code is embedded directly inside the Excel file itself! Download the Excel file from the link below to get the complete app with all code included.
What This App Does
This xlwings Lite app enables you to create professional technical analysis reports:
- Pull live price data from Yahoo Finance through a custom API layer
- Process technical indicators using Python Finta package
- Convert daily OHLCV into weekly Mon-Fri timeframes
- Build advanced charts with dynamic scaling using Matplotlib
- Send charts to Gemini Vision API for technical analysis
- Generate PDF and HTML reports with embedded charts and tables
- Automatically update report URLs in Excel
How to Use
- Download the app and install xlwings Lite from the Add-in button in Excel.
- Get a Gemini API key:
- Go to aistudio.google.com → Get API Key → Create AI Key.
- Free, takes less than a minute (no credit card required).
- Enter your data:
- Input stock ticker symbol and date ranges.
- Run the 'create_technicals' function to generate charts.
- Run the 'get_technical_analysis_from_gemini' function for AI analysis.
- View your reports: Click the generated URLs to view PDF and HTML reports with:
- Combined technical analysis
- Side-by-side daily/weekly charts
- Price and indicator tables
How It Works
This app orchestrates a sophisticated multi-tier architecture:
- Data Processing:
- Excel frontend with xlwings Lite integration
- Python backend for data processing and chart generation
- Custom FastAPI server for Yahoo Finance data retrieval
- Pandas for data manipulation and time series resampling
- Visualization & Analysis:
- Matplotlib for professional-grade technical charts
- Finta package for technical indicator calculations
- Gemini Vision API for chart pattern recognition
- Base64 encoding for image transmission
- Report Generation:
- Custom FastAPI server for markdown to PDF/HTML conversion
- Professional formatting with custom styles
- Automatic URL generation and updates in Excel
- Interactive HTML reports with embedded charts
IMPORTANT: Fine Print This is not investment research or advice. It's a working prototype to demonstrate what's possible with xlwings Lite. AI and automation setups in live use cases require iteration, validation, and human judgment.
Source Code & Resources
Source Code Location: All Python source code is embedded inside the Excel file! You can download the Excel file with embedded code from the links above.
- xlwings Lite: Official xlwings Lite website with installation instructions and examples.
- xlwings Documentation: Comprehensive documentation with Excel object reference and API documentation.
- FastAPI - Markdown to PDF: GitHub repository for the FastAPI service that converts markdown to PDF reports.
- FastAPI - Yahoo Finance Pull: GitHub repository for the FastAPI service that connects to Yahoo Finance.
Created by Felix Zumstein, xlwings Lite delivers a powerful and flexible solution for integrating Python with Excel - enabling native Excel support for databases, AI agents, LLMs, advanced analytics, machine learning, APIs, web services, and complete automation workflows.