Overview
QRep Portfolio Profiling analyzes a single symbol against a benchmark and returns a professional HTML report with Sharpe and Sortino ratios, Max Drawdown, Value at Risk, rolling statistics, correlations and return-distribution analysis. Powered by QuantStats-Lumi (the Lumiwealth fork with bug fixes). Two access shapes over one backend:
- REST -
GET /analyzewithsymbols,benchmark(default^GSPC),start_date,end_date, optionalrisk_free_rate. - MCP - the same report as an agent tool call (see below).
Two QuantStats versions exist. This is the older single-symbol profiling server on the QuantStats-Lumi fork. The newer QREP - Compare Securities server runs the original ranaroussi/quantstats and focuses on multi-security metric comparison. For multi-symbol portfolio reports, see SPR.
MCP Server (for AI agents)
Connect an AI agent and let it profile a security directly. No auth. Three transports:
https://quantstats-h.tigzig.com/v1/mcp/http- Streamable HTTP (recommended; MCP spec 2025-03-26).https://quantstats-h.tigzig.com/v1/mcp/sse- SSE (legacy fallback).https://quantstats-h.tigzig.com/mcp- original SSE endpoint, kept for back-compat.
Example prompt: "Profile AAPL against QQQ from January 2020 to March 2023."
Add to Claude.ai: Settings -> Connectors -> Add custom connector -> paste the Streamable HTTP URL (fall back to SSE if needed) -> approve. The same URLs work for Cursor, n8n, and any MCP client.
How it works
- Historical price data for the symbol and benchmark is fetched from Yahoo Finance and aligned.
- QuantStats-Lumi computes the metrics and renders the HTML report with visualizations.
- FastAPI backend +
fastapi-mcp, Flask web UI, deployed on Coolify (Hetzner) behind Cloudflare.
Informational only, not investment advice. Metrics use the open-source QuantStats-Lumi version; some calculations rely on assumptions (trading days, compounding). Always validate outputs.
Build your own (open source)
Clone the repo and run your own instance:
- Clone github.com/amararun/shared-quantstats
pip install -r requirements.txt- Set
IS_LOCAL_DEVELOPMENT=1(0 for production) andBASE_URL_FOR_REPORTS. uvicorn main:app --host 0.0.0.0 --port 8000
API Endpoints (REST / HTTP)
https://quantstats-h.tigzig.comPrepend this to every path listed below (e.g. /series becomes https://quantstats-h.tigzig.com/series). The curl example on each card shows the full URL.Generated from the live OpenAPI spec - always in sync with the API. Try them interactively in Swagger.
/analyze
Analyze
Generate a comprehensive portfolio analysis report using QuantStats.
| Param | In | Type | Description | |
|---|---|---|---|---|
symbols | query | string | required | MANDATORY: Primary stock symbol to analyze (e.g., 'AAPL', 'MSFT', 'GOOGL'). Must be a valid Yahoo Finance ticker symbol. This is the main asset being analyzed. Note: Despite the plural name, only one symbol should be provided. |
benchmark | query | string | optional | MANDATORY: Benchmark symbol for comparison (e.g., '^GSPC' for S&P 500, '^IXIC' for NASDAQ, '^DJI' for Dow Jones). Must be a valid Yahoo Finance ticker symbol. While this defaults to '^GSPC', a benchmark is ALWAYS used in analysis - this tool requires exactly 2 symbols for comparative analysis. If you don't specify a benchmark, '^GSPC' (S&P 500) will be used automatically. |
start_date | query | string | required | MANDATORY: Start date in YYYY-MM-DD format |
end_date | query | string | required | MANDATORY: End date in YYYY-MM-DD format |
risk_free_rate | query | number | optional | Risk-free rate as percentage (default: 5.0) |
curl "https://quantstats-h.tigzig.com/analyze?symbols=AAPL,MSFT&start_date=2020-01-01&end_date=2024-12-31"/api/analyze
Analyze Api
API endpoint for analysis
curl -X POST "https://quantstats-h.tigzig.com/api/analyze"/qpulse/analyze
Qpulse Analyze
QPulse Tearsheet Generation - Simple API using native QuantStats
curl -X POST "https://quantstats-h.tigzig.com/qpulse/analyze"/qpulse/analyze
Qpulse Analyze Get
GET version of QPulse analyze for easy browser/curl testing
| Param | In | Type | Description | |
|---|---|---|---|---|
symbol | query | string | required | Stock symbol (e.g., 'AAPL') |
benchmark | query | string | optional | Benchmark symbol |
start_date | query | string | required | Start date (YYYY-MM-DD) |
end_date | query | string | required | End date (YYYY-MM-DD) |
curl "https://quantstats-h.tigzig.com/qpulse/analyze?symbol=AAPL&start_date=2020-01-01&end_date=2024-12-31"