Overview
SPR (Security Performance Report) is a multi-symbol portfolio reporting tool. Pass a set of Yahoo Finance symbols and a date range, and it returns a professional HTML report with matplotlib charts plus six CSV files (price data, returns, correlations, statistics). Two access shapes over one backend:
- REST -
POST /analyze(and/api/analyze) withsymbols,start_date,end_date, optionalrisk_free_rate. - MCP - the same report as an agent tool call (see below).
Related: for single-symbol profiling see QRep Portfolio Profiling; for a 6-security metric comparison see QREP - Compare Securities.
MCP Server (for AI agents)
Connect an AI agent and let it generate a portfolio report directly. No auth. Three transports:
https://ffn.tigzig.com/v1/mcp/http- Streamable HTTP (recommended; MCP spec 2025-03-26).https://ffn.tigzig.com/v1/mcp/sse- SSE (legacy fallback).https://ffn.tigzig.com/mcp- original SSE endpoint, kept for back-compat.
Example prompt: "Generate an SPR report for AAPL, MSFT and GOOG from 2020-01-01 to 2024-12-31."
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.
Methodology & validation
Dual calculation methodology. Core performance metrics (Total Return, CAGR, Sharpe, Sortino) use custom implementations based on QuantStats methodology; additional analytics (drawdowns, monthly returns, statistics) are powered by the open-source FFN library. Price data is from Yahoo Finance with preprocessing (zero/NaN removal, date alignment).
Validation. Selective validation against QuantStats shows perfect matches for Total Return (100%) and CAGR (100%), and 97%+ for Sharpe and Sortino. The small variance comes from data-quality filters and precision differences. For multi-security analysis, date mismatches from differing exchange calendars are forward-filled up to five days (an industry-accepted practice with minimal impact). Full details: SPR vs QuantStats methodology comparison.
Informational only, not investment advice. Always validate outputs.
Build your own (open source)
Clone the repo and run your own instance:
- Clone github.com/amararun/shared-fastapi-mcp-ffn
- Create a virtual environment and install dependencies.
- Configure environment variables, then run the FastAPI server with uvicorn.
Key dependencies: custom calculation engine, FFN, FastAPI, yfinance, fastapi-mcp.
API Endpoints (REST / HTTP)
https://ffn.tigzig.comPrepend this to every path listed below (e.g. /series becomes https://ffn.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
Generates a comprehensive SPR (Security Performance Review) portfolio analysis report using custom calculations and FFN metrics.
curl -X POST "https://ffn.tigzig.com/analyze"/api/analyze
Analyze Api
API endpoint for JavaScript form submission - returns JSON response for SPR analysis using custom calculations and FFN metrics.
curl -X POST "https://ffn.tigzig.com/api/analyze"