Quants GPT
Custom GPT for Portfolio stats, AI Powered Technical Chart Analysis & Yahoo Finance extraction
Custom GPT - Portfolio Analytics
Custom ChatGPT with QuantStats-Lumi analysis, Technical Analysis, and Security Performance Reports via FastAPI-MCP servers with OpenAPI schema integration.
What This GPT Does
QuantStats Analysis
- Wrapper over QuantStats-Lumi package that fixes bugs from original QuantStats
- Provides risk-return ratios (CAGR, Sharpe, Sortino) for single symbol vs benchmark
- Generates professional HTML reports with visualizations
Technical Analysis
- Live price data with technical indicators using Finta package
- Advanced charts with Matplotlib and Gemini Vision API analysis
- PDF and HTML reports with embedded visuals
Security Performance Report (SPR)
- Multi-symbol portfolio analysis using custom calculations + FFN library
- Interactive daily returns charts with comprehensive risk metrics
- Professional HTML reports with CSV exports for detailed analysis
Detailed Methodology & Validation: SPR vs QuantStats Comparison Complete methodology documentation, calculation details, and validation results comparing SPR with QuantStats implementations.
How to Use
Ask the GPT to guide you with these examples:
- QuantStats Analysis: "Compare AAPL against QQQ from January 2020 to March 2023". Specify symbol, benchmark (default: ^GSPC), and time range.
- Technical Analysis: "Analyze MSFT with RSI, MACD and Bollinger Bands for the past 6 months". Specify symbol, timeframe, and desired indicators.
- Security Performance Report: "Generate SPR for AAPL,MSFT,GOOG from 2020-01-01 to 2023-12-31". Provide multiple symbols and date range for comprehensive analysis.
- OpenAPI Schema Integration: Each MCP server codebase includes OpenAPI schema in docs folder. Add schemas as Custom Actions in ChatGPT GPT builder for full integration.
How It Works
- 1. QuantStats Analysis: Backend quantstats-lumi MCP server runs Lumiwealth's fork with bug fixes. GPT connects via OpenAPI schema to MCP server. Returns formatted HTML report with risk-return metrics.
- 2. Technical Analysis: FastAPI Technical Analysis service processes requests. Converts daily to weekly data, computes indicators with Finta. Generates charts via Matplotlib, analyzes with Gemini Vision API. Returns Markdown responses, converts to PDF/HTML reports.
- 3. Security Performance Report (SPR): Dual methodology: custom calculations for core metrics + FFN library. FastAPI backend with MCP integration for AI/LLM interactions. Processes multiple symbols with data quality filters. Generates HTML reports with matplotlib charts and CSV exports.
- 4. Integration Layer: Custom GPT connects to FastAPI endpoints via OpenAPI JSON schemas. All servers use fastapi-mcp for MCP protocol support. OpenAPI schemas available in docs folder of each codebase.
How to Replicate
- 1. Deploy Backend Servers:
- Deploy FastAPI-MCP servers:
- QuantStats Analysis server (powered by QuantStats-Lumi package)
- Technical Analysis server
- Security Performance Report (SPR) MCP Server
- Deploy Markdown-to-PDF conversion server.
- All GitHub repos include build guides and installation instructions.
- Deploy FastAPI-MCP servers:
- 2. Setup Custom GPT:
- Create a new Custom GPT in ChatGPT.
- Copy OpenAPI JSON Schemas from docs folder of each MCP server repository.
- Configure Custom Actions to point to your deployed endpoints.
- Set appropriate instructions to handle all analysis types.
Resources & Examples
- QuantStats MCP Server: Detailed documentation for the QuantStats MCP server. Custom GPT and Flowise schema in docs folder. Built with QuantStats-Lumi package.
- Technical Analysis MCP Server: Detailed documentation for the Technical Analysis MCP server.
- Security Performance Report MCP Server: Multi-symbol portfolio analysis with dual methodology (custom + FFN).
- SPR vs QuantStats Methodology: Detailed comparison, validation results, and methodology documentation between SPR and QuantStats.
- QuantStats-Lumi Package: Lumiwealth's fork of QuantStats with important bug fixes and improvements.
This dual-purpose custom GPT leverages ChatGPT's capabilities to provide an intuitive interface for both portfolio performance analysis and technical analysis. It simplifies complex financial analysis by allowing natural language interaction with powerful Python tools through FastAPI-MCP backends.