# AI-Powered Technical Analysis with Custom GPT

Connect ChatGPT to FastAPI-MCP servers for advanced technical analysis - integrate with Yahoo Finance, Finta, Pandas, and Gemini Vision API for automated analysis and reports.

- Try Technical Analysis GPT: https://chat.openai.com/g/g-680a0fba9cd481919073d474bee520fb-technical-analysis-report
- MCP Server & UIs: https://www.tigzig.com/apis/technical-analysis
- LLM Context (.txt): https://www.tigzig.com/llm/gpts/technical-analysis.txt

## What This GPT Does

This Custom GPT provides advanced technical analysis capabilities:

- Fetches live price data from Yahoo Finance via a custom API

- Calculates technical indicators using the Finta package

- Converts daily OHLCV to weekly (Mon-Fri) using `pandas.resample()`

- Generates advanced charts (price + EMA, RSI, ROC, volume overlays) via Matplotlib

- Uses Gemini Vision API to analyze chart patterns

- Compiles PDF and HTML reports with embedded visuals and tables

- Returns sharable report URLs

## How to Use

Ask ChatGPT to guide. Starter prompts also built in. Some tips:

### For Technical Analysis

- Specify the Yahoo symbol (e.g. GOOG)

- Mention time ranges naturally: *"last 3 months for daily, 1 year for weekly"*

- Request results in table format or inside a code block for easy Excel copy-paste

## How It Works

A multi-layered architecture with integrated FastAPI-MCP servers, connected to ChatGPT via Custom Actions and OpenAPI JSON schema:

### Technical Analysis Execution

- MCP server runs a FastAPI Technical Analysis web service available as MCP Server

- Pulls daily data from a second FastAPI Yahoo Finance web service

- Converts daily to weekly using Pandas `resample()`

- Computes indicators using Finta

- Generates dynamic charts via Matplotlib

- Sends charts + data to Gemini Vision API

- Markdown responses (with charts & tables) returned

### Report Generation

- Third FastAPI server converts markdown to PDF and HTML

- Markdown with embedded images are passed to this server

- Report saved as PDF & HTML and URLs returned to ChatGPT

### Tech Stack

- `fastapi-mcp` python package to expose FastAPI servers as MCP servers

- FastAPI, Pandas, Matplotlib, Finta, Gemini API

- Static file serving for downloadable reports

## How to Replicate

### 1. Deploy Backend Servers

- Yahoo Finance data API (prices & financials)

- Markdown-to-PDF server: converts markdown reports to PDF/HTML

- Technical Analysis server:

 Yahoo Finance and Technical Analysis FastAPIs already mounted with MCP

- Update Yahoo Finance API endpoint in Technical Analysis server

### 2. Setup Custom GPT

- Copy the Custom Action OpenAPI JSON schema into a new Custom GPT

- That's it - your GPT is ready to use

## Resources

- [Custom GPT JSON Schema](https://github.com/amararun/shared-fastapi-mcp-technical-analysis) - OpenAPI schema for connecting Custom GPT to backend Technical Analysis FastAPI-MCP server
- [MCP Server - Technical Analysis](https://www.tigzig.com/apis/technical-analysis) - Detailed documentation for the Technical Analysis MCP server
- [MCP Server - Yahoo Finance](https://www.tigzig.com/apis/yahoo-finance) - Detailed documentation for the Yahoo Finance Data Pull MCP server
- [Markdown to PDF FastAPI](https://mdtopdf.tigzig.com/) - FastAPI server for converting markdown content to PDF and HTML reports
- [Backend Process Flow](https://www.tigzig.com/images/mcpTechAnalysBackend.png) - High-level view of backend API call flows
- [LLM Context (.txt)](https://www.tigzig.com/llm/gpts/technical-analysis.txt) - Plain-text context file for feeding to AI agents about this GPT

---
Source: https://www.tigzig.com/technical-analysis-gpt

---
Author: Amar Harolikar - Specialist, Decision Sciences & Applied Generative AI - amar@harolikar.com - https://www.linkedin.com/in/amarharolikar
Source: https://www.tigzig.com/technical-analysis-gpt
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
